lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date: Mon, 8 Jan 2024 06:00:21 +0000
From: CK Hu (胡俊光) <ck.hu@...iatek.com>
To: Mac Shen (沈俊) <Mac.Shen@...iatek.com>,
	"chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>,
	Jitao Shi (石记涛) <jitao.shi@...iatek.com>,
	"daniel@...ll.ch" <daniel@...ll.ch>, "p.zabel@...gutronix.de"
	<p.zabel@...gutronix.de>, "airlied@...il.com" <airlied@...il.com>,
	"matthias.bgg@...il.com" <matthias.bgg@...il.com>,
	"angelogioacchino.delregno@...labora.com"
	<angelogioacchino.delregno@...labora.com>
CC: "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>,
	Shuijing Li (李水静) <Shuijing.Li@...iatek.com>
Subject: Re: [PATCH] drm/mediatek/dp: Add the HDCP feature for DisplayPort

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@...iatek.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;
> +}
> +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ