drm/dp: retry AUX transactions 32 times (v1.1)
authorDave Airlie <airlied@redhat.com>
Wed, 26 Nov 2014 03:13:09 +0000 (13:13 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 8 Dec 2014 23:56:44 +0000 (09:56 +1000)
At least on two MST devices I've tested with, when
they are link training downstream, they are totally
unable to handle aux ch msgs, so they defer like nuts.
I tried 16, it wasn't enough, 32 seems better.

This fixes one Dell 4k monitor and one of the
MST hubs.

v1.1: fixup comment (Tom).

Acked-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_dp_helper.c

index 959e2074b0d4299c10d45311fbce06c13ab58d0c..79968e39c8d09909395c5ad40165d0062c8227ac 100644 (file)
@@ -186,10 +186,11 @@ static int drm_dp_dpcd_access(struct drm_dp_aux *aux, u8 request,
 
        /*
         * The specification doesn't give any recommendation on how often to
-        * retry native transactions, so retry 7 times like for I2C-over-AUX
-        * transactions.
+        * retry native transactions. We used to retry 7 times like for
+        * aux i2c transactions but real world devices this wasn't
+        * sufficient, bump to 32 which makes Dell 4k monitors happier.
         */
-       for (retry = 0; retry < 7; retry++) {
+       for (retry = 0; retry < 32; retry++) {
 
                mutex_lock(&aux->hw_mutex);
                err = aux->transfer(aux, &msg);