]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/radeon: add a delay after ATPX dGPU power off
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jun 2016 16:58:36 +0000 (12:58 -0400)
committerWilly Tarreau <w@1wt.eu>
Sun, 21 Aug 2016 21:22:47 +0000 (23:22 +0200)
commit d814b24fb74cb9797d70cb8053961447c5879a5c upstream.

ATPX dGPU power control requires a 200ms delay between
power off and on.  This should fix dGPU failures on
resume from power off.

Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/gpu/drm/radeon/radeon_atpx_handler.c

index 8c44ef57864b17f1b5621954267f720288991308..a7e1893de838410f491b2fd7ebe7669add3b655d 100644 (file)
@@ -11,6 +11,7 @@
 #include <acpi/acpi.h>
 #include <acpi/acpi_bus.h>
 #include <linux/pci.h>
+#include <linux/delay.h>
 
 #include "radeon_acpi.h"
 
@@ -252,6 +253,10 @@ static int radeon_atpx_set_discrete_state(struct radeon_atpx *atpx, u8 state)
                if (!info)
                        return -EIO;
                kfree(info);
+
+               /* 200ms delay is required after off */
+               if (state == 0)
+                       msleep(200);
        }
        return 0;
 }