diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2016-06-01 12:54:33 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-07-07 14:51:01 -0400 |
commit | f81eb1a349d47694fe1e688336ca1b40ea3e248a (patch) | |
tree | 72641ba96205b83fb21f4f9198fc6c3d422741dc /drivers/gpu/drm/amd | |
parent | 8d45f80ed08b1909988f38c094e5ace6d879ca10 (diff) |
drm/amdgpu: add a delay after ATPX dGPU power off
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
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c index 1be2ce46921b..c5d280ce625b 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 @@ | |||
10 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
11 | #include <linux/acpi.h> | 11 | #include <linux/acpi.h> |
12 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
13 | #include <linux/delay.h> | ||
13 | 14 | ||
14 | #include "amd_acpi.h" | 15 | #include "amd_acpi.h" |
15 | 16 | ||
@@ -271,6 +272,10 @@ static int amdgpu_atpx_set_discrete_state(struct amdgpu_atpx *atpx, u8 state) | |||
271 | if (!info) | 272 | if (!info) |
272 | return -EIO; | 273 | return -EIO; |
273 | kfree(info); | 274 | kfree(info); |
275 | |||
276 | /* 200ms delay is required after off */ | ||
277 | if (state == 0) | ||
278 | msleep(200); | ||
274 | } | 279 | } |
275 | return 0; | 280 | return 0; |
276 | } | 281 | } |