[PATCH] drm/mediatek/dp: Add the HDCP feature for DisplayPort

CK Hu (胡俊光) ck.hu at mediatek.com
Thu Jan 4 06:46:29 UTC 2024


An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20240104/c9c3a80c/attachment-0001.htm>
-------------- next part --------------
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 dri-devel mailing list