summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2023-06-15 03:11:04 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2023-06-15 03:11:04 +0000
commit1b1f5762cfc3714e90bb36ffc1854e8d3109f647 (patch)
treed3772382838253d38352744d18c3f2f5b3cdac76
parent1e922099599d41948a68e0a320275556c40e845d (diff)
drm/amdgpu/gfx11: Adjust gfxoff before powergating on gfx11 as well
From Guilherme G. Piccoli 4e2f9159f9420ff481dc6ae00969d9406aa85e6f in linux-6.1.y/6.1.30 11fbdda2ab6bf049e2869139c07016022b4e045b in mainline linux
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/gfx_v11_0.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/gfx_v11_0.c b/sys/dev/pci/drm/amd/amdgpu/gfx_v11_0.c
index 5c2050dace0..4581d3ad160 100644
--- a/sys/dev/pci/drm/amd/amdgpu/gfx_v11_0.c
+++ b/sys/dev/pci/drm/amd/amdgpu/gfx_v11_0.c
@@ -5085,8 +5085,14 @@ static int gfx_v11_0_set_powergating_state(void *handle,
break;
case IP_VERSION(11, 0, 1):
case IP_VERSION(11, 0, 4):
+ if (!enable)
+ amdgpu_gfx_off_ctrl(adev, false);
+
gfx_v11_cntl_pg(adev, enable);
- amdgpu_gfx_off_ctrl(adev, enable);
+
+ if (enable)
+ amdgpu_gfx_off_ctrl(adev, true);
+
break;
default:
break;