Re: [PATCH] drm/mediatek/dp: Add the HDCP feature for DisplayPort
From: CK Hu (胡俊光)
Date: Thu Jan 04 2024 - 01:46:51 EST
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@xxxxxxxxxxxx>
> ---
[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;
> +}