public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 0/1] Start cleaning up register definitions
@ 2022-01-06 23:08 Matt Roper
  2022-01-06 23:08 ` [Intel-gfx] [PATCH 1/1] drm/i915: Drop unused " Matt Roper
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Matt Roper @ 2022-01-06 23:08 UTC (permalink / raw)
  To: intel-gfx; +Cc: Lucas De Marchi

Our i915_reg.h file has become a huge unwieldy mess over the years.  A
lot of definitions don't follow any logical ordering, there's
unintentional duplication of registers under different names, the coding
style is very inconsistent, and there's tons of unused definitions
(nearly a quarter of i915_reg.h is dead code!).  This makes it a pain to
work with and also needlessly slows down development since any trivial
change to i915_reg.h forces us to unnecessarily rebuild the entire i915
driver instead of just the affected are of the code.

I'd like to start cleaning up the register definitions in a few steps:
 (1) Eliminate unnused register and bit definitions.  Some of these may
     get re-added in the future if/when code starts using them but
     that's fine; we'd prefer to carefully (re)review the register
     definitions at that time anyway.
 (2) Move registers exclusive to the command parser to their own header
 (3) Move OA registers to their own header
 (4) Move GT registers to their own header
 (5) Move display registers to their own header
 (6) While moving things to new files, take the opportunity to also
     update to update to a consistent coding style:  consistent
     indentation, consistent case for hex values, use of
     REG_BIT/REG_GENMASK, etc.

This will make it easier to find an appropriate place to add new
registers and should also improve quality of life for developers since
driver builds will be faster in cases where a register is added/updated
and only a specific part of the driver needs to be rebuilt.

This only includes step (1) above; the other steps will come as
follow-up patches if there's no concern with the general goal.

Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>

Matt Roper (1):
  drm/i915: Drop unused register definitions

 drivers/gpu/drm/i915/i915_reg.h | 3107 +------------------------------
 1 file changed, 9 insertions(+), 3098 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-01-10 16:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-06 23:08 [Intel-gfx] [PATCH 0/1] Start cleaning up register definitions Matt Roper
2022-01-06 23:08 ` [Intel-gfx] [PATCH 1/1] drm/i915: Drop unused " Matt Roper
2022-01-07 10:46   ` Jani Nikula
2022-01-07 16:46     ` Lucas De Marchi
2022-01-10 10:55       ` Jani Nikula
2022-01-10 16:11         ` Lucas De Marchi
2022-01-06 23:39 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Start cleaning up " Patchwork
2022-01-06 23:40 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-01-07  0:13 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-01-07  9:34 ` [Intel-gfx] [PATCH 0/1] " Jani Nikula
2022-01-07  9:53   ` Jani Nikula
2022-01-07 16:14 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox