From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Guillaume Ranquet <granquet@baylibre.com>,
Rob Herring <robh+dt@kernel.org>,
Chun-Kuang Hu <chunkuang.hu@kernel.org>,
Chunfeng Yun <chunfeng.yun@mediatek.com>,
Jitao shi <jitao.shi@mediatek.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Vinod Koul <vkoul@kernel.org>, CK Hu <ck.hu@mediatek.com>,
Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@gmail.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
Kishon Vijay Abraham I <kishon@ti.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
linux-arm-kernel@lists.infradead.org, stuart.lee@mediatek.com,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org,
mac.shen@mediatek.com, linux-phy@lists.infradead.org
Subject: Re: [PATCH v3 12/12] drm/mediatek: dpi: Add mt8195 hdmi to DPI driver
Date: Mon, 7 Nov 2022 12:20:16 +0100 [thread overview]
Message-ID: <988b0a7a-69bb-34e4-e777-1d9516221077@collabora.com> (raw)
In-Reply-To: <20220919-v3-12-a803f2660127@baylibre.com>
Il 04/11/22 15:09, Guillaume Ranquet ha scritto:
> Add the DPI1 hdmi path support in mtk dpi driver
>
> Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
> ---
> drivers/gpu/drm/mediatek/mtk_dpi.c | 143 ++++++++++++++++++++++++++++++--
> drivers/gpu/drm/mediatek/mtk_dpi_regs.h | 5 ++
> 2 files changed, 141 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index 508a6d994e83..8052b47042b8 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -14,7 +14,10 @@
> #include <linux/of_graph.h>
> #include <linux/pinctrl/consumer.h>
> #include <linux/platform_device.h>
> +#include <linux/reset.h>
> #include <linux/types.h>
> +#include <linux/regmap.h>
> +#include <linux/mfd/syscon.h>
>
> #include <video/videomode.h>
>
> @@ -65,10 +68,14 @@ struct mtk_dpi {
> struct drm_bridge *next_bridge;
> struct drm_connector *connector;
> void __iomem *regs;
> + struct reset_control *reset_ctl;
> struct device *dev;
> struct clk *engine_clk;
> + struct clk *dpi_ck_cg;
> struct clk *pixel_clk;
> + struct clk *dpi_sel_clk;
> struct clk *tvd_clk;
> + struct clk *hdmi_cg;
I admit that I didn't really check these clocks, but judging by the names,
it is highly possible that one (or more) of them are supposed to be parents
of some others.
The first suspicious ones are dpi_ck_cg and dpi_sel_clk: please check.
I'm also not sure about the hdmi_cg, shouldn't the DPI have a HDMI port in
the graph that you'd declare in devicetree?
Besides... you're doing a lot of work to check if (is_internal_hdmi) for
power up/down paths, but seeing that you're introducing this change after
adding the HDMI driver makes me mostly sure that the internal hdmi that we're
talking about here is the one that is managed by the HDMIV2 driver... and
this means that you should really, really, really rely on connecting inputs
and outputs the right way in the devicetree, as that will most probably make
you able to write practically 0 code to manage power for the DPI... and may
also remove the need of adding the hdmi_cg clock here...
Regards,
Angelo
next prev parent reply other threads:[~2022-11-07 11:20 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 14:09 [PATCH v3 00/12] Add MT8195 HDMI support Guillaume Ranquet
2022-11-04 14:09 ` [PATCH v3 01/12] dt-bindings: phy: mediatek: hdmi-phy: Add mt8195 compatible Guillaume Ranquet
2022-11-07 11:20 ` AngeloGioacchino Del Regno
2022-11-07 14:41 ` Guillaume Ranquet
2022-11-04 14:09 ` [PATCH v3 02/12] dt-bindings: display: mediatek: add MT8195 hdmi bindings Guillaume Ranquet
2022-11-07 10:02 ` Krzysztof Kozlowski
2022-11-07 14:42 ` Guillaume Ranquet
2022-12-26 5:18 ` CK Hu (胡俊光)
2023-01-02 13:38 ` Guillaume Ranquet
2023-01-02 14:14 ` AngeloGioacchino Del Regno
2023-01-02 15:19 ` Guillaume Ranquet
2023-01-03 10:11 ` AngeloGioacchino Del Regno
2022-11-04 14:09 ` [PATCH v3 03/12] drm/mediatek: hdmi: use a regmap instead of iomem Guillaume Ranquet
2022-11-07 11:20 ` AngeloGioacchino Del Regno
2022-11-07 14:43 ` Guillaume Ranquet
2022-11-04 14:09 ` [PATCH v3 04/12] drm/mediatek: extract common functions from the mtk hdmi driver Guillaume Ranquet
2022-11-07 11:09 ` AngeloGioacchino Del Regno
2022-11-04 14:09 ` [PATCH v3 05/12] drm/mediatek: hdmi: make the cec dev optional Guillaume Ranquet
2022-11-04 14:09 ` [PATCH v3 06/12] drm/mediatek: hdmi: add frame_colorimetry flag Guillaume Ranquet
2022-11-07 11:09 ` AngeloGioacchino Del Regno
2022-11-07 14:57 ` Guillaume Ranquet
2022-11-04 14:09 ` [PATCH v3 07/12] drm/mediatek: hdmi: add v2 support Guillaume Ranquet
2022-12-26 3:12 ` CK Hu (胡俊光)
2022-11-04 14:09 ` [PATCH v3 08/12] drm/mediatek: hdmi: v2: add audio support Guillaume Ranquet
2022-11-07 11:09 ` AngeloGioacchino Del Regno
2022-11-04 14:09 ` [PATCH v3 09/12] phy: phy-mtk-hdmi: Add generic phy configure callback Guillaume Ranquet
2022-11-04 14:09 ` [PATCH v3 10/12] phy: mediatek: add support for phy-mtk-hdmi-mt8195 Guillaume Ranquet
2022-11-10 7:22 ` Vinod Koul
2022-11-04 14:09 ` [PATCH v3 11/12] dt-bindings: display: mediatek: dpi: Add compatible for MediaTek MT8195 Guillaume Ranquet
2022-11-04 14:09 ` [PATCH v3 12/12] drm/mediatek: dpi: Add mt8195 hdmi to DPI driver Guillaume Ranquet
2022-11-07 11:20 ` AngeloGioacchino Del Regno [this message]
2022-11-07 15:06 ` Guillaume Ranquet
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=988b0a7a-69bb-34e4-e777-1d9516221077@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--cc=airlied@gmail.com \
--cc=chunfeng.yun@mediatek.com \
--cc=chunkuang.hu@kernel.org \
--cc=ck.hu@mediatek.com \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=granquet@baylibre.com \
--cc=jitao.shi@mediatek.com \
--cc=kishon@ti.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-phy@lists.infradead.org \
--cc=mac.shen@mediatek.com \
--cc=matthias.bgg@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=robh+dt@kernel.org \
--cc=stuart.lee@mediatek.com \
--cc=vkoul@kernel.org \
/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