Zhenyu Wang
a1c666ddfc
MAINTAINERS: switch my mail address for GVT driver
...
I won't be able to use intel account, so this switches address to my
gmail account.
Cc: Zhi Wang <zhi.wang.linux@gmail.com >
Cc: Zhiyuan Lv <zhiyuan.lv@intel.com >
Cc: James Wu <james.y.wu@intel.com >
Cc: Zhenyu Wang <zhenyuw.linux@gmail.com >
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com >
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Acked-by: Zhi Wang <zhiwang@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20241113063700.4460-1-zhenyuw@linux.intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2025-01-09 16:08:43 -05:00
Ville Syrjälä
c0eac88092
drm/i915/scaler: Add scaler tracepoints
...
Add some tracpoints around skl+ scaler programming to help with
debugging.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241219130827.22830-9-ville.syrjala@linux.intel.com
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
2025-01-09 19:33:44 +02:00
Ville Syrjälä
49b14a1256
drm/i915/scaler: s/excdeed/exceed/
...
Fix typo s/excdeed/exceed/
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241219130827.22830-8-ville.syrjala@linux.intel.com
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
2025-01-09 19:33:31 +02:00
Ville Syrjälä
3040274f7e
drm/i915/scaler: Pimp scaler debugs
...
Include the standard "[CRTC:...]" information in the scaler debugs
to make life easier.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241219130827.22830-7-ville.syrjala@linux.intel.com
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
2025-01-09 19:32:26 +02:00
Ville Syrjälä
d4dbabd425
drm/i915/scaler: Nuke redundant code
...
The tgl+ and mtl+ numbers in skl_scaler_max_dst_size() are
identical. Combine them to a single piece of code.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241219130827.22830-6-ville.syrjala@linux.intel.com
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
2025-01-09 19:32:08 +02:00
Ville Syrjälä
c5877587a2
drm/i915/scaler: Extract skl_scaler_max_dst_size()
...
The SKL_MAX_DST_* defines just make things hard to read.
Get rid of them and introduce an easy to read function
in their place.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241219130827.22830-5-ville.syrjala@linux.intel.com
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
2025-01-09 19:31:38 +02:00
Ville Syrjälä
9313b0bee0
drm/i915/scaler: Extract skl_scaler_min_dst_size()
...
The SKL_MIN_DST_* defines just make things hard to read.
Get rid of them and introduce an easy to read function
in their place.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241219130827.22830-4-ville.syrjala@linux.intel.com
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
2025-01-09 19:31:15 +02:00
Ville Syrjälä
24c095f695
drm/i915/scaler: Extract skl_scaler_max_src_size()
...
The SKL_MAX_SRC_* defines just make things hard to read.
Get rid of them and introduce an easy to read function
in their place.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241219130827.22830-3-ville.syrjala@linux.intel.com
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
2025-01-09 19:30:51 +02:00
Ville Syrjälä
3ac197e4d7
drm/i915/scaler: Extract skl_scaler_min_src_size()
...
The SKL_MIN_*SRC_* defines just make things hard to read.
Get rid of them and introduce an easy to read function
in their place.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241219130827.22830-2-ville.syrjala@linux.intel.com
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
2025-01-09 19:30:36 +02:00
Ravi Kumar Vodapalli
3566784817
drm/i915/display: Update DBUF_TRACKER_STATE_SERVICE only on appropriate platforms
...
The bspec only asks the driver to reprogram the DBUF_CTL's
DBUF_TRACKER_STATE_SERVICE field to 0x8 on DG2 and platforms with
display version 12. All other platforms should avoid reprogramming
this register at driver init.
Although we've been accidentally reprogramming DBUF_CTL on platforms
where the spec does not ask us to, that mistake has been harmless so
far because the value being programmed by the driver happened to
match the hardware's default settings.
So, update DBUF_TRACKER_STATE_SERVICE field to 0x8 only for
1. display version 12
2. DG2.
Other platforms unless stated should use their default value.
Bspec: 49213
Signed-off-by: Ravi Kumar Vodapalli <ravi.kumar.vodapalli@intel.com >
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com >
Reviewed-by: Matt Roper <matthew.d.roper@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250108200210.1815229-1-ravi.kumar.vodapalli@intel.com
[mattrope: Tweaked patch subject to accurately reflect content]
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
2025-01-08 12:19:06 -08:00
Jani Nikula
e995bb4adc
drm/i915/gvt: store virtual_dp_monitor_edid in rodata
...
The virtual DP EDID isn't modified. Add const modifier to store it in
rodata.
Reviewed-by: Nemesa Garg <nemesa.garg@intel.com >
Reviewed-by: Zhi Wang <zhiwang@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250107182240.1765311-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-01-08 11:24:21 +02:00
Gustavo Sousa
34e47bdbad
drm/i915/dmc_wl: Allow enable_dmc_wl=3 to mean "always locked"
...
When debugging issues that might be related to the DMC wakelock code, it
might be useful to compare runs with the lock acquired while DC states
are enabled vs the regular case. If issues disappear with the former, it
might be a symptom of something wrong in our code. Support having this
"always locked" behavior with enable_dmc_wl=3.
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com >
Reviewed-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241219221429.109668-5-gustavo.sousa@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
2025-01-07 14:29:20 -08:00
Gustavo Sousa
a56d1e380d
drm/i915/dmc_wl: Allow enable_dmc_wl=2 to mean "match any register"
...
When debugging issues that might be related to the DMC wakelock code, it
is sometimes useful to compare runs when we match any register offset vs
the regular case. If issues disappear when we take the wakelock for any
register, it might indicate that we are missing some offset to be
tracked. Support matching any register offset with enable_dmc_wl=2.
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com >
Reviewed-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241219221429.109668-4-gustavo.sousa@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
2025-01-07 14:29:20 -08:00
Gustavo Sousa
81a1d1f5d2
drm/i915/dmc_wl: Show description string for enable_dmc_wl
...
We already provide the value resulting from sanitization of
enable_dmc_wl in dmesg, however the reader will need to either have the
meanings memorized or look them up in the parameter's documentation.
Let's make things easier by providing a short human-readable name for
the parameter in dmesg.
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com >
Reviewed-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241219221429.109668-3-gustavo.sousa@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
2025-01-07 14:29:20 -08:00
Gustavo Sousa
47ad909215
drm/i915/dmc_wl: Use enum values for enable_dmc_wl
...
Currently, after sanitization, enable_dmc_wl will behave like a boolean
parameter (enabled vs disabled). However, in upcoming changes, we will
allow more values for debugging purposes. For that, let's make the
sanitized value an enumeration.
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com >
Reviewed-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241219221429.109668-2-gustavo.sousa@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
2025-01-07 14:29:20 -08:00
Jani Nikula
1513358246
drm/i915/display: convert global state to struct intel_display
...
Going forward, struct intel_display is the main display device
structure. Convert intel_global_state.[ch] to it.
This allows us to make intel_pmdemand.c completely independent of
i915_drv.h.
Cc: Gustavo Sousa <gustavo.sousa@intel.com >
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/2b5e743b285a86a59ee87085727847c758c8d552.1735662324.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-01-07 19:31:39 +02:00
Jani Nikula
445fc68549
drm/i915/pmdemand: convert to struct intel_display
...
Going forward, struct intel_display is the main display device
structure. Convert pmdemand to it.
Cc: Gustavo Sousa <gustavo.sousa@intel.com >
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/c1d92e9490013d5aba50fc1d1ebc0ee18e82cf7e.1735662324.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-01-07 19:31:39 +02:00
Jani Nikula
0a08320bfa
drm/i915/pmdemand: make struct intel_pmdemand_state opaque
...
Only intel_pmdemand.c should look inside the struct
intel_pmdemand_state. Indeed, this is already the case. Finish the job
and make struct intel_pmdemand_state opaque, preventing any direct pokes
at the guts of it in the future.
Cc: Gustavo Sousa <gustavo.sousa@intel.com >
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/bc5f418785ecd51454761e9a55f21340470a92e3.1735662324.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-01-07 19:31:39 +02:00
Jani Nikula
eb18e25b60
drm/i915/pmdemand: convert to_intel_pmdemand_state() to a function
...
In preparation for making struct intel_pmdemand_state an opaque type,
convert to_intel_pmdemand_state() to a function.
Cc: Gustavo Sousa <gustavo.sousa@intel.com >
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/10324781f9f7eae5a92506aaa7a40403efd345dd.1735662324.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-01-07 19:31:38 +02:00
Jani Nikula
ef0a0757bb
drm/i915/dp: compute config for 128b/132b SST w/o DSC
...
Enable basic 128b/132b SST functionality without compression. Reuse
intel_dp_mtp_tu_compute_config() to figure out the TU after we've
determined we need to use an UHBR rate.
It's slightly complicated as the M/N computation is done in different
places in MST and SST paths, so we need to avoid trashing the values
later for UHBR.
If uncompressed UHBR fails, we drop to compressed non-UHBR, which is
quite likely to fail as well. We still lack 128b/132b SST+DSC.
We need mst_master_transcoder also for 128b/132b SST. Use cpu_transcoder
directly. Enhanced framing is "don't care" for 128b/132b link.
v2: mst_master_transcoder, enhanced framing (Imre)
Reviewed-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/084e4e05bf25a5dd396dd391014943d42b11c88d.1735912293.git.jani.nikula@intel.com
2025-01-07 18:44:26 +02:00
Jani Nikula
79a6734cd5
drm/i915/ddi: disable trancoder port select for 128b/132b SST
...
128b/1232b SST will have mst_master_transcoder set and matching
cpu_transcoder. Ensure disable also for 128b/132b SST.
Reviewed-by: Imre Deak <imre.deak@intel.com >
Co-developed-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/eaf705b3490d828ba33e85f40a7794d58de7c5ad.1735912293.git.jani.nikula@intel.com
2025-01-07 18:44:24 +02:00
Jani Nikula
40d489fac0
drm/i915/ddi: handle 128b/132b SST in intel_ddi_read_func_ctl()
...
We'll only ever get here in MST mode from MST stream encoders; the
primary encoder's ->get_config() won't be called when we've detected
it's MST.
v2: Read mst_master_transcoder in 128b/132b SST path (Imre)
Reviewed-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/436854c0bb6ab5c14c3d3837694ea60ac2fbaba2.1735912293.git.jani.nikula@intel.com
2025-01-07 18:44:22 +02:00
Jani Nikula
35d2e4b756
drm/i915/ddi: start distinguishing 128b/132b SST and MST at state readout
...
We'll want to distinguish 128b/132b SST and MST modes at state
readout. There's a catch, though. From the hardware perspective,
128b/132b SST and MST programming are pretty much the same. And we can't
really ask the sink at this point.
If we have more than one transcoder in 128b/132b mode associated with
the port, we can safely assume it's MST. But for MST with only a single
stream enabled, we are pretty much out of luck. Let's fall back to
looking at the software state, i.e. intel_dp->is_mst. It should be fine
for the state checker, but for hardware takeover at probe, we'll have to
trust the GOP has only enabled SST.
TODO: Not sure how this *or* our current code handles 128b/132b enabled
by GOP.
Cc: Imre Deak <imre.deak@intel.com >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Reviewed-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/119a773a0d4d74ad204435e462f8d12cb0ea4128.1735912293.git.jani.nikula@intel.com
2025-01-07 18:44:19 +02:00
Jani Nikula
591b9170b7
drm/i915/ddi: enable ACT handling for 128b/132b SST
...
Add ACT handling for 128b/132b SST enable/disable.
This is preparation for enabling 128b/132b SST. This path is not
reachable yet.
v2:
- Check for !is_hdmi (Imre)
- Add disable sequence (Imre)
Reviewed-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/b0226471f9445d988917cee49dbbd93a1493f3c7.1735912293.git.jani.nikula@intel.com
2025-01-07 18:44:13 +02:00
Jani Nikula
a9efb7e2f7
drm/i915/ddi: initialize 128b/132b SST DP2 VFREQ registers
...
Write the DP2 specific VFREQ registers.
This is preparation for enabling 128b/132b SST. This path is not
reachable yet.
v2: Check for !is_hdmi (Imre)
Reviewed-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/7d90547e9ce01642b722efca0bf81cadb754e790.1735912293.git.jani.nikula@intel.com
2025-01-07 18:44:08 +02:00
Jani Nikula
aedeed4af6
drm/i915/ddi: write payload for 128b/132b SST
...
Write the payload allocation table for 128b/132b SST. Use VCPID 1 and
start from slot 0, with dp_m_n.tu slots.
This is preparation for enabling 128b/132b SST. This path is not
reachable yet. Indeed, we don't yet compute TU for 128b/132b SST.
v2: Handle drm_dp_dpcd_write_payload() failures (Imre)
v3: Include drm_dp_helper.h (kernel test robot)
Reviewed-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250107095414.1244286-1-jani.nikula@intel.com
2025-01-07 18:44:06 +02:00
Jani Nikula
01708578ae
drm/i915/ddi: 128b/132b SST also needs DP_TP_CTL_MODE_MST
...
It's not very clearly specified, and the hardware bit is ill-named, but
128b/132b SST also needs the MST mode set in the DP_TP_CTL register.
This is preparation for enabling 128b/132b SST. This path is not
reachable yet.
Reviewed-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/b29fbba8c979a8bab2bf03088610fe408faaf704.1735912293.git.jani.nikula@intel.com
2025-01-07 18:44:04 +02:00
Jani Nikula
2f82724a3e
drm/i915/ddi: enable 128b/132b TRANS_DDI_FUNC_CTL mode for UHBR SST
...
128b/132b SST needs 128b/132b mode enabled in the TRANS_DDI_FUNC_CTL
register.
This is preparation for enabling 128b/132b SST. This path is not
reachable yet.
v2: Use the MST path instead of SST to also set transport select (Imre)
Reviewed-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/122ebeadf4bf0870fc26b7d12abdff88f4be8799.1735912293.git.jani.nikula@intel.com
2025-01-07 18:44:02 +02:00
Jani Nikula
f6971d7427
drm/i915/mst: adapt intel_dp_mtp_tu_compute_config() for 128b/132b SST
...
Handle 128b/132b SST in intel_dp_mtp_tu_compute_config(). The remote
bandwidth overhead and time slot allocation are only relevant for MST;
SST only needs the local bandwidth and a check that 64 slots isn't
exceeded.
Reviewed-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/b59c94b0aac2c073b0306c0a0040b26330f94260.1735912293.git.jani.nikula@intel.com
2025-01-07 18:44:01 +02:00
Jani Nikula
1ed21a66ec
drm/i915/mst: split out a helper for figuring out the TU
...
Extract intel_dp_mtp_tu_compute_config() for figuring out the TU. Move
the link configuration and mst state access to the callers. This will be
easier to adapt to 128b/132b SST.
v2: Don't add SST stuff here yet
Reviewed-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/c3ea8370c9bd3cdc579159e68a63f4ed2fadc66a.1735912293.git.jani.nikula@intel.com
2025-01-07 18:43:59 +02:00
Jani Nikula
0dcc5c6a02
drm/i915/mst: remove crtc_state->pbn
...
The crtc_state->pbn member is only used as a temporary variable within
mst_stream_find_vcpi_slots_for_bpp(). Remove it as unnecessary.
Suggested-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/726aaadbd425057dfd854e42417bcf8d69b769d3.1735912293.git.jani.nikula@intel.com
2025-01-07 18:43:57 +02:00
Jani Nikula
643b06e29e
drm/i915/mst: change return value of mst_stream_find_vcpi_slots_for_bpp()
...
The callers of mst_stream_find_vcpi_slots_for_bpp() don't need the
returned slots for anything. On the contrary, they need to jump through
hoops to just distinguish between success and failure. Just return 0
instead of slots from mst_stream_find_vcpi_slots_for_bpp() for success,
and simplify the callers.
There's a pointless ret local variable that we can drop in the process.
Reviewed-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/7b3671a548c893b1bb62151d41f90bb8ce842ccc.1735912293.git.jani.nikula@intel.com
2025-01-07 18:43:56 +02:00
Jani Nikula
d7cde2e6bc
drm/i915/mst: drop connector parameter from intel_dp_mst_compute_m_n()
...
intel_dp_mst_compute_m_n() doesn't need the connector. Remove the
parameter.
Reviewed-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/eec2e9a2e2dc3d166ac94bb9de691246a14d3945.1735912293.git.jani.nikula@intel.com
2025-01-07 18:43:54 +02:00
Jani Nikula
2f6ba896ce
drm/i915/mst: drop connector parameter from intel_dp_mst_bw_overhead()
...
intel_dp_mst_bw_overhead() doesn't need the connector. Remove the
parameter.
Reviewed-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/e1379aca0748e392d8a232135b823deec783e829.1735912293.git.jani.nikula@intel.com
2025-01-07 18:43:52 +02:00
Jani Nikula
79cb1fad39
drm/mst: remove mgr parameter and debug logging from drm_dp_get_vc_payload_bw()
...
The struct drm_dp_mst_topology_mgr *mgr parameter is only used for debug
logging in case the passed in link rate or lane count are zero. There's
no further error checking as such, and the function returns 0.
There should be no case where the parameters are zero. The returned
value is generally used as a divisor, and if we were hitting this, we'd
be seeing division by zero.
Just remove the debug logging altogether, along with the mgr parameter,
so that the function can be used in non-MST contexts without the
topology manager.
v2: Also remove drm_dp_mst_helper_tests_init as unnecessary (Imre)
Cc: Imre Deak <imre.deak@intel.com >
Cc: Lyude Paul <lyude@redhat.com >
Reviewed-by: Imre Deak <imre.deak@intel.com >
Acked-by: Maxime Ripard <mripard@kernel.org >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/72d77e7a7fe69c784e9df048b7e6f250fd7599e4.1735912293.git.jani.nikula@intel.com
2025-01-07 18:43:18 +02:00
Jani Nikula
6f0f335b73
Merge drm/drm-next into drm-intel-next
...
Backmerge to get the DRM DP payload and ACT helpers to drm-intel-next.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-01-07 18:07:54 +02:00
Animesh Manna
baad97ed29
drm/i915/display: Adjust Added Wake Time with PKG_C_LATENCY
...
Increase the PKG_C_LATENCY Pkg C Latency field by the added wake time.
v1: Initial version.
v2: Rebase and cosmetic changes.
v3:
- Place latency adjustment early to accommodate round-up. [Suraj]
- Modify commit description and cosmetic change. [Suraj]
WA: 22020432604
Cc: Suraj Kandpal <suraj.kandpal@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250106094408.1011063-1-animesh.manna@intel.com
2025-01-07 14:02:41 +05:30
Ankit Nautiyal
939bc3e4d9
drm/i915/dp: Return early if dsc is required but not supported
...
Currently, when bandwidth is insufficient for a given mode, we attempt
to use DSC. This is indicated by a debug print, followed by a check for
DSC support.
The debug message states that we are trying DSC, but DSC might not be
supported, which can give an incorrect picture in the logs if we bail
out later.
Correct the order for both DP and DP MST to:
- Check if DSC is required and supported, and return early if DSC is
not supported.
- Print a debug message to indicate that DSC will be tried next.
Suggested-by: Jani Nikula <jani.nikula@linux.intel.com >
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250103031424.1732774-1-ankit.k.nautiyal@intel.com
2025-01-07 13:27:16 +05:30
Suraj Kandpal
173876aa5d
drm/i915/ddi: Optimize mtl_port_buf_ctl_program
...
A small optimization and cleanup for mtl_port_buf_ctl_program function
which lets use intel_de_rmw instead of a intel_de_read and
intel_de_write.
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250103051705.145161-3-suraj.kandpal@intel.com
2025-01-06 13:54:52 +05:30
Suraj Kandpal
2fcde2fbec
drm/i915/dp: Use intel_display instead of drm_i915_private
...
Use intel display instead of drm_i915_private in
mtl_ddi_prepare_link_retrain & mtl_port_buf_ctl_program
functions.
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250103051705.145161-2-suraj.kandpal@intel.com
2025-01-06 13:54:51 +05:30
Suraj Kandpal
fcf73e20cd
Revert "drm/i915/hdcp: Don't enable HDCP1.4 directly from check_link"
...
This reverts commit 483f7d94a0 .
This needs to be reverted since HDCP even after updating the connector
state HDCP property we don't reenable HDCP until the next commit
in which the CP Property is set causing compliance to fail.
--v2
-Fix build issue [Dnyaneshwar]
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com >
Reviewed-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250103084517.239998-1-suraj.kandpal@intel.com
2025-01-06 11:06:09 +05:30
Jani Nikula
60a43ecbd5
drm/i915/ddi: only call shutdown hooks for valid encoders
...
DDI might be HDMI or DP only, leaving the other encoder
uninitialized. Calling the shutdown hook on an uninitialized encoder may
lead to a NULL pointer dereference. Check the encoder types (and thus
validity via the DP output_reg or HDMI hdmi_reg checks) before calling
the hooks.
Reported-and-tested-by: Sergey Senozhatsky <senozhatsky@chromium.org >
Closes: https://lore.kernel.org/r/20241031105145.2140590-1-senozhatsky@chromium.org
Cc: Sergey Senozhatsky <senozhatsky@chromium.org >
Cc: Ville Syrjala <ville.syrjala@linux.intel.com >
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/8b197c50e7f3be2bbc07e3935b21e919815015d5.1735568047.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-01-03 12:28:48 +02:00
Jani Nikula
efa43b7516
drm/i915/display: add intel_encoder_is_hdmi()
...
Similar to intel_encoder_is_dp() and friends.
Cc: Sergey Senozhatsky <senozhatsky@chromium.org >
Cc: Ville Syrjala <ville.syrjala@linux.intel.com >
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com >
Tested-by: Sergey Senozhatsky <senozhatsky@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/e6bf9e01deb5d0d8b566af128a762d1313638847.1735568047.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-01-03 12:28:48 +02:00
Jani Nikula
8ea07e294e
drm/i915/ddi: gracefully handle errors from intel_ddi_init_hdmi_connector()
...
Errors from intel_ddi_init_hdmi_connector() can just mean "there's no
HDMI" while we'll still want to continue with DP only. Handle the errors
gracefully, but don't propagate. Clear the hdmi_reg which is used as a
proxy to indicate the HDMI is initialized.
v2: Gracefully handle but do not propagate
Cc: Sergey Senozhatsky <senozhatsky@chromium.org >
Cc: Ville Syrjala <ville.syrjala@linux.intel.com >
Reported-and-tested-by: Sergey Senozhatsky <senozhatsky@chromium.org >
Closes: https://lore.kernel.org/r/20241031105145.2140590-1-senozhatsky@chromium.org
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org > # v1
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/d72cb54ac7cc5ca29b3b9d70e4d368ea41643b08.1735568047.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-01-03 12:28:48 +02:00
Jani Nikula
7603ba8122
drm/i915/hdmi: add error handling in g4x_hdmi_init()
...
Handle encoder and connector init failures in g4x_hdmi_init(). This is
similar to g4x_dp_init().
Cc: Sergey Senozhatsky <senozhatsky@chromium.org >
Cc: Ville Syrjala <ville.syrjala@linux.intel.com >
Reported-and-tested-by: Sergey Senozhatsky <senozhatsky@chromium.org >
Closes: https://lore.kernel.org/r/20241031105145.2140590-1-senozhatsky@chromium.org
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/cafae7bf1f9ffb8f6a1d7a508cd2ce7dcf06fef7.1735568047.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-01-03 12:28:48 +02:00
Jani Nikula
7fb56536fa
drm/i915/hdmi: propagate errors from intel_hdmi_init_connector()
...
Propagate errors from intel_hdmi_init_connector() to be able to handle
them at callers. This is similar to intel_dp_init_connector().
Cc: Sergey Senozhatsky <senozhatsky@chromium.org >
Cc: Ville Syrjala <ville.syrjala@linux.intel.com >
Reported-and-tested-by: Sergey Senozhatsky <senozhatsky@chromium.org >
Closes: https://lore.kernel.org/r/20241031105145.2140590-1-senozhatsky@chromium.org
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/cdaf9e32cc4880c46e120933438c37b4d87be12e.1735568047.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-01-03 12:28:48 +02:00
Jani Nikula
e1980a9776
drm/i915/ddi: change intel_ddi_init_{dp, hdmi}_connector() return type
...
The caller doesn't actually need the returned struct intel_connector;
it's stored in the ->attached_connector of intel_dp and
intel_hdmi. Switch to returning an int with 0 for success and negative
errors codes to be able to indicate success even when we don't have a
connector.
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com >
Tested-by: Sergey Senozhatsky <senozhatsky@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/8ef7fe838231919e85eaead640c51ad3e4550d27.1735568047.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-01-03 12:28:48 +02:00
Ankit Nautiyal
5aad05463d
drm/i915/dp_mst: Use link.{min/max}_bpp_x16
...
The link.{min/max}_bpp_x16 is already set in crtc_state, use that while
computing link config for MST.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241217093244.3938132-15-ankit.k.nautiyal@intel.com
2024-12-24 15:20:04 +05:30
Ankit Nautiyal
1c5b72daff
drm/i915/dp: Set the DSC link limits in intel_dp_compute_config_link_bpp_limits
...
The helper intel_dp_compute_config_link_bpp_limits is the correct place
to set the DSC link limits. Move the code to this function and remove
the #TODO item.
v2: Add argument intel_connector to the helper to get correct connector
for DP MST. (Imre)
v3: Remove redundant calls to intel_dp_dsc_sink_max_compressed_bpp as
its already accounted while setting link bpp limits.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241217093244.3938132-14-ankit.k.nautiyal@intel.com
2024-12-24 15:20:03 +05:30
Ankit Nautiyal
57b763dd23
drm/i915/dp: Make dsc helpers accept const crtc_state pointers
...
Modify the dsc helpers to get max/min compressed bpp to accept
`const struct intel_crtc_state *` pointers instead of
`struct intel_crtc_state *`.
These helpers are not supposed to modify `crtc_state`.
Accepting const pointers will allow these helpers to be called from
functions that have const pointer to crtc_state.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241217093244.3938132-13-ankit.k.nautiyal@intel.com
2024-12-24 15:20:02 +05:30