Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 1/2] drm/i915: Split _MMIO() for _PORT3()/_PIPE3()
@ 2023-01-31 19:15 Lucas De Marchi
  2023-01-31 19:15 ` [Intel-gfx] [PATCH 2/2] drm/i915: Move common mmio base out of private macros Lucas De Marchi
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Lucas De Marchi @ 2023-01-31 19:15 UTC (permalink / raw)
  To: intel-gfx; +Cc: Lucas De Marchi, Rodrigo Vivi

In some cases it might be preferred to use _MMIO() and _PORT3()/_PIPE3()
separately, so a common mmio base can be added to all cases. In order to
help removing the implicit dev_priv from some macros, this can be used
in future patches to pass for example DISPLAY_MMIO_BASE().

Declare _MMIO_PIPE3() and _MMIO_PORT3() like then non-3 variants.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_reg_defs.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_reg_defs.h b/drivers/gpu/drm/i915/display/intel_display_reg_defs.h
index 755c1ea8225c..477704eeea0f 100644
--- a/drivers/gpu/drm/i915/display/intel_display_reg_defs.h
+++ b/drivers/gpu/drm/i915/display/intel_display_reg_defs.h
@@ -16,22 +16,23 @@
  * Named helper wrappers around _PICK_EVEN() and _PICK_EVEN_2RANGES().
  */
 #define _PIPE(pipe, a, b)		_PICK_EVEN(pipe, a, b)
+#define _PIPE3(pipe, a, b, c)		_PICK_EVEN_2RANGES(pipe, 1, a, a, b, c)
 #define _PLANE(plane, a, b)		_PICK_EVEN(plane, a, b)
 #define _TRANS(tran, a, b)		_PICK_EVEN(tran, a, b)
 #define _PORT(port, a, b)		_PICK_EVEN(port, a, b)
+#define _PORT3(port, a, b, c)		_PICK_EVEN_2RANGES(port, 1, a, a, b, c)
 #define _PLL(pll, a, b)			_PICK_EVEN(pll, a, b)
 #define _PHY(phy, a, b)			_PICK_EVEN(phy, a, b)
 
 #define _MMIO_PIPE(pipe, a, b)		_MMIO(_PIPE(pipe, a, b))
+#define _MMIO_PIPE3(pipe, a, b, c)	_MMIO(_PIPE3(pipe, a, b, c))
 #define _MMIO_PLANE(plane, a, b)	_MMIO(_PLANE(plane, a, b))
 #define _MMIO_TRANS(tran, a, b)		_MMIO(_TRANS(tran, a, b))
 #define _MMIO_PORT(port, a, b)		_MMIO(_PORT(port, a, b))
+#define _MMIO_PORT3(port, a, b, c)	_MMIO(_PORT3(port, a, b, c))
 #define _MMIO_PLL(pll, a, b)		_MMIO(_PLL(pll, a, b))
 #define _MMIO_PHY(phy, a, b)		_MMIO(_PHY(phy, a, b))
 
-#define _MMIO_PIPE3(pipe, a, b, c)	_MMIO(_PICK_EVEN_2RANGES(pipe, 1, a, a, b, c))
-#define _MMIO_PORT3(pipe, a, b, c)	_MMIO(_PICK_EVEN_2RANGES(pipe, 1, a, a, b, c))
-
 /*
  * Device info offset array based helpers for groups of registers with unevenly
  * spaced base offsets.
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-02-02 10:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-31 19:15 [Intel-gfx] [PATCH 1/2] drm/i915: Split _MMIO() for _PORT3()/_PIPE3() Lucas De Marchi
2023-01-31 19:15 ` [Intel-gfx] [PATCH 2/2] drm/i915: Move common mmio base out of private macros Lucas De Marchi
2023-02-01  9:59   ` Jani Nikula
2023-02-01 12:09     ` Ville Syrjälä
2023-02-01 17:26       ` Lucas De Marchi
2023-02-01 17:39         ` Ville Syrjälä
2023-02-02 10:11           ` Jani Nikula
2023-01-31 20:03 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Split _MMIO() for _PORT3()/_PIPE3() Patchwork
2023-01-31 21:55 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox