]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/i915/hsw: Fix workaround for server AUX channel clock divisor
authorJim Bride <jim.bride@linux.intel.com>
Wed, 27 May 2015 17:21:48 +0000 (10:21 -0700)
committerLuis Henriques <luis.henriques@canonical.com>
Thu, 11 Jun 2015 10:24:58 +0000 (11:24 +0100)
commit e058c945e03a629c99606452a6931f632dd28903 upstream.

According to the HSW b-spec we need to try clock divisors of 63
and 72, each 3 or more times, when attempting DP AUX channel
communication on a server chipset.  This actually wasn't happening
due to a short-circuit that only checked the DP_AUX_CH_CTL_DONE bit
in status rather than checking that the operation was done and
that DP_AUX_CH_CTL_TIME_OUT_ERROR was not set.

[v2] Implemented alternate solution suggested by Jani Nikula.

Signed-off-by: Jim Bride <jim.bride@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
drivers/gpu/drm/i915/intel_dp.c

index d2f1431eb428075584d87232fecff3893d3ad69e..b5660eb078f618259ea46c556bf1f3cd2b23bc93 100644 (file)
@@ -597,10 +597,8 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
                                      DP_AUX_CH_CTL_RECEIVE_ERROR))
                                continue;
                        if (status & DP_AUX_CH_CTL_DONE)
-                               break;
+                               goto done;
                }
-               if (status & DP_AUX_CH_CTL_DONE)
-                       break;
        }
 
        if ((status & DP_AUX_CH_CTL_DONE) == 0) {
@@ -609,6 +607,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
                goto out;
        }
 
+done:
        /* Check for timeout or receive error.
         * Timeouts occur when the sink is not connected
         */