> -----Original Message-----
> From: Nikula, Jani <jani.nik...@intel.com>
> Sent: Wednesday, February 12, 2025 3:09 PM
> To: Kandpal, Suraj <suraj.kand...@intel.com>; intel-
> g...@lists.freedesktop.org; intel...@lists.freedesktop.org
> Cc: ville.syrj...@linux.intel.com; Deak, Imre <imre.d...@intel.com>
> Subject: RE: [PATCH 1/3] drm/i915/reg: use REG_BIT and friends to define DP
> registers
> 
> On Wed, 12 Feb 2025, "Kandpal, Suraj" <suraj.kand...@intel.com> wrote:
> >> diff --git a/drivers/gpu/drm/i915/i915_reg.h
> >> b/drivers/gpu/drm/i915/i915_reg.h index 670cd2371f94..da658c3591f0
> >> 100644
> >> --- a/drivers/gpu/drm/i915/i915_reg.h
> >> +++ b/drivers/gpu/drm/i915/i915_reg.h
> >> @@ -1394,88 +1394,50 @@
> >>  #define VLV_DP_B             _MMIO(VLV_DISPLAY_BASE + 0x64100)
> >>  #define VLV_DP_C             _MMIO(VLV_DISPLAY_BASE + 0x64200)
> >>  #define CHV_DP_D             _MMIO(VLV_DISPLAY_BASE + 0x64300)
> >> -#define   DP_PORT_EN                 (1 << 31)
> >> -#define   DP_PIPE_SEL_SHIFT          30
> >> -#define   DP_PIPE_SEL_MASK           (1 << 30)
> >> -#define   DP_PIPE_SEL(pipe)          ((pipe) << 30)
> >> -#define   DP_PIPE_SEL_SHIFT_IVB              29
> >> -#define   DP_PIPE_SEL_MASK_IVB               (3 << 29)
> >> -#define   DP_PIPE_SEL_IVB(pipe)              ((pipe) << 29)
> >> +#define   DP_PORT_EN                 REG_BIT(31)
> >> +#define   DP_PIPE_SEL_MASK           REG_GENMASK(30, 30)
> >
> > Why not use REG_BIT() here REG_GENMASK for a single bit seems wrong
> 
> ...because defining a MASK with BIT feels wrong to me. :)
> 

Well in that case LGTM,
Reviewed-by: Suraj Kandpal <suraj.kand...@intel.com>

> 
> BR,
> Jani.
> 
> 
> --
> Jani Nikula, Intel

Reply via email to