summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/imagination/pvr_debugfs.h
diff options
context:
space:
mode:
authorSarah Walker <sarah.walker@imgtec.com>2023-11-22 19:34:40 +0300
committerMaxime Ripard <mripard@kernel.org>2023-11-23 11:01:47 +0300
commitcb56cd61086645e46cc54d1837de803b1c471df6 (patch)
tree7bdd4867f91de6ecc7ae8d27d2a34c8ffb338c1c /drivers/gpu/drm/imagination/pvr_debugfs.h
parent6b17baabf6d306f85021b9a081dcd0a1a5c6f846 (diff)
downloadlinux-cb56cd61086645e46cc54d1837de803b1c471df6.tar.xz
drm/imagination: Add firmware trace to debugfs
Firmware trace is exposed at /sys/debug/dri/<dev_nr>/pvr_fw/trace_0. Trace is enabled via the group mask at /sys/debug/dri/<dev_nr>/pvr_params/fw_trace_mask. Changes since v8: - Corrected license identifiers Changes since v3: - Use drm_dev_{enter,exit} Co-developed-by: Matt Coster <matt.coster@imgtec.com> Signed-off-by: Matt Coster <matt.coster@imgtec.com> Signed-off-by: Sarah Walker <sarah.walker@imgtec.com> Signed-off-by: Donald Robson <donald.robson@imgtec.com> Link: https://lore.kernel.org/r/009cf9fee347fa96c8a665dc368fc54a5ffceff0.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/imagination/pvr_debugfs.h')
-rw-r--r--drivers/gpu/drm/imagination/pvr_debugfs.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/gpu/drm/imagination/pvr_debugfs.h b/drivers/gpu/drm/imagination/pvr_debugfs.h
new file mode 100644
index 000000000000..ebacbd13b84a
--- /dev/null
+++ b/drivers/gpu/drm/imagination/pvr_debugfs.h
@@ -0,0 +1,29 @@
+/* SPDX-License-Identifier: GPL-2.0-only OR MIT */
+/* Copyright (c) 2023 Imagination Technologies Ltd. */
+
+#ifndef PVR_DEBUGFS_H
+#define PVR_DEBUGFS_H
+
+/* Forward declaration from <drm/drm_drv.h>. */
+struct drm_minor;
+
+#if defined(CONFIG_DEBUG_FS)
+/* Forward declaration from "pvr_device.h". */
+struct pvr_device;
+
+/* Forward declaration from <linux/dcache.h>. */
+struct dentry;
+
+struct pvr_debugfs_entry {
+ const char *name;
+ void (*init)(struct pvr_device *pvr_dev, struct dentry *dir);
+};
+
+void pvr_debugfs_init(struct drm_minor *minor);
+#else /* defined(CONFIG_DEBUG_FS) */
+#include <linux/compiler_attributes.h>
+
+static __always_inline void pvr_debugfs_init(struct drm_minor *minor) {}
+#endif /* defined(CONFIG_DEBUG_FS) */
+
+#endif /* PVR_DEBUGFS_H */