intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/4] drm/i915/registers: use standard bits.h and bitfield.h macros
@ 2018-09-27  9:40 Jani Nikula
  2018-09-27  9:40 ` [RFC 1/4] drm/i915/registers: prefer GENMASK() over hand rolled masks Jani Nikula
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Jani Nikula @ 2018-09-27  9:40 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula

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(-)

-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2018-09-28  8:34 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-27  9:40 [RFC 0/4] drm/i915/registers: use standard bits.h and bitfield.h macros Jani Nikula
2018-09-27  9:40 ` [RFC 1/4] drm/i915/registers: prefer GENMASK() over hand rolled masks Jani Nikula
2018-09-28  8:34   ` Mika Kuoppala
2018-09-27  9:40 ` [RFC 2/4] drm/i915/registers: prefer BIT() for single bits Jani Nikula
2018-09-27  9:40 ` [RFC 3/4] drm/i915/registers: deprecate _SHIFT in favor of FIELD_GET() and _MASK Jani Nikula
2018-09-27  9:40 ` [RFC 4/4] drm/i915/registers: define field values using FIELD_PREP() Jani Nikula
2018-09-27 10:35   ` Chris Wilson
2018-09-27 11:53     ` Jani Nikula
2018-09-27 12:44       ` Jani Nikula
2018-09-27 12:02     ` Joonas Lahtinen
2018-09-27  9:44 ` [RFC 0/4] drm/i915/registers: use standard bits.h and bitfield.h macros Jani Nikula
2018-09-27 11:09 ` Michal Wajdeczko
2018-09-27 11:22   ` Jani Nikula
2018-09-27 11:44     ` Jani Nikula
2018-09-27 14:20 ` ✗ Fi.CI.BAT: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).