drm/i915/lspcon: Remove DPCD compare based resume time workaround
authorImre Deak <imre.deak@intel.com>
Fri, 27 Jan 2017 09:39:20 +0000 (11:39 +0200)
committerImre Deak <imre.deak@intel.com>
Mon, 6 Feb 2017 14:33:33 +0000 (16:33 +0200)
This effectively reverts
commit 489375c866c111f16cea93b2467ebe59c9022cc7
Author: Imre Deak <imre.deak@intel.com>
Date:   Mon Oct 24 19:33:31 2016 +0300

    drm/i915/lspcon: Add workaround for resuming in PCON mode

The workaround was added without considering that HPD is low during
the failed AUX transfers the WA fixed. Since the previous patch we
wait for HPD to get asserted. My tests also show that this happens
_after_ the DPCD reads start to return correct values. This
suggests that we don't need this WA any more, let's try to remove
it to reduce the clutter.

Cc: Shashank Sharma <shashank.sharma@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1485509961-9010-4-git-send-email-imre.deak@intel.com
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_lspcon.c

index 424f7ea04b68637f704891a8372e1ec32ffce3a7..973d7b6a7d5c97cd5ad4a90ac7f5eb0c798215df 100644 (file)
@@ -1002,7 +1002,6 @@ struct intel_dp {
 struct intel_lspcon {
        bool active;
        enum drm_lspcon_mode mode;
-       bool desc_valid;
 };
 
 struct intel_digital_port {
index c300647ef604ba614ae15d5d3b9f963f26d4899f..71cbe9c089320cbc305c827bacd41fcbf1e542ce 100644 (file)
@@ -162,21 +162,8 @@ static void lspcon_resume_in_pcon_wa(struct intel_lspcon *lspcon)
        struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev);
        unsigned long start = jiffies;
 
-       if (!lspcon->desc_valid)
-               return;
-
        while (1) {
-               struct intel_dp_desc desc;
-
-               /*
-                * The w/a only applies in PCON mode and we don't expect any
-                * AUX errors.
-                */
-               if (!__intel_dp_read_desc(intel_dp, &desc))
-                       return;
-
-               if (intel_digital_port_connected(dev_priv, dig_port) &&
-                   !memcmp(&intel_dp->desc, &desc, sizeof(desc))) {
+               if (intel_digital_port_connected(dev_priv, dig_port)) {
                        DRM_DEBUG_KMS("LSPCON recovering in PCON mode after %u ms\n",
                                      jiffies_to_msecs(jiffies - start));
                        return;
@@ -253,7 +240,7 @@ bool lspcon_init(struct intel_digital_port *intel_dig_port)
                return false;
        }
 
-       lspcon->desc_valid = intel_dp_read_desc(dp);
+       intel_dp_read_desc(dp);
 
        DRM_DEBUG_KMS("Success: LSPCON init\n");
        return true;