summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
diff options
context:
space:
mode:
authorHuang Rui2018-02-27 06:43:59 +0100
committerAlex Deucher2018-05-15 20:43:42 +0200
commit151b5d7fd35876120dc744f93865e4c7dc2c1f36 (patch)
tree0f7274e51b46d512bf69d942d2546328abc4301f /drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
parentdrm/amdgpu: it should disable gfxoff when system is going to suspend (diff)
downloadkernel-qcow2-linux-151b5d7fd35876120dc744f93865e4c7dc2c1f36.tar.gz
kernel-qcow2-linux-151b5d7fd35876120dc744f93865e4c7dc2c1f36.tar.xz
kernel-qcow2-linux-151b5d7fd35876120dc744f93865e4c7dc2c1f36.zip
drm/amdgpu: fix to disable powergating in hw_fini
We need enable CGPG and GFXOFF together. If only enable one of them, this system will get hang after startx (do draw command). So when gfxoff is disabled, it also need disable CGPG after that. Signed-off-by: Huang Rui <ray.huang@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index 8d54207471d7..2c5e2a41632e 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -3137,6 +3137,9 @@ static int gfx_v9_0_hw_fini(void *handle)
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
int i;
+ amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_GFX,
+ AMD_PG_STATE_UNGATE);
+
amdgpu_irq_put(adev, &adev->gfx.priv_reg_irq, 0);
amdgpu_irq_put(adev, &adev->gfx.priv_inst_irq, 0);