The DPRX/LTTPR caps for DP is read on detect and should be read only
once. This value is stored in intl_dp struct and will be retained until
hotplug.

Signed-off-by: Arun R Murthy <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_dp_link_training.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c 
b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
index 
76a5bfb507c34733db09cd7c2ba9895afcbf6b10..b78fc69cf21dea630313a5c93ff4bd3670f32293
 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
@@ -250,6 +250,9 @@ int intel_dp_init_lttpr_and_dprx_caps(struct intel_dp 
*intel_dp)
        struct intel_display *display = to_intel_display(intel_dp);
        int lttpr_count = 0;
 
+       /* this function is meant to be called only once */
+       drm_WARN_ON(display->drm, intel_dp->dpcd[DP_DPCD_REV] != 0);
+
        /*
         * Detecting LTTPRs must be avoided on platforms with an AUX timeout
         * period < 3.2ms. (see DP Standard v2.0, 2.11.2, 3.6.6.1).

-- 
2.25.1

Reply via email to