Skip to content

Commit 4557c60

Browse files
committed
drm/i915: Add MMIO helper for 6 ports with different offsets.
Also new registers can have different mmio offsets per different lane per port. v2: Use _PICK as PORT3 instead of creating a new macro with if per port. v3: Use _PICK directly on MMIO_PORT6. While MMIO_PORT isn't flexible enough let's continue with MMIO_PORT6 as we have MMIO_PORT3. Cc: Manasi Navare <[email protected]> Signed-off-by: Rodrigo Vivi <[email protected]> Reviewed-by: Manasi Navare <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent a927c92 commit 4557c60

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpu/drm/i915/i915_reg.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)
6262
#define _MMIO_PORT3(pipe, a, b, c) _MMIO(_PICK(pipe, a, b, c))
6363
#define _PLL(pll, a, b) ((a) + (pll)*((b)-(a)))
6464
#define _MMIO_PLL(pll, a, b) _MMIO(_PLL(pll, a, b))
65+
#define _MMIO_PORT6(port, a, b, c, d, e, f) _MMIO(_PICK(port, a, b, c, d, e, f))
66+
#define _MMIO_PORT6_LN(port, ln, a0, a1, b, c, d, e, f) \
67+
_MMIO(_PICK(port, a0, b, c, d, e, f) + (ln * (a1 - a0)))
6568
#define _PHY3(phy, ...) _PICK(phy, __VA_ARGS__)
6669
#define _MMIO_PHY3(phy, a, b, c) _MMIO(_PHY3(phy, a, b, c))
6770

0 commit comments

Comments
 (0)