drm: print the current->comm alongside the pid
The question of "what process is this pid" keeps on popping up, so lets print the process name alongside the pid. Cc: Mauro Rossi <issor.oruam@gmail.com> Cc: Bob Beckett <bob.beckett@collabora.com> Cc: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20200518083315.129948-1-emil.l.velikov@gmail.com
This commit is contained in:

committed by
Emil Velikov

parent
ab15d56e27
commit
5a2ba99222
@@ -253,8 +253,8 @@ void drm_file_free(struct drm_file *file)
|
||||
|
||||
dev = file->minor->dev;
|
||||
|
||||
DRM_DEBUG("pid = %d, device = 0x%lx, open_count = %d\n",
|
||||
task_pid_nr(current),
|
||||
DRM_DEBUG("comm=\"%s\", pid=%d, dev=0x%lx, open_count=%d\n",
|
||||
current->comm, task_pid_nr(current),
|
||||
(long)old_encode_dev(file->minor->kdev->devt),
|
||||
atomic_read(&dev->open_count));
|
||||
|
||||
@@ -345,7 +345,8 @@ static int drm_open_helper(struct file *filp, struct drm_minor *minor)
|
||||
if (dev->switch_power_state != DRM_SWITCH_POWER_ON && dev->switch_power_state != DRM_SWITCH_POWER_DYNAMIC_OFF)
|
||||
return -EINVAL;
|
||||
|
||||
DRM_DEBUG("pid = %d, minor = %d\n", task_pid_nr(current), minor->index);
|
||||
DRM_DEBUG("comm=\"%s\", pid=%d, minor=%d\n", current->comm,
|
||||
task_pid_nr(current), minor->index);
|
||||
|
||||
priv = drm_file_alloc(minor);
|
||||
if (IS_ERR(priv))
|
||||
|
Reference in New Issue
Block a user