summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2022-01-06 01:37:47 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2022-01-06 01:37:47 +0000
commit44d65677165a7e4b46e27317101168c8ac92ba4e (patch)
treebb041678a43bf90b7ccc49c112fbc1c4de7bb4cf
parent46fd838da0e6b987fc6965d4271c572646831812 (diff)
drm/amdgpu: When the VCN(1.0) block is suspended, powergating is explicitly enabled
From chen gong 28863ffe21ff711d5109e3c208676258bdec3a1f in linux 5.10.y/5.10.90 b7865173cf6ae59942e2c69326a06e1c1df5ecf6 in mainline linux
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/vcn_v1_0.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/vcn_v1_0.c b/sys/dev/pci/drm/amd/amdgpu/vcn_v1_0.c
index 5f800c325e3..c0986099ee0 100644
--- a/sys/dev/pci/drm/amd/amdgpu/vcn_v1_0.c
+++ b/sys/dev/pci/drm/amd/amdgpu/vcn_v1_0.c
@@ -260,6 +260,13 @@ static int vcn_v1_0_suspend(void *handle)
{
int r;
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+ bool idle_work_unexecuted;
+
+ idle_work_unexecuted = cancel_delayed_work_sync(&adev->vcn.idle_work);
+ if (idle_work_unexecuted) {
+ if (adev->pm.dpm_enabled)
+ amdgpu_dpm_enable_uvd(adev, false);
+ }
r = vcn_v1_0_hw_fini(adev);
if (r)