[PATCH 2/3] drm/i915: dp: Fail compute_config if link params need reset
Sean Paul
sean at poorly.run
Tue Oct 16 15:24:14 UTC 2018
From: Sean Paul <seanpaul at chromium.org>
If the link parameters are incorrect, compute_config() can succeed with
bogus values. Since this is in no one's best interest, fail the compute
early.
Signed-off-by: Sean Paul <seanpaul at chromium.org>
---
drivers/gpu/drm/i915/intel_dp.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 5da50dd35107..db2027e0b420 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2083,6 +2083,10 @@ intel_dp_compute_config(struct intel_encoder *encoder,
bool constant_n = drm_dp_has_quirk(&intel_dp->desc,
DP_DPCD_QUIRK_CONSTANT_N);
+ /* Can't compute the config if the link parameters are out of date */
+ if (intel_dp->reset_link_params)
+ return false;
+
if (HAS_PCH_SPLIT(dev_priv) && !HAS_DDI(dev_priv) && port != PORT_A)
pipe_config->has_pch_encoder = true;
--
Sean Paul, Software Engineer, Google / Chromium OS
More information about the Intel-gfx-trybot
mailing list