[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z8HO-s_otb2u44V7@black.fi.intel.com>
Date: Fri, 28 Feb 2025 16:58:02 +0200
From: Raag Jadav <raag.jadav@...el.com>
To: André Almeida <andrealmeid@...lia.com>
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
kernel-dev@...lia.com, amd-gfx@...ts.freedesktop.org,
intel-xe@...ts.freedesktop.org, intel-gfx@...ts.freedesktop.org,
Alex Deucher <alexander.deucher@....com>,
'Christian König' <christian.koenig@....com>,
siqueira@...lia.com, airlied@...il.com, simona@...ll.ch,
rodrigo.vivi@...el.com, jani.nikula@...ux.intel.com
Subject: Re: [PATCH 2/2] drm/amdgpu: Make use of drm_wedge_app_info
On Fri, Feb 28, 2025 at 09:13:53AM -0300, André Almeida wrote:
> To notify userspace about which app (if any) made the device get in a
> wedge state, make use of drm_wedge_app_info parameter, filling it with
> the app PID and name.
>
> Signed-off-by: André Almeida <andrealmeid@...lia.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19 +++++++++++++++++--
> drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 6 +++++-
> 2 files changed, 22 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 00b9b87dafd8..e06adf6f34fd 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -6123,8 +6123,23 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
>
> atomic_set(&adev->reset_domain->reset_res, r);
>
> - if (!r)
> - drm_dev_wedged_event(adev_to_drm(adev), DRM_WEDGE_RECOVERY_NONE, NULL);
> + if (!r) {
> + struct drm_wedge_app_info aux, *info = NULL;
> +
> + if (job) {
> + struct amdgpu_task_info *ti;
> +
> + ti = amdgpu_vm_get_task_info_pasid(adev, job->pasid);
> + if (ti) {
> + aux.pid = ti->pid;
> + aux.comm = ti->process_name;
> + info = &aux;
> + amdgpu_vm_put_task_info(ti);
> + }
> + }
Is this guaranteed to be guilty app and not some scheduled worker?
Raag
Powered by blists - more mailing lists