[PATCH] drm/mediatek/dp: Add the HDCP feature for DisplayPort
CK Hu (胡俊光)
ck.hu at mediatek.com
Wed Jan 3 22:46:29 PST 2024
Hi, Mac:
On Fri, 2023-11-24 at 16:53 +0800, mac.shen wrote:
> Add tee client application, HDCP 1.x and 2.x authentication for
> DisplayPort
> to support the HDCP feature.
>
> Signed-off-by: mac.shen <mac.shen at mediatek.com>
> ---
[snip]
> +static bool mdrv_dp_tx_hdcp2_inc_seq_num_m(struct mtk_hdcp_info
> *hdcp_info)
> +{
> + u8 i = 0;
> + u32 temp_value = 0;
Use tmp is enough.
> +
> + for (i = 0; i < HDCP2_SEQ_NUM_M_SIZE; i++)
> + temp_value |= hdcp_info-
> >hdcp2_info.hdcp_tx.seq_num_m[i] << (i * 8);
> +
tmp = drm_hdcp_be24_to_cpu(hdcp_info->hdcp2_info.hdcp_tx.seq_num_m);
> + if (temp_value == 0xFFFFFF)
> + return false;
> +
> + temp_value++;
> +
> + for (i = 0; i < HDCP2_SEQ_NUM_M_SIZE; i++)
> + hdcp_info->hdcp2_info.hdcp_tx.seq_num_m[i] =
> + (temp_value & ((u32)0xFF << (i * 8))) >> (i *
> 8);
drm_hdcp_cpu_to_be24(hdcp_info->hdcp2_info.hdcp_tx.seq_num_m, tmp);
Regards,
CK
> + return true;
> +}
More information about the Linux-mediatek
mailing list