From: Guilherme G. Piccoli Date: Tue, 9 May 2023 16:49:47 +0000 (+0200) Subject: drm/amdgpu/gfx11: Adjust gfxoff before powergating on gfx11 as well X-Git-Tag: v6.6.7~2401^2~12^2~643 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ee30b8001cd85ba0ef287b216eb1dad58bb58159;p=platform%2Fkernel%2Flinux-starfive.git drm/amdgpu/gfx11: Adjust gfxoff before powergating on gfx11 as well (Bas: speculative change to mirror gfx10/gfx9) Signed-off-by: Guilherme G. Piccoli Signed-off-by: Bas Nieuwenhuizen Cc: Alex Deucher Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c index 7bff50e..f77779c 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c @@ -5076,8 +5076,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;