summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_lvds.c
diff options
context:
space:
mode:
authorJani Nikula2019-03-15 14:56:18 +0100
committerJani Nikula2019-03-18 15:27:42 +0100
commit09b434d4f6d22e14500569e7e3f951e0eec4d496 (patch)
treeaf2d0bf787cf6ee53c14b7d66464f794cf92f3fa /drivers/gpu/drm/i915/intel_lvds.c
parentdrm/i915: Stop needlessly acquiring wakeref for debugfs/drop_caches_set (diff)
downloadkernel-qcow2-linux-09b434d4f6d22e14500569e7e3f951e0eec4d496.tar.gz
kernel-qcow2-linux-09b434d4f6d22e14500569e7e3f951e0eec4d496.tar.xz
kernel-qcow2-linux-09b434d4f6d22e14500569e7e3f951e0eec4d496.zip
drm/i915: introduce REG_BIT() and REG_GENMASK() to define register contents
Introduce REG_BIT(n) to define register bits and REG_GENMASK(h, l) to define register bitfield masks. We define the above as wrappers to BIT() and GENMASK() respectively to force u32 type to go with our register size, and to add compile time checks on the bit numbers. The intention is that these are easier to get right and review against the spec than hand rolled masks. Convert power sequencer registers as an example. v4: - rebase v3: - rename macros to REG_BIT() and REG_GENMASK() to avoid underscore prefix and to be in line with kernel macros (Chris) - add compile time checks (Mika) v2: - rename macros to just _BIT() and _MASK() to reduce verbosity Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/787307c0ba9bc23471e5ff1e454b8af35771fa37.1552657998.git.jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lvds.c')
0 files changed, 0 insertions, 0 deletions