drm/amdgpu: Fix jpeg ring test order in vcn_v4_0_3

Fix the vcn reset sequence in vcn_v4_0_3_ring_reset() to restore
JPEG power state and unlock the JPEG powergating mutex before
running the JPEG ring post-reset helper.

Fixes: d25c67fd9d ("drm/amdgpu/vcn4.0.3: rework reset handling")
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Jesse Zhang <jesse.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Jesse.Zhang 2026-01-27 15:01:27 +08:00 committed by Alex Deucher
parent 7a3fbdfd19
commit 91544c45fa

View File

@ -1742,11 +1742,11 @@ static int vcn_v4_0_3_ring_reset(struct amdgpu_ring *ring,
goto unlock;
}
r = vcn_v4_0_3_reset_jpeg_post_helper(adev, ring->me);
if (pg_state)
amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_JPEG,
AMD_PG_STATE_GATE);
mutex_unlock(&adev->jpeg.jpeg_pg_lock);
r = vcn_v4_0_3_reset_jpeg_post_helper(adev, ring->me);
unlock:
mutex_unlock(&vinst->engine_reset_mutex);