[PATCH 3/3] drm/file: add client id to drm_file_error

Khatri, Sunil Sunil.Khatri at amd.com
Wed May 28 13:12:51 UTC 2025


[AMD Official Use Only - AMD Internal Distribution Only]

-----Original Message-----
From: Koenig, Christian <Christian.Koenig at amd.com>
Sent: Wednesday, May 28, 2025 4:44 PM
To: Khatri, Sunil <Sunil.Khatri at amd.com>; dri-devel at lists.freedesktop.org; Tvrtko Ursulin <tvrtko.ursulin at igalia.com>; dmitry.osipenko at collabora.com; Pelloux-Prayer, Pierre-Eric <Pierre-eric.Pelloux-prayer at amd.com>
Subject: Re: [PATCH 3/3] drm/file: add client id to drm_file_error

On 5/28/25 09:43, Sunil Khatri wrote:
> Add client id to the drm_file_error api, client id is a unique id for
> each drm fd and is quite useful for debugging.
>
> Signed-off-by: Sunil Khatri <sunil.khatri at amd.com>
> ---
>  drivers/gpu/drm/drm_file.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c
> index dd351f601acd..2f6c0ebe0850 100644
> --- a/drivers/gpu/drm/drm_file.c
> +++ b/drivers/gpu/drm/drm_file.c
> @@ -1011,8 +1011,10 @@ void drm_file_err(struct drm_file *file_priv, const char *fmt, ...)
>       pid = rcu_dereference(file_priv->pid);
>       task = pid_task(pid, PIDTYPE_TGID);
>
> -     drm_err(dev, "comm: %s pid: %d client: %s ... %pV", task ? task->comm : "Unset",
> -             task ? task->pid : 0, file_priv->client_name ?: "Unset", &vaf);
> +     drm_err(dev, "comm: %s pid: %d client: %s client-id:%llu ... %pV",
> +             task ? task->comm : "Unset",
> +             task ? task->pid : 0, file_priv->client_name ?: "Unset",
> +             file_priv->client_id, &vaf);

Same comment as with the debugfs patch, client-id first and then name I would say.
Sure I will update and send a new patch.

Thanks
Sunil

Apart from that looks good to me.

Regards,
Christian.

>
>       va_end(args);
>       rcu_read_unlock();



More information about the dri-devel mailing list