From 49194f6627925ed265e9f93d7bdba225915a0471 Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 24 Feb 2022 12:57:15 +0000 Subject: [PATCH] drm/amdgpu: skipping SDMA hw_init and hw_fini for S0ix. From Rajib Mahapatra 960c8a55016bece26140eef7a8077e9dc3709098 in linux 5.15.y/5.15.25 f8f4e2a518347063179def4e64580b2d28233d03 in mainline linux --- sys/dev/pci/drm/amd/amdgpu/sdma_v4_0.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/dev/pci/drm/amd/amdgpu/sdma_v4_0.c b/sys/dev/pci/drm/amd/amdgpu/sdma_v4_0.c index 4e2df082aa5..7085d8a8d36 100644 --- a/sys/dev/pci/drm/amd/amdgpu/sdma_v4_0.c +++ b/sys/dev/pci/drm/amd/amdgpu/sdma_v4_0.c @@ -2062,6 +2062,10 @@ static int sdma_v4_0_suspend(void *handle) { struct amdgpu_device *adev = (struct amdgpu_device *)handle; + /* SMU saves SDMA state for us */ + if (adev->in_s0ix) + return 0; + return sdma_v4_0_hw_fini(adev); } @@ -2069,6 +2073,10 @@ static int sdma_v4_0_resume(void *handle) { struct amdgpu_device *adev = (struct amdgpu_device *)handle; + /* SMU restores SDMA state for us */ + if (adev->in_s0ix) + return 0; + return sdma_v4_0_hw_init(adev); } -- 2.20.1