]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/bridge: anx7625: Use common macros for HDCP capabilities
authorChen-Yu Tsai <wenst@chromium.org>
Mon, 10 Jul 2023 09:12:01 +0000 (17:12 +0800)
committerRobert Foss <rfoss@kernel.org>
Mon, 17 Jul 2023 16:03:23 +0000 (18:03 +0200)
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>
Reviewed-by: Robert Foss <rfoss@kernel.org>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230710091203.1874317-1-wenst@chromium.org
drivers/gpu/drm/bridge/analogix/anx7625.c

index 9db3784cb554f77a929d62daec70f2394e15ebcd..866d018f4bb1164af5b2471f5c253d87ccb9a775 100644 (file)
@@ -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;
        }