[Intel-gfx] [PATCH 1/2] drm/i915/params: add i915 parameters to debugfs

Jani Nikula jani.nikula at intel.com
Wed Jan 15 10:39:08 UTC 2020


On Wed, 15 Jan 2020, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> Quoting Jani Nikula (2019-12-05 15:43:40)
>> 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.
>
> Right, creates a mirror [more or less] of /sys/module/i915/parameters. I
> probably would have used parameters/ rather than i915_params/, but that
> is immaterial.

I guess I used i915_ because it's sort of a shared namespace with drm
core, which in itself is, IMO, a historical mistake. Perhaps there
should've been a driver/ debugfs directory for driver specific debug
files.

What if someone wanted to add a drm core level parameters/ file or
directory? Would be kind of embarrassing to say, don't do that, i915
already uses it...

>> 
>> 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.
>
> The patch does what you say, hopefully a local entropy maxima.
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

Many thanks,
Jani.

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list