On Tue, 30 Aug 2022, Jani Nikula <jani.nikula@xxxxxxxxx> wrote: > On Tue, 30 Aug 2022, Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> wrote: >> On Tue, Aug 30, 2022 at 01:27:56PM +0300, Jani Nikula wrote: >>> The register macros are the last holdout for implicit dev_priv local >>> variable. Try out what it would mean to stop using it, and require >>> passing i915 as parameter to the register macros. Use gmbus as a nicely >>> isolated playing ground. >>> >>> Jani Nikula (6): >>> drm/i915/gmbus: split out gmbus regs in a separate file >>> drm/i915/gmbus: whitespace cleanup in reg definitions >>> drm/i915/gmbus: add wrapper for gmbus mmio base >>> drm/i915/gmbus: stop using implicit dev_priv in register definitions >>> drm/i915/reg: stop using implicit dev_priv in DSPCLK_GATE_D >>> drm/i915/gmbus: mass dev_priv -> i915 rename >> >> Looks reasonable enough to me. Just wondering when I'll start >> getting annoyed at not finding something in i915_reg.h :) > > That's a risk. :) > > The flip side is, I've actually liked to see how few places really need > each of the new *_regs.h files. It's almost an indication the design is > wrong if more than a couple .c files include the same regs file. > >> Series is >> Reviewed-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > > Thanks! And pushed to drm-intel-next. BR, Jani. > > Jani. > >> >>> >>> .../i915/display/intel_display_power_well.c | 4 +- >>> drivers/gpu/drm/i915/display/intel_gmbus.c | 275 +++++++++--------- >>> .../gpu/drm/i915/display/intel_gmbus_regs.h | 81 ++++++ >>> drivers/gpu/drm/i915/display/intel_overlay.c | 4 +- >>> drivers/gpu/drm/i915/display/vlv_dsi.c | 8 +- >>> drivers/gpu/drm/i915/gvt/edid.c | 3 +- >>> drivers/gpu/drm/i915/i915_reg.h | 65 +---- >>> drivers/gpu/drm/i915/intel_pm.c | 4 +- >>> 8 files changed, 232 insertions(+), 212 deletions(-) >>> create mode 100644 drivers/gpu/drm/i915/display/intel_gmbus_regs.h >>> >>> -- >>> 2.34.1 -- Jani Nikula, Intel Open Source Graphics Center