[Intel-gfx] [PATCH 11/20] drm/i915/fbc: Move FBC debugfs stuff into intel_fbc.c

Ville Syrjälä ville.syrjala at linux.intel.com
Thu Nov 25 09:43:40 UTC 2021


On Wed, Nov 24, 2021 at 05:43:52PM +0200, Jani Nikula wrote:
> On Wed, 24 Nov 2021, Ville Syrjala <ville.syrjala at linux.intel.com> wrote:
> > From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> >
> > In order to encapsulate FBC harder let's just move the debugfs
> > stuff into intel_fbc.c.
> 
> Mmmh, I've kind of moved towards a split where i915_debugfs.c and
> intel_display_debugfs.c have all the debugfs boilerplate, while the
> implementation files have the guts with struct drm_i915_private *i915
> (or something more specific) and struct seq_file *m passed in.
> 
> In some ways the split is arbitrary, but I kind of find the debugfs
> boilerplate a distraction in the implementation files, and we also skip
> building the debugfs files completely for CONFIG_DEBUG_FS=n. I don't
> think I'd want to add #ifdefs on that spread around either.

If we want to keep the debugfs in a separate file then we'll have to
expose the guts of the FBC implementation in intel_fbc.h (or some other
header) just for that, or we add a whole bunch of otherwise useless
functions that pretend to provide some higher level of abstraction.

Not really a fan of either of those options.

-- 
Ville Syrjälä
Intel


More information about the Intel-gfx mailing list