From: "CK Hu (胡俊光)" <ck.hu@mediatek.com>
To: "Mac Shen (沈俊)" <Mac.Shen@mediatek.com>,
"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>,
"Jitao Shi (石记涛)" <jitao.shi@mediatek.com>,
"daniel@ffwll.ch" <daniel@ffwll.ch>,
"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
"airlied@gmail.com" <airlied@gmail.com>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"angelogioacchino.delregno@collabora.com"
<angelogioacchino.delregno@collabora.com>
Cc: "dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"Shuijing Li (李水静)" <Shuijing.Li@mediatek.com>
Subject: Re: [PATCH v2 2/3] Subject: [PATCH] drm/mediatek/dp: Add HDCP2.x feature for DisplayPort
Date: Thu, 22 Feb 2024 07:51:34 +0000 [thread overview]
Message-ID: <3d96e1d4f851008d822e6bf978107530ef1e2841.camel@mediatek.com> (raw)
In-Reply-To: <20240205055055.25340-3-mac.shen@mediatek.com>
Hi, Mac:
On Mon, 2024-02-05 at 13:50 +0800, mac.shen wrote:
> Add HDCP2.x feature for DisplayPort.
> When userspace request the kernel protect future content communicated
> over the link with Content_Protection property, the feature will do
> HDCP2.x authentication if the sink support HDCP2.X.
>
> Changes in v2:
> - remove switch case, and refine code to make more clear
> - remove some definitions, and use the definitions in
> include/drm/drm_hdcp.h
> - use the struct which defined in include/drm/drm_hdcp.h
> - do HDCP2.x authentication when userspace request the
> kernel protect future content communicated
> per suggestion from the previous thread:
> https://lore.kernel.org/all/8fff59b5567449d8201dd1138c8fa
> 9218a545c46.camel@mediatek.com/
>
> Signed-off-by: mac.shen <mac.shen@mediatek.com>
> ---
[snip]
> +
> +static void dp_tx_hdcp2_err_handle(struct mtk_hdcp_info *hdcp_info,
> int err_msg, int line)
> +{
> + pr_err("2.x: MainState:%d; SubState:%d;\n", hdcp_info-
> >hdcp2_info.hdcp_handler.main_state,
> + hdcp_info->hdcp2_info.hdcp_handler.sub_state);
> +
> + switch (err_msg) {
> + case HDCP_ERR_UNKNOWN_STATE:
> + pr_err("2.x: Unknown State, line:%d\n", line);
> + dp_tx_hdcp2_set_state(hdcp_info, HDCP2_MS_H1P1,
> HDCP_2_2_AUTH_FAIL);
For each case, you just print error message and set state. It seems not
necessary to group these cases. Where error happen, just print message
there and set state there. And not print line, you should print what
the error is.
Regards,
CK
> + break;
> +
> + case HDCP_ERR_SEND_MSG_FAIL:
> + pr_err("2.x: Send Msg Fail, line:%d\n", line);
> + dp_tx_hdcp2_set_state(hdcp_info, HDCP2_MS_A0F0,
> HDCP_2_2_NULL_MSG);
> + break;
> + case HDCP_ERR_RESPONSE_TIMEROUT:
> + pr_err("2.x: Response Timeout, line:%d!\n", line);
> + dp_tx_hdcp2_set_state(hdcp_info, HDCP2_MS_A0F0,
> HDCP_2_2_NULL_MSG);
> + break;
> +
> + case HDCP_ERR_PROCESS_FAIL:
> + pr_err("2.x: Process Fail, line:%d!\n", line);
> + dp_tx_hdcp2_set_state(hdcp_info, HDCP2_MS_A0F0,
> HDCP_2_2_NULL_MSG);
> + break;
> +
> + default:
> + pr_err("2.x: NO ERROR!");
> + break;
> + }
> +}
next prev parent reply other threads:[~2024-02-22 7:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-05 5:50 [PATCH v2 0/3] Add HDCP " mac.shen
2024-02-05 5:50 ` [PATCH v2 1/3] Subject: [PATCH] drm/mediatek/dp: Add tee client application for HDCP feature mac.shen
2024-02-05 16:17 ` kernel test robot
2024-02-06 15:34 ` AngeloGioacchino Del Regno
2024-02-20 1:37 ` CK Hu (胡俊光)
2024-02-20 7:53 ` CK Hu (胡俊光)
2024-02-05 5:50 ` [PATCH v2 2/3] Subject: [PATCH] drm/mediatek/dp: Add HDCP2.x feature for DisplayPort mac.shen
2024-02-06 15:34 ` AngeloGioacchino Del Regno
2024-02-13 9:52 ` kernel test robot
2024-02-19 9:33 ` CK Hu (胡俊光)
2024-02-20 9:30 ` CK Hu (胡俊光)
2024-02-22 7:43 ` CK Hu (胡俊光)
2024-02-22 7:51 ` CK Hu (胡俊光) [this message]
2024-02-05 5:50 ` [PATCH v2 3/3] Subject: [PATCH] drm/mediatek/dp: Add HDCP1.x " mac.shen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3d96e1d4f851008d822e6bf978107530ef1e2841.camel@mediatek.com \
--to=ck.hu@mediatek.com \
--cc=Mac.Shen@mediatek.com \
--cc=Shuijing.Li@mediatek.com \
--cc=airlied@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chunkuang.hu@kernel.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jitao.shi@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=p.zabel@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®