From: Alex Deucher Date: Wed, 1 Jun 2016 16:58:36 +0000 (-0400) Subject: drm/radeon: add a delay after ATPX dGPU power off X-Git-Tag: firefly_0821_release~176^2~4^2~31^2~364 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ada3815fab5191d1c96ff07ed6c0c77ecd34dfd0;p=firefly-linux-kernel-4.4.55.git drm/radeon: add a delay after ATPX dGPU power off 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 Acked-by: Christian König Signed-off-by: Alex Deucher Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c b/drivers/gpu/drm/radeon/radeon_atpx_handler.c index c4b4f298a283..69ce95571136 100644 --- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c +++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "radeon_acpi.h" @@ -255,6 +256,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; }