[Intel-gfx] [PATCH v2 0/4] drm/i915: introduce macros to define register contents

Jani Nikula jani.nikula at intel.com
Thu Jan 17 12:13:59 UTC 2019


The v1 [1] kind of died down because the FIELD_PREP() build-time checks
were lost as it didn't evaluate to integer constant expression. I looked
at this again, and managed to include the checks in the local copy by
using BUILD_BUG_ON_ZERO() instead.

On the naming bikeshedding department, I noticed a clash with regmap.h
REG_FIELD() and, since it all looked pretty verbose anyway, decided to
see if local _BIT(), _MASK(), and _FIELD() would stick.

BR,
Jani.


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

Jani Nikula (4):
  drm/i915/dp: remove PANEL_POWER_OFF macro and its use
  drm/i915: introduce _BIT() and _MASK() to define register contents
  drm/i915: deprecate _SHIFT in favor of FIELD_GET() and _MASK
  drm/i915: introduce _FIELD() to define register field values

 drivers/gpu/drm/i915/i915_reg.h   | 155 +++++++++++++++++-------------
 drivers/gpu/drm/i915/intel_dp.c   |  43 ++++-----
 drivers/gpu/drm/i915/intel_lvds.c |  40 ++++----
 3 files changed, 124 insertions(+), 114 deletions(-)

-- 
2.20.1



More information about the Intel-gfx mailing list