linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm: Print the pid when debug logging an ioctl error.
@ 2018-01-30 21:56 Eric Anholt
  2018-01-31  8:07 ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Anholt @ 2018-01-30 21:56 UTC (permalink / raw)
  To: dri-devel; +Cc: linux-kernel, Eric Anholt

When we debug print what ioctl we're calling into, we include the pid.
If you have multiple processes rendering simulataneously, the error
return also needs the pid so you can see which of the ioctl calls was
the one to fail.

Signed-off-by: Eric Anholt <eric@anholt.net>
---
 drivers/gpu/drm/drm_ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index a9ae6dd2d593..38c302607738 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -842,7 +842,7 @@ long drm_ioctl(struct file *filp,
 	if (kdata != stack_kdata)
 		kfree(kdata);
 	if (retcode)
-		DRM_DEBUG("ret = %d\n", retcode);
+		DRM_DEBUG("pid=%d, ret = %d\n", task_pid_nr(current), retcode);
 	return retcode;
 }
 EXPORT_SYMBOL(drm_ioctl);
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm: Print the pid when debug logging an ioctl error.
  2018-01-30 21:56 [PATCH] drm: Print the pid when debug logging an ioctl error Eric Anholt
@ 2018-01-31  8:07 ` Daniel Vetter
  2018-02-11 10:07   ` Eric Anholt
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Vetter @ 2018-01-31  8:07 UTC (permalink / raw)
  To: Eric Anholt; +Cc: dri-devel, linux-kernel

On Tue, Jan 30, 2018 at 01:56:43PM -0800, Eric Anholt wrote:
> When we debug print what ioctl we're calling into, we include the pid.
> If you have multiple processes rendering simulataneously, the error
> return also needs the pid so you can see which of the ioctl calls was
> the one to fail.
> 
> Signed-off-by: Eric Anholt <eric@anholt.net>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  drivers/gpu/drm/drm_ioctl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
> index a9ae6dd2d593..38c302607738 100644
> --- a/drivers/gpu/drm/drm_ioctl.c
> +++ b/drivers/gpu/drm/drm_ioctl.c
> @@ -842,7 +842,7 @@ long drm_ioctl(struct file *filp,
>  	if (kdata != stack_kdata)
>  		kfree(kdata);
>  	if (retcode)
> -		DRM_DEBUG("ret = %d\n", retcode);
> +		DRM_DEBUG("pid=%d, ret = %d\n", task_pid_nr(current), retcode);
>  	return retcode;
>  }
>  EXPORT_SYMBOL(drm_ioctl);
> -- 
> 2.15.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm: Print the pid when debug logging an ioctl error.
  2018-01-31  8:07 ` Daniel Vetter
@ 2018-02-11 10:07   ` Eric Anholt
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Anholt @ 2018-02-11 10:07 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: dri-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 481 bytes --]

Daniel Vetter <daniel@ffwll.ch> writes:

> On Tue, Jan 30, 2018 at 01:56:43PM -0800, Eric Anholt wrote:
>> When we debug print what ioctl we're calling into, we include the pid.
>> If you have multiple processes rendering simulataneously, the error
>> return also needs the pid so you can see which of the ioctl calls was
>> the one to fail.
>> 
>> Signed-off-by: Eric Anholt <eric@anholt.net>
>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Pushed.  Thanks!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-11 10:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-30 21:56 [PATCH] drm: Print the pid when debug logging an ioctl error Eric Anholt
2018-01-31  8:07 ` Daniel Vetter
2018-02-11 10:07   ` Eric Anholt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).