Commit fbfb125c authored by Jani Nikula's avatar Jani Nikula

drm/i915/hdcp: use DISPLAY_VER instead of GRAPHICS_VER

Display code should not care about graphics version. While at it,
abstract the version check to a separate macro.
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240104174350.823605-3-jani.nikula@intel.com
parent 10297142
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
#include "intel_display_reg_defs.h" #include "intel_display_reg_defs.h"
#define TRANS_HDCP(__i915) (DISPLAY_VER(__i915) >= 12)
/* HDCP Key Registers */ /* HDCP Key Registers */
#define HDCP_KEY_CONF _MMIO(0x66c00) #define HDCP_KEY_CONF _MMIO(0x66c00)
#define HDCP_AKSV_SEND_TRIGGER REG_BIT(31) #define HDCP_AKSV_SEND_TRIGGER REG_BIT(31)
...@@ -82,7 +84,7 @@ ...@@ -82,7 +84,7 @@
#define TRANS_HDCP_CONF(trans) _MMIO_TRANS(trans, _TRANSA_HDCP_CONF, \ #define TRANS_HDCP_CONF(trans) _MMIO_TRANS(trans, _TRANSA_HDCP_CONF, \
_TRANSB_HDCP_CONF) _TRANSB_HDCP_CONF)
#define HDCP_CONF(dev_priv, trans, port) \ #define HDCP_CONF(dev_priv, trans, port) \
(GRAPHICS_VER(dev_priv) >= 12 ? \ (TRANS_HDCP(dev_priv) ? \
TRANS_HDCP_CONF(trans) : \ TRANS_HDCP_CONF(trans) : \
PORT_HDCP_CONF(port)) PORT_HDCP_CONF(port))
...@@ -95,7 +97,7 @@ ...@@ -95,7 +97,7 @@
_TRANSA_HDCP_ANINIT, \ _TRANSA_HDCP_ANINIT, \
_TRANSB_HDCP_ANINIT) _TRANSB_HDCP_ANINIT)
#define HDCP_ANINIT(dev_priv, trans, port) \ #define HDCP_ANINIT(dev_priv, trans, port) \
(GRAPHICS_VER(dev_priv) >= 12 ? \ (TRANS_HDCP(dev_priv) ? \
TRANS_HDCP_ANINIT(trans) : \ TRANS_HDCP_ANINIT(trans) : \
PORT_HDCP_ANINIT(port)) PORT_HDCP_ANINIT(port))
...@@ -105,7 +107,7 @@ ...@@ -105,7 +107,7 @@
#define TRANS_HDCP_ANLO(trans) _MMIO_TRANS(trans, _TRANSA_HDCP_ANLO, \ #define TRANS_HDCP_ANLO(trans) _MMIO_TRANS(trans, _TRANSA_HDCP_ANLO, \
_TRANSB_HDCP_ANLO) _TRANSB_HDCP_ANLO)
#define HDCP_ANLO(dev_priv, trans, port) \ #define HDCP_ANLO(dev_priv, trans, port) \
(GRAPHICS_VER(dev_priv) >= 12 ? \ (TRANS_HDCP(dev_priv) ? \
TRANS_HDCP_ANLO(trans) : \ TRANS_HDCP_ANLO(trans) : \
PORT_HDCP_ANLO(port)) PORT_HDCP_ANLO(port))
...@@ -115,7 +117,7 @@ ...@@ -115,7 +117,7 @@
#define TRANS_HDCP_ANHI(trans) _MMIO_TRANS(trans, _TRANSA_HDCP_ANHI, \ #define TRANS_HDCP_ANHI(trans) _MMIO_TRANS(trans, _TRANSA_HDCP_ANHI, \
_TRANSB_HDCP_ANHI) _TRANSB_HDCP_ANHI)
#define HDCP_ANHI(dev_priv, trans, port) \ #define HDCP_ANHI(dev_priv, trans, port) \
(GRAPHICS_VER(dev_priv) >= 12 ? \ (TRANS_HDCP(dev_priv) ? \
TRANS_HDCP_ANHI(trans) : \ TRANS_HDCP_ANHI(trans) : \
PORT_HDCP_ANHI(port)) PORT_HDCP_ANHI(port))
...@@ -126,7 +128,7 @@ ...@@ -126,7 +128,7 @@
_TRANSA_HDCP_BKSVLO, \ _TRANSA_HDCP_BKSVLO, \
_TRANSB_HDCP_BKSVLO) _TRANSB_HDCP_BKSVLO)
#define HDCP_BKSVLO(dev_priv, trans, port) \ #define HDCP_BKSVLO(dev_priv, trans, port) \
(GRAPHICS_VER(dev_priv) >= 12 ? \ (TRANS_HDCP(dev_priv) ? \
TRANS_HDCP_BKSVLO(trans) : \ TRANS_HDCP_BKSVLO(trans) : \
PORT_HDCP_BKSVLO(port)) PORT_HDCP_BKSVLO(port))
...@@ -137,7 +139,7 @@ ...@@ -137,7 +139,7 @@
_TRANSA_HDCP_BKSVHI, \ _TRANSA_HDCP_BKSVHI, \
_TRANSB_HDCP_BKSVHI) _TRANSB_HDCP_BKSVHI)
#define HDCP_BKSVHI(dev_priv, trans, port) \ #define HDCP_BKSVHI(dev_priv, trans, port) \
(GRAPHICS_VER(dev_priv) >= 12 ? \ (TRANS_HDCP(dev_priv) ? \
TRANS_HDCP_BKSVHI(trans) : \ TRANS_HDCP_BKSVHI(trans) : \
PORT_HDCP_BKSVHI(port)) PORT_HDCP_BKSVHI(port))
...@@ -148,7 +150,7 @@ ...@@ -148,7 +150,7 @@
_TRANSA_HDCP_RPRIME, \ _TRANSA_HDCP_RPRIME, \
_TRANSB_HDCP_RPRIME) _TRANSB_HDCP_RPRIME)
#define HDCP_RPRIME(dev_priv, trans, port) \ #define HDCP_RPRIME(dev_priv, trans, port) \
(GRAPHICS_VER(dev_priv) >= 12 ? \ (TRANS_HDCP(dev_priv) ? \
TRANS_HDCP_RPRIME(trans) : \ TRANS_HDCP_RPRIME(trans) : \
PORT_HDCP_RPRIME(port)) PORT_HDCP_RPRIME(port))
...@@ -159,7 +161,7 @@ ...@@ -159,7 +161,7 @@
_TRANSA_HDCP_STATUS, \ _TRANSA_HDCP_STATUS, \
_TRANSB_HDCP_STATUS) _TRANSB_HDCP_STATUS)
#define HDCP_STATUS(dev_priv, trans, port) \ #define HDCP_STATUS(dev_priv, trans, port) \
(GRAPHICS_VER(dev_priv) >= 12 ? \ (TRANS_HDCP(dev_priv) ? \
TRANS_HDCP_STATUS(trans) : \ TRANS_HDCP_STATUS(trans) : \
PORT_HDCP_STATUS(port)) PORT_HDCP_STATUS(port))
...@@ -200,7 +202,7 @@ ...@@ -200,7 +202,7 @@
#define AUTH_FORCE_CLR_INPUTCTR REG_BIT(19) #define AUTH_FORCE_CLR_INPUTCTR REG_BIT(19)
#define AUTH_CLR_KEYS REG_BIT(18) #define AUTH_CLR_KEYS REG_BIT(18)
#define HDCP2_AUTH(dev_priv, trans, port) \ #define HDCP2_AUTH(dev_priv, trans, port) \
(GRAPHICS_VER(dev_priv) >= 12 ? \ (TRANS_HDCP(dev_priv) ? \
TRANS_HDCP2_AUTH(trans) : \ TRANS_HDCP2_AUTH(trans) : \
PORT_HDCP2_AUTH(port)) PORT_HDCP2_AUTH(port))
...@@ -211,7 +213,7 @@ ...@@ -211,7 +213,7 @@
_TRANSB_HDCP2_CTL) _TRANSB_HDCP2_CTL)
#define CTL_LINK_ENCRYPTION_REQ REG_BIT(31) #define CTL_LINK_ENCRYPTION_REQ REG_BIT(31)
#define HDCP2_CTL(dev_priv, trans, port) \ #define HDCP2_CTL(dev_priv, trans, port) \
(GRAPHICS_VER(dev_priv) >= 12 ? \ (TRANS_HDCP(dev_priv) ? \
TRANS_HDCP2_CTL(trans) : \ TRANS_HDCP2_CTL(trans) : \
PORT_HDCP2_CTL(port)) PORT_HDCP2_CTL(port))
...@@ -225,7 +227,7 @@ ...@@ -225,7 +227,7 @@
#define LINK_AUTH_STATUS REG_BIT(21) #define LINK_AUTH_STATUS REG_BIT(21)
#define LINK_ENCRYPTION_STATUS REG_BIT(20) #define LINK_ENCRYPTION_STATUS REG_BIT(20)
#define HDCP2_STATUS(dev_priv, trans, port) \ #define HDCP2_STATUS(dev_priv, trans, port) \
(GRAPHICS_VER(dev_priv) >= 12 ? \ (TRANS_HDCP(dev_priv) ? \
TRANS_HDCP2_STATUS(trans) : \ TRANS_HDCP2_STATUS(trans) : \
PORT_HDCP2_STATUS(port)) PORT_HDCP2_STATUS(port))
...@@ -247,7 +249,7 @@ ...@@ -247,7 +249,7 @@
#define STREAM_ENCRYPTION_STATUS REG_BIT(31) #define STREAM_ENCRYPTION_STATUS REG_BIT(31)
#define STREAM_TYPE_STATUS REG_BIT(30) #define STREAM_TYPE_STATUS REG_BIT(30)
#define HDCP2_STREAM_STATUS(dev_priv, trans, port) \ #define HDCP2_STREAM_STATUS(dev_priv, trans, port) \
(GRAPHICS_VER(dev_priv) >= 12 ? \ (TRANS_HDCP(dev_priv) ? \
TRANS_HDCP2_STREAM_STATUS(trans) : \ TRANS_HDCP2_STREAM_STATUS(trans) : \
PIPE_HDCP2_STREAM_STATUS(pipe)) PIPE_HDCP2_STREAM_STATUS(pipe))
...@@ -263,7 +265,7 @@ ...@@ -263,7 +265,7 @@
_TRANSB_HDCP2_AUTH_STREAM) _TRANSB_HDCP2_AUTH_STREAM)
#define AUTH_STREAM_TYPE REG_BIT(31) #define AUTH_STREAM_TYPE REG_BIT(31)
#define HDCP2_AUTH_STREAM(dev_priv, trans, port) \ #define HDCP2_AUTH_STREAM(dev_priv, trans, port) \
(GRAPHICS_VER(dev_priv) >= 12 ? \ (TRANS_HDCP(dev_priv) ? \
TRANS_HDCP2_AUTH_STREAM(trans) : \ TRANS_HDCP2_AUTH_STREAM(trans) : \
PORT_HDCP2_AUTH_STREAM(port)) PORT_HDCP2_AUTH_STREAM(port))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment