diff options
author | Jani Nikula <jani.nikula@intel.com> | 2019-12-05 18:43:40 +0300 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2020-01-15 16:10:16 +0300 |
commit | c43c5a8818d4c399e38f636495fb02a8ff8a029a (patch) | |
tree | 8e3c1cf75e2e9cb435b2715bbedbeb114efe4f4e /drivers/gpu/drm/i915/i915_debugfs.c | |
parent | f22fd334890e0e24305aaa7249ff56baba082eca (diff) | |
download | linux-c43c5a8818d4c399e38f636495fb02a8ff8a029a.tar.xz |
drm/i915/params: add i915 parameters to debugfs
Add a debugfs subdirectory i915_params with all the i915 module
parameters. This is a first step, with lots of boilerplate, and not much
benefit yet.
This will result in a new device specific debugfs directory at
/sys/kernel/debug/dri/<N>/i915_params duplicating the module specific
sysfs directory at /sys/module/i915/parameters/. Going forward, all
users of the parameters should use the debugfs, with the module
parameters being phased out.
Add debugfs permissions to I915_PARAMS_FOR_EACH(). This duplicates the
mode with module parameter sysfs, but the goal is to make the module
parameters read-only initial values for device specific parameters.
0 mode will bypass debugfs creation. Use it for verbose_state_checks
which will need special attention in follow-up work.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/600101c8433e7caf9303663fc85a9972fa1f05e7.1575560168.git.jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_debugfs.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_debugfs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index d5a9b8a964c2..c05fa4205de8 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -48,6 +48,7 @@ #include "gt/uc/intel_guc_submission.h" #include "i915_debugfs.h" +#include "i915_debugfs_params.h" #include "i915_irq.h" #include "i915_trace.h" #include "intel_csr.h" @@ -4311,9 +4312,10 @@ int i915_debugfs_register(struct drm_i915_private *dev_priv) struct drm_minor *minor = dev_priv->drm.primary; int i; + i915_debugfs_params(dev_priv); + debugfs_create_file("i915_forcewake_user", S_IRUSR, minor->debugfs_root, to_i915(minor->dev), &i915_forcewake_fops); - for (i = 0; i < ARRAY_SIZE(i915_debugfs_files); i++) { debugfs_create_file(i915_debugfs_files[i].name, S_IRUGO | S_IWUSR, |