From: Alex Deucher Date: Wed, 1 Jun 2016 16:54:33 +0000 (-0400) Subject: drm/amdgpu: add a delay after ATPX dGPU power off X-Git-Tag: firefly_0821_release~176^2~4^2~31^2~370 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8f811d101bd2b1c606b5ee1c3a8bd59a4f48cb8d;p=firefly-linux-kernel-4.4.55.git drm/amdgpu: add a delay after ATPX dGPU power off commit f81eb1a349d47694fe1e688336ca1b40ea3e248a 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/amd/amdgpu/amdgpu_atpx_handler.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c index 5a8fbadbd27b..29adbbe225c4 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "amdgpu_acpi.h" @@ -256,6 +257,10 @@ static int amdgpu_atpx_set_discrete_state(struct amdgpu_atpx *atpx, u8 state) if (!info) return -EIO; kfree(info); + + /* 200ms delay is required after off */ + if (state == 0) + msleep(200); } return 0; }