]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu/gfx9: Explicitly halt CP before init
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 16 Sep 2024 17:21:02 +0000 (13:21 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 26 Sep 2024 21:06:18 +0000 (17:06 -0400)
Need to make sure it's halted as we don't know what state
the GPU may have been left in previously.

Reviewed-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

index d4f19eb8ff6d343660cf711165c55c1921ce7781..3a3ef93f2f43a74b47e534263922767ea3146066 100644 (file)
@@ -3931,6 +3931,10 @@ static int gfx_v9_0_cp_resume(struct amdgpu_device *adev)
                        return r;
        }
 
+       if (adev->gfx.num_gfx_rings)
+               gfx_v9_0_cp_gfx_enable(adev, false);
+       gfx_v9_0_cp_compute_enable(adev, false);
+
        r = gfx_v9_0_kiq_resume(adev);
        if (r)
                return r;