[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c93c81878ca5f45e2b7cf16863f1e4ab85f957e5.camel@mediatek.com>
Date: Fri, 20 Dec 2024 06:09:43 +0000
From: CK Hu (胡俊光) <ck.hu@...iatek.com>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
"chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>
CC: "robh@...nel.org" <robh@...nel.org>, "jie.qiu@...iatek.com"
<jie.qiu@...iatek.com>, "tzimmermann@...e.de" <tzimmermann@...e.de>,
"simona@...ll.ch" <simona@...ll.ch>, "mripard@...nel.org"
<mripard@...nel.org>, Jitao Shi (石记涛)
<jitao.shi@...iatek.com>, "linux-mediatek@...ts.infradead.org"
<linux-mediatek@...ts.infradead.org>, "dri-devel@...ts.freedesktop.org"
<dri-devel@...ts.freedesktop.org>, "maarten.lankhorst@...ux.intel.com"
<maarten.lankhorst@...ux.intel.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "devicetree@...r.kernel.org"
<devicetree@...r.kernel.org>, "kernel@...labora.com" <kernel@...labora.com>,
"dmitry.baryshkov@...aro.org" <dmitry.baryshkov@...aro.org>,
"krzk+dt@...nel.org" <krzk+dt@...nel.org>, "p.zabel@...gutronix.de"
<p.zabel@...gutronix.de>, "conor+dt@...nel.org" <conor+dt@...nel.org>,
"airlied@...il.com" <airlied@...il.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "matthias.bgg@...il.com"
<matthias.bgg@...il.com>, "junzhi.zhao@...iatek.com"
<junzhi.zhao@...iatek.com>
Subject: Re: [PATCH v3 18/33] drm/mediatek: mtk_hdmi: Move vendor/product
strings to drm_bridge
Hi, Angelo:
On Tue, 2024-12-17 at 16:43 +0100, AngeloGioacchino Del Regno wrote:
> External email : Please do not click links or open attachments until you have verified the sender or the content.
>
>
> Move the vendor and product strings to the appropriate entries
> of struct drm_bridge and use that in mtk_hdmi_setup_spd_infoframe
> instead of having the same as function parameters.
>
> While at it, also beautify the strings, setting them to read
> "MediaTek On-Chip HDMI".
Reviewed-by: CK Hu <ck.hu@...iatek.com>
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
> ---
> drivers/gpu/drm/mediatek/mtk_hdmi.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> index ef8dfcb77318..eb38f4b7674e 100644
> --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> @@ -952,15 +952,14 @@ static int mtk_hdmi_setup_avi_infoframe(struct mtk_hdmi *hdmi,
> return 0;
> }
>
> -static int mtk_hdmi_setup_spd_infoframe(struct mtk_hdmi *hdmi,
> - const char *vendor,
> - const char *product)
> +static int mtk_hdmi_setup_spd_infoframe(struct mtk_hdmi *hdmi)
> {
> + struct drm_bridge *bridge = &hdmi->bridge;
> struct hdmi_spd_infoframe frame;
> u8 buffer[HDMI_INFOFRAME_HEADER_SIZE + HDMI_SPD_INFOFRAME_SIZE];
> ssize_t err;
>
> - err = hdmi_spd_infoframe_init(&frame, vendor, product);
> + err = hdmi_spd_infoframe_init(&frame, bridge->vendor, bridge->product);
> if (err < 0) {
> dev_err(hdmi->dev, "Failed to initialize SPD infoframe: %zd\n",
> err);
> @@ -1328,7 +1327,7 @@ static void mtk_hdmi_send_infoframe(struct mtk_hdmi *hdmi,
> {
> mtk_hdmi_setup_audio_infoframe(hdmi);
> mtk_hdmi_setup_avi_infoframe(hdmi, mode);
> - mtk_hdmi_setup_spd_infoframe(hdmi, "mediatek", "On-chip HDMI");
> + mtk_hdmi_setup_spd_infoframe(hdmi);
> if (mode->flags & DRM_MODE_FLAG_3D_MASK)
> mtk_hdmi_setup_vendor_specific_infoframe(hdmi, mode);
> }
> @@ -1709,6 +1708,8 @@ static int mtk_hdmi_probe(struct platform_device *pdev)
> hdmi->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID
> | DRM_BRIDGE_OP_HPD;
> hdmi->bridge.type = DRM_MODE_CONNECTOR_HDMIA;
> + hdmi->bridge.vendor = "MediaTek";
> + hdmi->bridge.product = "On-Chip HDMI";
> drm_bridge_add(&hdmi->bridge);
>
> ret = mtk_hdmi_clk_enable_audio(hdmi);
> --
> 2.47.0
>
Powered by blists - more mailing lists