[PATCH] drm/bridge: anx7625: Use common macros for HDCP capabilities

Chen-Yu Tsai posted 1 patch 2 years, 7 months ago
drivers/gpu/drm/bridge/analogix/anx7625.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] drm/bridge: anx7625: Use common macros for HDCP capabilities
Posted by Chen-Yu Tsai 2 years, 7 months ago
The DRM DP code has macros for the DP HDCP capabilities. Use them in the
anx7625 driver instead of raw numbers.

Fixes: cd1637c7e480 ("drm/bridge: anx7625: add HDCP support")
Suggested-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
 drivers/gpu/drm/bridge/analogix/anx7625.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
index 9db3784cb554..866d018f4bb1 100644
--- a/drivers/gpu/drm/bridge/analogix/anx7625.c
+++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
@@ -872,11 +872,11 @@ static int anx7625_hdcp_enable(struct anx7625_data *ctx)
 	}
 
 	/* Read downstream capability */
-	ret = anx7625_aux_trans(ctx, DP_AUX_NATIVE_READ, 0x68028, 1, &bcap);
+	ret = anx7625_aux_trans(ctx, DP_AUX_NATIVE_READ, DP_AUX_HDCP_BCAPS, 1, &bcap);
 	if (ret < 0)
 		return ret;
 
-	if (!(bcap & 0x01)) {
+	if (!(bcap & DP_BCAPS_HDCP_CAPABLE)) {
 		pr_warn("downstream not support HDCP 1.4, cap(%x).\n", bcap);
 		return 0;
 	}
-- 
2.41.0.255.g8b1d071c50-goog

Re: [PATCH] drm/bridge: anx7625: Use common macros for HDCP capabilities
Posted by Robert Foss 2 years, 6 months ago
On Mon, 10 Jul 2023 17:12:01 +0800, Chen-Yu Tsai wrote:
> The DRM DP code has macros for the DP HDCP capabilities. Use them in the
> anx7625 driver instead of raw numbers.
> 
> 

Applied, thanks!

[1/1] drm/bridge: anx7625: Use common macros for HDCP capabilities
      https://cgit.freedesktop.org/drm/drm-misc/commit/?id=41639b3a8b0f



Rob