]> git.itanic.dy.fi Git - linux-stable/commitdiff
drm/amdgpu/gfx11: Adjust gfxoff before powergating on gfx11 as well
authorGuilherme G. Piccoli <gpiccoli@igalia.com>
Tue, 9 May 2023 16:49:47 +0000 (18:49 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 18 May 2023 13:54:49 +0000 (09:54 -0400)
(Bas: speculative change to mirror gfx10/gfx9)

Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org # 6.1.x
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c

index db2543d8fde9e097af4eeacf96c641567cea79b6..c4940b6ea1c4ccd8b82a6df1d91fcf0fedacce47 100644 (file)
@@ -5153,8 +5153,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;