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

Christian König christian.koenig at amd.com
Thu Jun 12 12:37:07 UTC 2025


I finally found time to push this to drm-misc-next.

Sorry for the delay.

Regards,
Christian.

On 5/30/25 08:29, 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.
> 
> v2: Swapped client id and client name order [Chrisitan]
> 
> Signed-off-by: Sunil Khatri <sunil.khatri at amd.com>
> Reviewed-by: Christian König <christian.koenig 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..06ba6dcbf5ae 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-id:%llu client: %s ... %pV",
> +		task ? task->comm : "Unset",
> +		task ? task->pid : 0, file_priv->client_id,
> +		file_priv->client_name ?: "Unset", &vaf);
>  
>  	va_end(args);
>  	rcu_read_unlock();



More information about the dri-devel mailing list