summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Widawsky <ben@bwidawsk.net>2012-02-26 12:40:18 +0100
committerBen Widawsky <ben@bwidawsk.net>2012-03-04 16:30:04 +0100
commit2d6118c5baee031b762a1013684288b24e391c66 (patch)
treececc6bdd4a203dc259a4be079c013e51facec6cf
parentcd2be72a22baa86d8d97c8b35b334da92fc412c2 (diff)
drm/vgem: add debugfs stuffvgem
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
-rw-r--r--drivers/gpu/drm/vgem/vgem_drv.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
index faa61927e4e0..f59d4ace302a 100644
--- a/drivers/gpu/drm/vgem/vgem_drv.c
+++ b/drivers/gpu/drm/vgem/vgem_drv.c
@@ -42,6 +42,19 @@
#define DRIVER_MAJOR 1
#define DRIVER_MINOR 0
+#ifdef CONFIG_DEBUG_FS
+static struct drm_info_list vgem_debugfs_list[] = {
+};
+#define VGEM_DEBUGFS_ENTRIES ARRAY_SIZE(vgem_debugfs_list)
+
+int vgem_debugfs_init(struct drm_minor *minor)
+{
+ return drm_debugfs_create_files(vgem_debugfs_list,
+ VGEM_DEBUGFS_ENTRIES,
+ minor->debugfs_root, minor);
+}
+#endif
+
static int vgem_load(struct drm_device *dev, unsigned long flags)
{
struct drm_vgem_private *dev_priv;
@@ -320,6 +333,9 @@ static struct drm_driver vgem_driver = {
.open = vgem_open,
.preclose = vgem_preclose,
.lastclose = vgem_lastclose,
+
+ .debugfs_init = vgem_debugfs_init,
+
.gem_init_object = vgem_gem_init_object,
.gem_free_object = vgem_gem_free_object,
.gem_vm_ops = &vgem_gem_vm_ops,