[Intel-gfx] [PATCH v2 0/8] Add _PICK_EVEN_2RANGES
Jani Nikula
jani.nikula at linux.intel.com
Mon Jan 23 10:39:13 UTC 2023
On Fri, 20 Jan 2023, Lucas De Marchi <lucas.demarchi at intel.com> wrote:
> Add a new macro, _PICK_EVEN_2RANGES, that supports using 2 address
> ranges. This can be considered a v2 of
> https://patchwork.freedesktop.org/series/109606/
>
> I think I converted all the _PICK() uses that could be easily done
> without making it much harder to read. We do have some cases of 3
> ranges: I left those alone.
>
> As commented in the original series and like Jani I think we may need
> something else to cover all the use cases in future. Right now I don't
> think we have a good alternative though. This new macro both improves
> the current code and can be used for cases the ranges change in new
> platforms, so I think it's good enough. In future I think just saving
> the reg during initialization and using different functions if the
> bitfields change may be an alternative.
Did not review, but on the approach,
Acked-by: Jani Nikula <jani.nikula at intel.com>
>
> This was lightly tested on ADL-S and DG2.
>
> Lucas De Marchi (8):
> drm/i915: Add _PICK_EVEN_2RANGES()
> drm/i915: Fix coding style on DPLL*_ENABLE defines
> drm/i915: Convert pll macros to _PICK_EVEN_2RANGES
> drm/i915: Replace _MMIO_PHY3() with _PICK_EVEN_2RANGES()
> drm/i915: Convert PIPE3/PORT3 to _PICK_EVEN_2RANGES()
> drm/i915: Convert _FIA() to _PICK_EVEN_2RANGES()
> drm/i915: Convert MBUS_ABOX_CTL() to _PICK_EVEN_2RANGES()
> drm/i915: Convert PALETTE() to _PICK_EVEN_2RANGES()
>
> .../drm/i915/display/intel_display_reg_defs.h | 10 +-
> .../gpu/drm/i915/display/intel_mg_phy_regs.h | 4 +-
> drivers/gpu/drm/i915/i915_reg.h | 106 +++++++++---------
> drivers/gpu/drm/i915/i915_reg_defs.h | 28 +++++
> 4 files changed, 89 insertions(+), 59 deletions(-)
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list