[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <672d86a9e9bb08c770a6884860e9d13a0aaf0eb7.camel@mediatek.com>
Date: Fri, 6 Oct 2023 09:15:58 +0000
From: Jason-JH Lin (林睿祥)
<Jason-JH.Lin@...iatek.com>
To: "jassisinghbrar@...il.com" <jassisinghbrar@...il.com>,
"angelogioacchino.delregno@...labora.com"
<angelogioacchino.delregno@...labora.com>,
"chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mediatek@...ts.infradead.org"
<linux-mediatek@...ts.infradead.org>,
Singo Chang (張興國)
<Singo.Chang@...iatek.com>,
Johnson Wang (王聖鑫)
<Johnson.Wang@...iatek.com>,
Jason-ch Chen (陳建豪)
<Jason-ch.Chen@...iatek.com>,
Shawn Sung (宋孝謙)
<Shawn.Sung@...iatek.com>,
Nancy Lin (林欣螢) <Nancy.Lin@...iatek.com>,
Project_Global_Chrome_Upstream_Group
<Project_Global_Chrome_Upstream_Group@...iatek.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"matthias.bgg@...il.com" <matthias.bgg@...il.com>
Subject: Re: [PATCH v2] mailbox: remove runtime GCE clk control
Hi Angelo,
Thanks for the reviews.
On Wed, 2023-10-04 at 11:20 +0200, AngeloGioacchino Del Regno wrote:
> Il 04/10/23 10:54, Jason-JH.Lin ha scritto:
> > 1. GCE is a frequently used module, so runtime controlling
> > GCE clock won't save too much power and its original design
> > doesn't expect it to be enabled and disabled too frequently.
> >
> > 2. Runtime controlling GCE clock will cause display HW register
> > configured in worng stream done event issue below:
> > GCE should config HW in every vblanking duration.
> > The stream done event is the start signal of vblanking.
> >
> > If stream done event is sent between GCE clk_disable
> > and clk_enable. After GCE clk_enable the stream done event
> > may not appear immediately and have about 3us delay.
> >
> > Normal case:
> > clk_disable -> get EventA -> clk_enable -> clear EventA
> > -> wait EventB -> get EventB -> config HW
> >
> > Abnormal case:
> > clk_disable -> get EventA -> clk_enable -> EventA delay appear
> > -> clear EventA fail -> wait EventB but get EventA -> config HW
> >
> > So just remove the runtime GCE clock contorl.
> >
> > Signed-off-by: Jason-JH.Lin <jason-jh.lin@...iatek.com>
>
> Instead of entirely removing the logic that controls the clocks and
> always
> refuse to save power, what about using autosuspend?
>
> If the two cases that you're describing are happening always in a
> range of
> time, we could *yes* remove the "manual" bulk disable/enable calls,
> but then
> we could use runtime_suspend/runtime_resume callbacks for that.
>
> Hint: pm_runtime_set_autosuspend_delay(dev, 1000);
>
> Regards,
> Angelo
>
These 2 issues are caused by GCE bulk_clk enable/disable too
frequently.
As I now, pm_runtime_set_autosuspend_delay() is for controlling the
power domain. The power domain of GCE is infrasys which can only be
enabled/disabled by spm during the whole system resume/suspend.
So I'm not sure about how can pm_runtime_set_autosuspend_delay() save
power for GCE bulk_clk in this case.
Could you give more hint for me please?
Regards,
Jason-JH.Lin
Powered by blists - more mailing lists