[PATCH 1/2] drm/i915: Split _MMIO() for _PORT3()/_PIPE3()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux