From: jsg Date: Thu, 15 Jun 2023 03:11:03 +0000 (+0000) Subject: drm/amdgpu/gfx11: Adjust gfxoff before powergating on gfx11 as well X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0bf6b753108548a21371e49f2174b837c9db074e;p=openbsd 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 --- 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;