diff options
author | Imre Deak <imre.deak@intel.com> | 2020-10-06 02:01:54 +0300 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2020-10-06 14:00:32 +0300 |
commit | f9e76a6e68d39a13c269999cfb2df23054c5146b (patch) | |
tree | 547cd4d0ac3d6822b11f2c8ff5bf88095b41769f /drivers/gpu/drm/i915/display/intel_dp.h | |
parent | 7d6287a8481242cb0f324a2937258f240036dd17 (diff) | |
download | linux-f9e76a6e68d39a13c269999cfb2df23054c5146b.tar.xz |
drm/i915: Add an encoder hook to sanitize its state during init/resume
Atm, if a full modeset is performed during the initial modeset the link
training will happen with uninitialized max DP rate and lane count. Make
sure the corresponding encoder state is initialized by adding an encoder
hook called during driver init and system resume.
A better alternative would be to store all states in the CRTC state and
make this state available for the link re-training code. Also instead of
the DPCD read in the hook there should be really a proper sink HW
readout in place. Both of these require a bigger rework, so for now opting
for this minimal fix to make at least full initial modesets work.
The patch is based on
https://patchwork.freedesktop.org/patch/101473/?series=10354&rev=3
v2: (Ville)
- s/sanitize_state/sync_state/
- No point in calling the hook when CRTC is disabled, remove the call.
- No point in calling the hook for MST, remove it.
v3: Check only DPCD_REV to avoid clobbering intel_dp->dpcd. (Ville)
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201005230154.1477653-1-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_dp.h')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_dp.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h index 977585aea3c8..6c201377fdc0 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.h +++ b/drivers/gpu/drm/i915/display/intel_dp.h @@ -143,5 +143,7 @@ int intel_dp_init_hdcp(struct intel_digital_port *dig_port, bool intel_dp_initial_fastset_check(struct intel_encoder *encoder, struct intel_crtc_state *crtc_state); +void intel_dp_sync_state(struct intel_encoder *encoder, + const struct intel_crtc_state *crtc_state); #endif /* __INTEL_DP_H__ */ |