[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <efd20d11b7eb88df78be23d111f08fe79cedc38c.camel@mediatek.com>
Date: Fri, 29 Nov 2024 05:53:44 +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: "linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"tzimmermann@...e.de" <tzimmermann@...e.de>, "simona@...ll.ch"
<simona@...ll.ch>, "mripard@...nel.org" <mripard@...nel.org>,
"kernel@...labora.com" <kernel@...labora.com>, "p.zabel@...gutronix.de"
<p.zabel@...gutronix.de>, "maarten.lankhorst@...ux.intel.com"
<maarten.lankhorst@...ux.intel.com>, "conor+dt@...nel.org"
<conor+dt@...nel.org>, "robh@...nel.org" <robh@...nel.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.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>, "krzk+dt@...nel.org" <krzk+dt@...nel.org>
Subject: Re: [PATCH v1 7/7] drm/mediatek: Introduce HDMI/DDC v2 for
MT8195/MT8188
Hi, Angelo:
On Wed, 2024-11-20 at 13:45 +0100, AngeloGioacchino Del Regno wrote:
> External email : Please do not click links or open attachments until you have verified the sender or the content.
>
>
> Add support for the newer HDMI-TX (Encoder) v2 and DDC v2 IPs
> found in MediaTek's MT8195, MT8188 SoC and their variants, and
> including support for display modes up to 4k60 and for HDMI
> Audio, as per the HDMI 2.0 spec.
>
> HDCP and CEC functionalities are also supported by this hardware,
> but are not included in this commit.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
> ---
[snip]
> +static int mtk_hdmi_v2_probe(struct platform_device *pdev)
> +{
> + struct mtk_hdmi *hdmi;
> + int ret;
> +
> + hdmi = devm_kzalloc(&pdev->dev, sizeof(*hdmi), GFP_KERNEL);
Both v1 and v2 has this allocation, so make it as common code.
Regards,
CK
> + if (!hdmi)
> + return -ENOMEM;
> +
> + ret = mtk_hdmi_common_probe(pdev, hdmi);
> + if (ret)
> + return ret;
> +
> + hdmi->hpd = HDMI_PLUG_OUT;
> +
> + /*
> + * Disable all HW interrupts at probe stage and install the ISR
> + * but keep it disabled, as the rest of the interrupts setup is
> + * done in the .bridge_attach() callback, which will enable both
> + * the right HW IRQs and the ISR.
> + */
> + mtk_hdmi_hwirq_disable(hdmi);
> + irq_set_status_flags(hdmi->irq, IRQ_NOAUTOEN);
> + ret = devm_request_threaded_irq(&pdev->dev, hdmi->irq, mtk_hdmi_v2_isr,
> + mtk_hdmi_v2_isr_thread,
> + IRQ_TYPE_LEVEL_HIGH,
> + dev_name(&pdev->dev), hdmi);
> + if (ret)
> + return dev_err_probe(&pdev->dev, ret, "Cannot request IRQ\n");
> +
> + ret = devm_pm_runtime_enable(&pdev->dev);
> + if (ret)
> + return dev_err_probe(&pdev->dev, ret, "Cannot enable Runtime PM\n");
> +
> + return 0;
> +}
> +
>
Powered by blists - more mailing lists