[PATCH 08/36] drm/amdgpu/vcn4: add additional ring reset error checking

Mario Limonciello mario.limonciello at amd.com
Mon Jul 7 19:04:59 UTC 2025


On 7/7/2025 3:03 PM, Alex Deucher wrote:
> Start and stop can fail, so add checks.
> 
> Fixes: b8b6e6f1654d ("drm/amd: Add per-ring reset for vcn v4.0.0 use")
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> Cc: Mario Limonciello <mario.limonciello at amd.com>
Reviewed-by: Mario Limonciello <mari.limonciello at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
> index eec9133e1b2c4..5bbce8544fef0 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
> @@ -1979,8 +1979,12 @@ static int vcn_v4_0_ring_reset(struct amdgpu_ring *ring,
>   		return -EOPNOTSUPP;
>   
>   	drm_sched_wqueue_stop(&ring->sched);
> -	vcn_v4_0_stop(vinst);
> -	vcn_v4_0_start(vinst);
> +	r = vcn_v4_0_stop(vinst);
> +	if (r)
> +		return r;
> +	r = vcn_v4_0_start(vinst);
> +	if (r)
> +		return r;
>   
>   	r = amdgpu_ring_test_helper(ring);
>   	if (r)



More information about the amd-gfx mailing list