From: "CK Hu (胡俊光)" <ck.hu@mediatek.com>
To: "robh@kernel.org" <robh@kernel.org>,
"kishon@kernel.org" <kishon@kernel.org>,
"Chunfeng Yun (云春峰)" <Chunfeng.Yun@mediatek.com>,
"simona@ffwll.ch" <simona@ffwll.ch>,
"tzimmermann@suse.de" <tzimmermann@suse.de>,
"mripard@kernel.org" <mripard@kernel.org>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Bincai Liu (刘彬才)" <Bincai.Liu@mediatek.com>,
"Jitao Shi (石记涛)" <jitao.shi@mediatek.com>,
"maarten.lankhorst@linux.intel.com"
<maarten.lankhorst@linux.intel.com>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>,
"vkoul@kernel.org" <vkoul@kernel.org>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
"airlied@gmail.com" <airlied@gmail.com>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>
Cc: "dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"linux-phy@lists.infradead.org" <linux-phy@lists.infradead.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 4/4] drm/mediatek: dsi: Enable runtime PM
Date: Tue, 8 Apr 2025 08:44:01 +0000 [thread overview]
Message-ID: <9ce46eebdb6f8078c3b2ab5fbf2cdf2cff210726.camel@mediatek.com> (raw)
In-Reply-To: <20250407133138.22449-5-bincai.liu@mediatek.com>
On Mon, 2025-04-07 at 21:31 +0800, Bincai Liu wrote:
> This power is new added in MT8196. So runtime PM is enable
> to turn off dsi power to reduce power consumption.
I think you should describe why old SoC is not necessary to do this.
I guess that DSI and display pipeline share the same power in old SoC,
so DSI could not turn off the common power in old SoC.
Regards,
CK
>
> Signed-off-by: Bincai Liu <bincai.liu@mediatek.com>
> ---
> drivers/gpu/drm/mediatek/mtk_dsi.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
> index b1467d6bed06..21cfba1f9b89 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
> @@ -12,6 +12,7 @@
> #include <linux/of_platform.h>
> #include <linux/phy/phy.h>
> #include <linux/platform_device.h>
> +#include <linux/pm_runtime.h>
> #include <linux/reset.h>
> #include <linux/units.h>
>
> @@ -715,6 +716,7 @@ static int mtk_dsi_poweron(struct mtk_dsi *dsi)
> dsi->data_rate = DIV_ROUND_UP_ULL(dsi->vm.pixelclock * bit_per_pixel,
> dsi->lanes);
>
> + pm_runtime_get_sync(dsi->host.dev);
> ret = clk_set_rate(dsi->hs_clk, dsi->data_rate);
> if (ret < 0) {
> dev_err(dev, "Failed to set data rate: %d\n", ret);
> @@ -789,6 +791,7 @@ static void mtk_dsi_poweroff(struct mtk_dsi *dsi)
> clk_disable_unprepare(dsi->digital_clk);
>
> phy_power_off(dsi->phy);
> + pm_runtime_put_sync(dsi->host.dev);
>
> dsi->lanes_ready = false;
> }
> @@ -1272,6 +1275,7 @@ static int mtk_dsi_probe(struct platform_device *pdev)
> dsi->bridge.funcs = &mtk_dsi_bridge_funcs;
> dsi->bridge.of_node = dev->of_node;
> dsi->bridge.type = DRM_MODE_CONNECTOR_DSI;
> + pm_runtime_enable(dev);
>
> return 0;
> }
> @@ -1282,6 +1286,7 @@ static void mtk_dsi_remove(struct platform_device *pdev)
>
> mtk_output_dsi_disable(dsi);
> mipi_dsi_host_unregister(&dsi->host);
> + pm_runtime_disable(&pdev->dev);
> }
>
> static const struct mtk_dsi_driver_data mt8173_dsi_driver_data = {
prev parent reply other threads:[~2025-04-08 8:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 13:31 [PATCH 0/4] Add dsi support for mt8196 Bincai Liu
2025-04-07 13:31 ` [PATCH 1/4] dt-bindings: soc: mediatek: add mipi yaml for MT8196 Bincai Liu
2025-04-07 16:10 ` Conor Dooley
2025-04-07 13:31 ` [PATCH 2/4] dt-bindings: soc: mediatek: add dsi " Bincai Liu
2025-04-07 13:31 ` [PATCH 3/4] drm/mediatek: Add mipi dsi driver for mt8196 Bincai Liu
2025-04-08 6:10 ` CK Hu (胡俊光)
2025-04-07 13:31 ` [PATCH 4/4] drm/mediatek: dsi: Enable runtime PM Bincai Liu
2025-04-08 8:44 ` CK Hu (胡俊光) [this message]
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=9ce46eebdb6f8078c3b2ab5fbf2cdf2cff210726.camel@mediatek.com \
--to=ck.hu@mediatek.com \
--cc=Bincai.Liu@mediatek.com \
--cc=Chunfeng.Yun@mediatek.com \
--cc=airlied@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chunkuang.hu@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jitao.shi@mediatek.com \
--cc=kishon@kernel.org \
--cc=krzk+dt@kernel.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=maarten.lankhorst@linux.intel.com \
--cc=matthias.bgg@gmail.com \
--cc=mripard@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--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