All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] drm/i915: introduce macros to define register contents
@ 2019-02-27 17:02 Jani Nikula
  2019-02-27 17:02 ` [PATCH v3 1/3] drm/i915: introduce REG_BIT() and REG_GENMASK() " Jani Nikula
                   ` (6 more replies)
  0 siblings, 7 replies; 22+ messages in thread
From: Jani Nikula @ 2019-02-27 17:02 UTC (permalink / raw)
  To: Jani Nikula, intel-gfx

v3 of [1] with naming hopefully settled (fingers crossed), and some more
compile time checks, documentation and other polish added.

The naming scheme of the local wrappers/copies of bit fiddling macros is
to just use REG_ prefix for the regular kernel ones, with hopefully
minimal confusion. So we end up with:

REG_BIT()
REG_GENMASK()
REG_FIELD_PREP()
REG_FIELD_GET()

We can also use the same macros in i915_reg.h and rest of the driver,
with no mixed use for register contents. Indeed some of the regular
kernel macros lead to non-u32 types being used.


BR,
Jani.

[1] http://mid.mail-archive.com/cover.1547726792.git.jani.nikula@intel.com


Jani Nikula (3):
  drm/i915: introduce REG_BIT() and REG_GENMASK() to define register
    contents
  drm/i915: deprecate _SHIFT in favor of _MASK passed to accessors
  drm/i915: use REG_FIELD_PREP() to define register bitfield values

 drivers/gpu/drm/i915/i915_reg.h   | 182 +++++++++++++++++++-----------
 drivers/gpu/drm/i915/intel_dp.c   |  40 +++----
 drivers/gpu/drm/i915/intel_lvds.c |  40 +++----
 3 files changed, 151 insertions(+), 111 deletions(-)

-- 
2.20.1

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

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

end of thread, other threads:[~2019-02-28 13:46 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-27 17:02 [PATCH v3 0/3] drm/i915: introduce macros to define register contents Jani Nikula
2019-02-27 17:02 ` [PATCH v3 1/3] drm/i915: introduce REG_BIT() and REG_GENMASK() " Jani Nikula
2019-02-27 20:50   ` Chris Wilson
2019-02-27 21:13     ` Ville Syrjälä
2019-02-27 23:06   ` Michal Wajdeczko
2019-02-28 10:07     ` Jani Nikula
2019-02-28 10:12       ` Chris Wilson
2019-02-28 11:12         ` Michal Wajdeczko
2019-02-27 17:02 ` [PATCH v3 2/3] drm/i915: deprecate _SHIFT in favor of _MASK passed to accessors Jani Nikula
2019-02-27 20:58   ` Chris Wilson
2019-02-27 17:02 ` [PATCH v3 3/3] drm/i915: use REG_FIELD_PREP() to define register bitfield values Jani Nikula
2019-02-27 21:07   ` Chris Wilson
2019-02-27 21:11   ` Ville Syrjälä
2019-02-28  0:17   ` Michal Wajdeczko
2019-02-28 10:24     ` Jani Nikula
2019-02-28 11:38       ` Michal Wajdeczko
2019-02-28 13:48         ` Jani Nikula
2019-02-28  4:49   ` kbuild test robot
2019-02-27 17:44 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: introduce macros to define register contents (rev3) Patchwork
2019-02-27 17:46 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-02-27 18:20 ` ✓ Fi.CI.BAT: success " Patchwork
2019-02-27 20:13 ` ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.