summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vc4/vc4_debugfs.c
diff options
context:
space:
mode:
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>2019-02-20 18:51:24 +0300
committerMaxime Ripard <maxime.ripard@bootlin.com>2019-03-06 16:48:07 +0300
commit6b5c029df5e40704a6642e026e709dd0dec44622 (patch)
treeced9d04d7004319164bd32c42ada01316ecd10a0 /drivers/gpu/drm/vc4/vc4_debugfs.c
parent4686da83154d87be6e754ddc68e4ac89b0027ea9 (diff)
downloadlinux-6b5c029df5e40704a6642e026e709dd0dec44622.tar.xz
drm/vc4: Add a debugfs entry to disable/enable the load tracker
In order to test whether the load tracker is working as expected, we need the ability to compare the commit result with the underrun indication. With the load tracker always enabled, commits that are expected to trigger an underrun are always rejected, so userspace cannot get the actual underrun indication from the hardware. Add a debugfs entry to disable/enable the load tracker, so that a DRM commit expected to trigger an underrun can go through with the load tracker disabled. The underrun indication is then available to userspace and can be checked against the commit result with the load tracker enabled. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190220155124.25022-4-paul.kocialkowski@bootlin.com
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_debugfs.c')
-rw-r--r--drivers/gpu/drm/vc4/vc4_debugfs.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_debugfs.c b/drivers/gpu/drm/vc4/vc4_debugfs.c
index 64021bcba041..59cdad89f844 100644
--- a/drivers/gpu/drm/vc4/vc4_debugfs.c
+++ b/drivers/gpu/drm/vc4/vc4_debugfs.c
@@ -36,6 +36,15 @@ static const struct drm_info_list vc4_debugfs_list[] = {
int
vc4_debugfs_init(struct drm_minor *minor)
{
+ struct vc4_dev *vc4 = to_vc4_dev(minor->dev);
+ struct dentry *dentry;
+
+ dentry = debugfs_create_bool("hvs_load_tracker", S_IRUGO | S_IWUSR,
+ minor->debugfs_root,
+ &vc4->load_tracker_enabled);
+ if (!dentry)
+ return -ENOMEM;
+
return drm_debugfs_create_files(vc4_debugfs_list, VC4_DEBUGFS_ENTRIES,
minor->debugfs_root, minor);
}