<html><body><p>
<pre>
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@mediatek.com>
> ---
[snip]
> +
> +bool mdrv_dp_tx_hdcp2_support(struct mtk_hdcp_info *hdcp_info)
> +{
> +u8 temp_buffer[3];
> +int ret;
> +
> +drm_dp_dpcd_read(hdcp_info->aux,
> DP_HDCP_2_2_REG_RX_CAPS_OFFSET, temp_buffer, 0x3);
> +
> +if ((temp_buffer[2] & BIT(1)) && temp_buffer[0] == 0x02) {
Use defined symbol instead of magic number. According to [1], this
could be:
if (rx_caps[0] == HDCP_2_2_RX_CAPS_VERSION_VAL &&
HDCP_2_2_DP_HDCP_CAPABLE(rx_caps[2]))
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/gpu/drm/i915/display/intel_dp_hdcp.c?h=next-20240108#n667
Regards,
CK
> +hdcp_info->hdcp2_info.enable = true;
> +hdcp_info->hdcp2_info.repeater = temp_buffer[2] &
> BIT(0);
> +} else {
> +hdcp_info->hdcp2_info.enable = false;
> +}
> +
> +DPTXHDCPMSG("HDCP.2x CAPABLE: %d, Reapeater: %d\n",
> + hdcp_info->hdcp2_info.enable,
> +hdcp_info->hdcp2_info.repeater);
> +
> +if (!hdcp_info->hdcp2_info.enable)
> +return false;
> +
> +ret = tee_add_device(hdcp_info, HDCP_VERSION_2X);
> +if (ret != RET_SUCCESS) {
> +pr_err("HDCP TA has some error\n");
> +hdcp_info->hdcp2_info.enable = false;
> +}
> +
> +return hdcp_info->hdcp2_info.enable;
> +}
> +
</pre>
</p></body></html><!--type:text--><!--{--><pre>************* MEDIATEK Confidentiality Notice
********************
The information contained in this e-mail message (including any
attachments) may be confidential, proprietary, privileged, or otherwise
exempt from disclosure under applicable laws. It is intended to be
conveyed only to the designated recipient(s). Any use, dissemination,
distribution, printing, retaining or copying of this e-mail (including its
attachments) by unintended recipient(s) is strictly prohibited and may
be unlawful. If you are not an intended recipient of this e-mail, or believe
that you have received this e-mail in error, please notify the sender
immediately (by replying to this e-mail), delete any and all copies of
this e-mail (including any attachments) from your system, and do not
disclose the content of this e-mail to any other person. Thank you!
</pre><!--}-->