On 9/19/2024 10:17 PM, Alex Deucher wrote:
Need to make sure it's halted as we don't know what state
the GPU may have been left in previously.
Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
---
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index d4f19eb8ff6d3..3a3ef93f2f43a 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -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;
This is a precautionary measure to make sure that the GPU is in a known
state before the driver attempts to initialize it. Adds calls to
gfx_v9_0_cp_gfx_enable and gfx_v9_0_cp_compute_enable with enable set to
false to halt the CP before the KIQ (Kernel Interface Queue) is resumed.
Reviewed-by: Srinivasan Shanmugam <srinivasan.shanmugam@xxxxxxx>