summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_info.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-09-15 19:55:55 +1000
committerDave Airlie <airlied@redhat.com>2014-09-15 19:55:55 +1000
commit19524f7c59c19854caf5b82d89bc558e38da5790 (patch)
tree92abeba64bc3aa9f4bde7e6d98d8215602069b18 /drivers/gpu/drm/drm_info.c
parent98faa78ce7f1f986e11e7805d31b409782a6d2d4 (diff)
parentd0fa1af40e784aaf7ebb7ba8a17b229bb3fa4c21 (diff)
downloadblackbird-op-linux-19524f7c59c19854caf5b82d89bc558e38da5790.tar.gz
blackbird-op-linux-19524f7c59c19854caf5b82d89bc558e38da5790.zip
Merge tag 'topic/core-stuff-2014-09-15' of git://anongit.freedesktop.org/drm-intel into drm-next
Here's the updated topic/core-stuff pull request with the two patches already merged into drm-fixes dropped. * tag 'topic/core-stuff-2014-09-15' of git://anongit.freedesktop.org/drm-intel: drm: Drop modeset locking from crtc init function drm/i915/hdmi: Enable pipe pixel replication for SD interlaced modes drm/edid: Reduce horizontal timings for pixel replicated modes drm: Include task->name and master status in debugfs clients info drm/gem: Fix kerneldoc typo drm: use c99 initializers in structures drm: fix drm_modeset_lock.h kernel-doc notation
Diffstat (limited to 'drivers/gpu/drm/drm_info.c')
-rw-r--r--drivers/gpu/drm/drm_info.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_info.c b/drivers/gpu/drm/drm_info.c
index 7a8e5a9d8f54..0780541f7935 100644
--- a/drivers/gpu/drm/drm_info.c
+++ b/drivers/gpu/drm/drm_info.c
@@ -184,15 +184,32 @@ int drm_clients_info(struct seq_file *m, void *data)
struct drm_device *dev = node->minor->dev;
struct drm_file *priv;
+ seq_printf(m,
+ "%20s %5s %3s master a %5s %10s\n",
+ "command",
+ "pid",
+ "dev",
+ "uid",
+ "magic");
+
+ /* dev->filelist is sorted youngest first, but we want to present
+ * oldest first (i.e. kernel, servers, clients), so walk backwardss.
+ */
mutex_lock(&dev->struct_mutex);
- seq_printf(m, "a dev pid uid magic\n\n");
- list_for_each_entry(priv, &dev->filelist, lhead) {
- seq_printf(m, "%c %3d %5d %5d %10u\n",
- priv->authenticated ? 'y' : 'n',
- priv->minor->index,
+ list_for_each_entry_reverse(priv, &dev->filelist, lhead) {
+ struct task_struct *task;
+
+ rcu_read_lock(); /* locks pid_task()->comm */
+ task = pid_task(priv->pid, PIDTYPE_PID);
+ seq_printf(m, "%20s %5d %3d %c %c %5d %10u\n",
+ task ? task->comm : "<unknown>",
pid_vnr(priv->pid),
+ priv->minor->index,
+ priv->is_master ? 'y' : 'n',
+ priv->authenticated ? 'y' : 'n',
from_kuid_munged(seq_user_ns(m), priv->uid),
priv->magic);
+ rcu_read_unlock();
}
mutex_unlock(&dev->struct_mutex);
return 0;
OpenPOWER on IntegriCloud