lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9ce46eebdb6f8078c3b2ab5fbf2cdf2cff210726.camel@mediatek.com>
Date: Tue, 8 Apr 2025 08:44:01 +0000
From: CK Hu (胡俊光) <ck.hu@...iatek.com>
To: "robh@...nel.org" <robh@...nel.org>, "kishon@...nel.org"
	<kishon@...nel.org>, Chunfeng Yun (云春峰)
	<Chunfeng.Yun@...iatek.com>, "simona@...ll.ch" <simona@...ll.ch>,
	"tzimmermann@...e.de" <tzimmermann@...e.de>, "mripard@...nel.org"
	<mripard@...nel.org>, AngeloGioacchino Del Regno
	<angelogioacchino.delregno@...labora.com>,
	Bincai Liu (刘彬才) <Bincai.Liu@...iatek.com>,
	Jitao Shi (石记涛) <jitao.shi@...iatek.com>,
	"maarten.lankhorst@...ux.intel.com" <maarten.lankhorst@...ux.intel.com>,
	"conor+dt@...nel.org" <conor+dt@...nel.org>, "chunkuang.hu@...nel.org"
	<chunkuang.hu@...nel.org>, "vkoul@...nel.org" <vkoul@...nel.org>,
	"krzk+dt@...nel.org" <krzk+dt@...nel.org>, "p.zabel@...gutronix.de"
	<p.zabel@...gutronix.de>, "airlied@...il.com" <airlied@...il.com>,
	"matthias.bgg@...il.com" <matthias.bgg@...il.com>
CC: "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
	"linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
	"linux-phy@...ts.infradead.org" <linux-phy@...ts.infradead.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 4/4] drm/mediatek: dsi: Enable runtime PM

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@...iatek.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 = {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ