> -----Original Message----- > From: Intel-gfx <intel-gfx-boun...@lists.freedesktop.org> On Behalf Of Lucas > De Marchi > Sent: Friday, January 20, 2023 11:35 AM > To: intel-gfx@lists.freedesktop.org > Cc: De Marchi, Lucas <lucas.demar...@intel.com>; dri- > de...@lists.freedesktop.org > Subject: [Intel-gfx] [PATCH v2 8/8] drm/i915: Convert PALETTE() to > _PICK_EVEN_2RANGES() > > PALETTE() can use _PICK_EVEN_2RANGES instead of _PICK, which reduces the > size and is safer. > > Signed-off-by: Lucas De Marchi <lucas.demar...@intel.com> Reviewed-by: Anusha Srivatsa<anusha.sriva...@intel.com> > --- > drivers/gpu/drm/i915/i915_reg.h | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h > index 3d6ad4424265..b134a1f357c8 100644 > --- a/drivers/gpu/drm/i915/i915_reg.h > +++ b/drivers/gpu/drm/i915/i915_reg.h > @@ -1734,10 +1734,11 @@ > #define PALETTE_10BIT_BLUE_EXP_MASK REG_GENMASK(7, 6) > #define PALETTE_10BIT_BLUE_MANT_MASK REG_GENMASK(5, 2) > #define PALETTE_10BIT_BLUE_UDW_MASK REG_GENMASK(1, 0) > -#define PALETTE(pipe, i) _MMIO(DISPLAY_MMIO_BASE(dev_priv) + \ > - _PICK((pipe), _PALETTE_A, \ > - _PALETTE_B, _CHV_PALETTE_C) + \ > - (i) * 4) > +#define PALETTE(pipe, i) _MMIO(DISPLAY_MMIO_BASE(dev_priv) + > \ > + _PICK_EVEN_2RANGES(pipe, 2, > \ > + _PALETTE_A, _PALETTE_B, > \ > + _CHV_PALETTE_C, > _CHV_PALETTE_C) + \ > + (i) * 4) > > #define PEG_BAND_GAP_DATA _MMIO(0x14d68) > > -- > 2.39.0
- [Intel-gfx] [PATCH v2.2] drm/i915: Add _PICK... Lucas De Marchi
- [Intel-gfx] [PATCH v2.1] drm/i915: Add _PICK_EVEN_2R... Lucas De Marchi
- Re: [Intel-gfx] [PATCH v2.1] drm/i915: Add _PICK... Srivatsa, Anusha
- [Intel-gfx] [PATCH v2 2/8] drm/i915: Fix coding style on ... Lucas De Marchi
- Re: [Intel-gfx] [PATCH v2 2/8] drm/i915: Fix coding ... Srivatsa, Anusha
- [Intel-gfx] [PATCH v2 4/8] drm/i915: Replace _MMIO_PHY3()... Lucas De Marchi
- Re: [Intel-gfx] [PATCH v2 4/8] drm/i915: Replace _MM... Srivatsa, Anusha
- [Intel-gfx] [PATCH v2 7/8] drm/i915: Convert MBUS_ABOX_CT... Lucas De Marchi
- Re: [Intel-gfx] [PATCH v2 7/8] drm/i915: Convert MBU... Srivatsa, Anusha
- [Intel-gfx] [PATCH v2 8/8] drm/i915: Convert PALETTE() to... Lucas De Marchi
- Re: [Intel-gfx] [PATCH v2 8/8] drm/i915: Convert PAL... Srivatsa, Anusha
- [Intel-gfx] [PATCH v2 6/8] drm/i915: Convert _FIA() to _P... Lucas De Marchi
- Re: [Intel-gfx] [PATCH v2 6/8] drm/i915: Convert _FI... Srivatsa, Anusha
- [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Add _PICK_EVE... Patchwork
- [Intel-gfx] ✓ Fi.CI.BAT: success for Add _PICK_EVEN_2RANG... Patchwork
- [Intel-gfx] ✗ Fi.CI.IGT: failure for Add _PICK_EVEN_2RANG... Patchwork
- Re: [Intel-gfx] [PATCH v2 0/8] Add _PICK_EVEN_2RANGES Jani Nikula
- [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Add _PICK_EVE... Patchwork
- [Intel-gfx] ✓ Fi.CI.BAT: success for Add _PICK_EVEN_2RANG... Patchwork
- [Intel-gfx] ✓ Fi.CI.IGT: success for Add _PICK_EVEN_2RANG... Patchwork
- [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Add _PICK_EVEN_2R... Patchwork