diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2023-06-15 03:09:33 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2023-06-15 03:09:33 +0000 |
commit | 1e922099599d41948a68e0a320275556c40e845d (patch) | |
tree | e2af3e0faca984b85d5f00afc1c86aa5a3cc739e /sys | |
parent | 5d3e24aa454ff9a0655ef041f3bcd600cbd6da43 (diff) |
drm/amdgpu/gfx10: Disable gfxoff before disabling powergating.
From Bas Nieuwenhuizen
abfe2ffc004a0e6d23573b52826adf3dafdd9e02 in linux-6.1.y/6.1.30
8173cab3368a13cdc3cad0bd5cf14e9399b0f501 in mainline linux
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/gfx_v10_0.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/gfx_v10_0.c b/sys/dev/pci/drm/amd/amdgpu/gfx_v10_0.c index f03de718c71..634a71a8c7a 100644 --- a/sys/dev/pci/drm/amd/amdgpu/gfx_v10_0.c +++ b/sys/dev/pci/drm/amd/amdgpu/gfx_v10_0.c @@ -8236,8 +8236,14 @@ static int gfx_v10_0_set_powergating_state(void *handle, case IP_VERSION(10, 3, 3): case IP_VERSION(10, 3, 6): case IP_VERSION(10, 3, 7): + if (!enable) + amdgpu_gfx_off_ctrl(adev, false); + gfx_v10_cntl_pg(adev, enable); - amdgpu_gfx_off_ctrl(adev, enable); + + if (enable) + amdgpu_gfx_off_ctrl(adev, true); + break; default: break; |