From: jsg Date: Mon, 17 Apr 2023 05:19:09 +0000 (+0000) Subject: drm/amdgpu: for S0ix, skip SDMA 5.x+ suspend/resume X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=955b80406aa84927c695d2086b8e4340b3b838e1;p=openbsd drm/amdgpu: for S0ix, skip SDMA 5.x+ suspend/resume From Alex Deucher 73ca74fc7ab6c1679c3b2720579c0c20b73a9764 in linux-6.1.y/6.1.24 2a7798ea7390fd78f191c9e9bf68f5581d3b4a02 in mainline linux --- diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c index 9149a5d7f79..c68e881a93b 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c @@ -3066,6 +3066,12 @@ static int amdgpu_device_ip_suspend_phase2(struct amdgpu_device *adev) adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_MES)) continue; + /* SDMA 5.x+ is part of GFX power domain so it's covered by GFXOFF */ + if (adev->in_s0ix && + (adev->ip_versions[SDMA0_HWIP][0] >= IP_VERSION(5, 0, 0)) && + (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_SDMA)) + continue; + /* XXX handle errors */ r = adev->ip_blocks[i].version->funcs->suspend(adev); /* XXX handle errors */