Skip to content

RFC drm/i915/registers: use standard bits.h and bitfield.h macros

Jani Nikula intel-gfx 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4drm/i915/registers: prefer GENMASK() over hand rolled masksdrivers/gpu/drm/i915/i915_reg.h+11 -111 reply
2/4drm/i915/registers: prefer BIT() for single bitsdrivers/gpu/drm/i915/i915_reg.h drivers/gpu/drm/i915/intel_dp.c+8 -90 replies
3/4drm/i915/registers: deprecate _SHIFT in favor of FIELD_GET() and _MASKdrivers/gpu/drm/i915/i915_reg.h drivers/gpu/drm/i915/intel_dp.c drivers/gpu/drm/i915/intel_lvds.c+36 -550 replies
4/4drm/i915/registers: define field values using FIELD_PREP()drivers/gpu/drm/i915/i915_reg.h+18 -184 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/4] drm/i915/registers: use standard bits.h and bitfield.h macros

This is an RFC to get input on how people feel about moving towards using <linux/bits.h> and <linux/bitfield.h> macros for register field definitions and manipulation:

* BIT()
* GENMASK()
* FIELD_GET()
* FIELD_PREP()

I'm not necessarily proposing pushing the patches in this series; they're more of a piece-by-piece transformation of the power sequencer macros and code to use the above macros, to give an idea what the end result would look like.

I'm also not proposing mass conversions that are error prone and cause unnecessary conflicts. At least not outside of i915_reg.h.

I'd like to figure out the *direction* where we'd like to go with what we're adding in the future.

BR,
Jani.

Jani Nikula (4):
drm/i915/registers: prefer GENMASK() over hand rolled masks drm/i915/registers: prefer BIT() for single bits drm/i915/registers: deprecate _SHIFT in favor of FIELD_GET() and _MASK drm/i915/registers: define field values using FIELD_PREP()

 drivers/gpu/drm/i915/i915_reg.h   | 82 +++++++++++++++++----------------------
 drivers/gpu/drm/i915/intel_dp.c   | 43 +++++++++-----------
 drivers/gpu/drm/i915/intel_lvds.c | 41 +++++++++-----------
 3 files changed, 73 insertions(+), 93 deletions(-)
Signature · 6 lines
2.11.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx