OSDN Git Service

drm/i915: Fix the PHY compliance test vs. hotplug mishap
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 14 Jan 2021 20:50:45 +0000 (22:50 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 19 Jan 2021 17:12:57 +0000 (19:12 +0200)
I accidentally added the compliance test hacks only to
intel_dp_hotplug() which doesn't even get used on any DDI
platform. Put the same crap into intel_ddi_hotplug().

Cc: Imre Deak <imre.deak@intel.com>
Fixes: 193af12cd681 ("drm/i915: Shove the PHY test into the hotplug work")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210114205046.8247-7-ville.syrjala@linux.intel.com
Reviewed-by: Imre Deak <imre.deak@intel.com>
drivers/gpu/drm/i915/display/intel_ddi.c
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/display/intel_dp.h

index d714e8b..326f70b 100644 (file)
@@ -5195,12 +5195,20 @@ intel_ddi_hotplug(struct intel_encoder *encoder,
 {
        struct drm_i915_private *i915 = to_i915(encoder->base.dev);
        struct intel_digital_port *dig_port = enc_to_dig_port(encoder);
+       struct intel_dp *intel_dp = &dig_port->dp;
        enum phy phy = intel_port_to_phy(i915, encoder->port);
        bool is_tc = intel_phy_is_tc(i915, phy);
        struct drm_modeset_acquire_ctx ctx;
        enum intel_hotplug_state state;
        int ret;
 
+       if (intel_dp->compliance.test_active &&
+           intel_dp->compliance.test_type == DP_TEST_LINK_PHY_TEST_PATTERN) {
+               intel_dp_phy_test(encoder);
+               /* just do the PHY test and nothing else */
+               return INTEL_HOTPLUG_UNCHANGED;
+       }
+
        state = intel_encoder_hotplug(encoder, connector);
 
        drm_modeset_acquire_init(&ctx, 0);
index d2ca79a..66aae1a 100644 (file)
@@ -5561,7 +5561,7 @@ static int intel_dp_do_phy_test(struct intel_encoder *encoder,
        return 0;
 }
 
-static void intel_dp_phy_test(struct intel_encoder *encoder)
+void intel_dp_phy_test(struct intel_encoder *encoder)
 {
        struct drm_modeset_acquire_ctx ctx;
        int ret;
index abf8347..40e7053 100644 (file)
@@ -142,5 +142,6 @@ const struct dpll *vlv_get_dpll(struct drm_i915_private *i915);
 void intel_dp_check_frl_training(struct intel_dp *intel_dp);
 void intel_dp_pcon_dsc_configure(struct intel_dp *intel_dp,
                                 const struct intel_crtc_state *crtc_state);
+void intel_dp_phy_test(struct intel_encoder *encoder);
 
 #endif /* __INTEL_DP_H__ */