[PATCH 1/1] drm/amdgpu: Use device wedged event

Lazar, Lijo lijo.lazar at amd.com
Fri Dec 13 15:31:54 UTC 2024



On 12/13/2024 12:39 AM, André Almeida wrote:
> Use DRM's device wedged event to notify userspace that a reset had
> happened. For now, only use `none` method meant for telemetry
> capture.
> 
> Signed-off-by: André Almeida <andrealmeid at igalia.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 96316111300a..19e1a5493778 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -6057,6 +6057,9 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
>  		dev_info(adev->dev, "GPU reset end with ret = %d\n", r);
>  
>  	atomic_set(&adev->reset_domain->reset_res, r);
> +
> +	drm_dev_wedged_event(adev_to_drm(adev), DRM_WEDGE_RECOVERY_NONE);

The usage we have in amd with a different mechanism also provides with
the user a reason of the reset. Is that mechanism available in this? It
seems this only states device has taken a reset with no other context.

Thanks,
Lijo

> +
>  	return r;
>  }
>  



More information about the amd-gfx mailing list