summaryrefslogtreecommitdiff
path: root/drivers/staging/omapdrm/omap_debugfs.c
diff options
context:
space:
mode:
authorAndy Gross <andy.gross@ti.com>2011-12-16 07:05:17 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-12-16 22:59:26 +0400
commit6169a1488fe2f76e80bd49c18e41be5bbbf29f3f (patch)
tree671ba667b57529010a8d3ce9e0ced299d814c3c7 /drivers/staging/omapdrm/omap_debugfs.c
parentaf69592aa098ff8cd640e8109ba946db3c1cdb4e (diff)
downloadlinux-6169a1488fe2f76e80bd49c18e41be5bbbf29f3f.tar.xz
staging: drm/omap: add debugfs support
Right now just a tiler_map file to dump a 2d map of which areas in tiler/dmm have pinned buffers (or reservations). In the future more could be added. Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/omapdrm/omap_debugfs.c')
-rw-r--r--drivers/staging/omapdrm/omap_debugfs.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/drivers/staging/omapdrm/omap_debugfs.c b/drivers/staging/omapdrm/omap_debugfs.c
new file mode 100644
index 000000000000..da920dfdc59c
--- /dev/null
+++ b/drivers/staging/omapdrm/omap_debugfs.c
@@ -0,0 +1,42 @@
+/*
+ * drivers/staging/omapdrm/omap_debugfs.c
+ *
+ * Copyright (C) 2011 Texas Instruments
+ * Author: Rob Clark <rob.clark@linaro.org>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "omap_drv.h"
+#include "omap_dmm_tiler.h"
+
+#ifdef CONFIG_DEBUG_FS
+
+static struct drm_info_list omap_debugfs_list[] = {
+ {"tiler_map", tiler_map_show, 0},
+};
+
+int omap_debugfs_init(struct drm_minor *minor)
+{
+ return drm_debugfs_create_files(omap_debugfs_list,
+ ARRAY_SIZE(omap_debugfs_list),
+ minor->debugfs_root, minor);
+}
+
+void omap_debugfs_cleanup(struct drm_minor *minor)
+{
+ drm_debugfs_remove_files(omap_debugfs_list,
+ ARRAY_SIZE(omap_debugfs_list), minor);
+}
+
+#endif