Skip to content

Commit

Permalink
drm/amdgpu/gfx10: Disable gfxoff before disabling powergating.
Browse files Browse the repository at this point in the history
commit 8173cab upstream.

Otherwise we get a full system lock (looks like a FW mess).

Copied the order from the GFX9 powergating code.

Fixes: 366468f ("drm/amdgpu: Allow GfxOff on Vangogh as default")
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2545
Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
BNieuwenhuizen authored and gregkh committed May 24, 2023
1 parent 9de5a98 commit abfe2ff
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
Original file line number Diff line number Diff line change
Expand Up @@ -8236,8 +8236,14 @@ static int gfx_v10_0_set_powergating_state(void *handle,
case IP_VERSION(10, 3, 3):
case IP_VERSION(10, 3, 6):
case IP_VERSION(10, 3, 7):
if (!enable)
amdgpu_gfx_off_ctrl(adev, false);

gfx_v10_cntl_pg(adev, enable);
amdgpu_gfx_off_ctrl(adev, enable);

if (enable)
amdgpu_gfx_off_ctrl(adev, true);

break;
default:
break;
Expand Down

0 comments on commit abfe2ff

Please sign in to comment.