public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jason-JH Lin (林睿祥)" <Jason-JH.Lin@mediatek.com>
To: "jassisinghbrar@gmail.com" <jassisinghbrar@gmail.com>,
	"angelogioacchino.delregno@collabora.com"
	<angelogioacchino.delregno@collabora.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"Singo Chang (張興國)" <Singo.Chang@mediatek.com>,
	"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>,
	"Nancy Lin (林欣螢)" <Nancy.Lin@mediatek.com>,
	Project_Global_Chrome_Upstream_Group
	<Project_Global_Chrome_Upstream_Group@mediatek.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>
Subject: Re: [PATCH 2/2] mailbox: mtk-cmdq: Move pm_runimte_get and put to mbox_chan_ops API
Date: Thu, 20 Jun 2024 06:32:52 +0000	[thread overview]
Message-ID: <b7ebc021d391452eaf2149976ea2d53fba3d89fc.camel@mediatek.com> (raw)
In-Reply-To: <CABb+yY1Yy8o3ofAiC-uV+gDrO3QDTWz3_XTUMai_2uyrnj-VrQ@mail.gmail.com>

On Wed, 2024-06-19 at 10:38 -0500, Jassi Brar wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  On Wed, Jun 19, 2024 at 3:18 AM AngeloGioacchino Del Regno
> <angelogioacchino.delregno@collabora.com> wrote:
> > Il 18/06/24 17:59, Jassi Brar ha scritto:
> .....
> 
> > For example, when static content is displayed on screen, the CMDQ
> mailbox never
> > gets shut down, but no communication happens for a relatively long
> time; the
> > overhead of actually shutting down the mailbox and setting it back
> up would be
> > increasing latency in an unacceptable manner.
> >
> Hmm...  in your driver,  startup() is _empty_   and  shutdown() is
> all
> under a spin-lock with irqs disabled, so that too shouldn't be
> expensive. Right?
> Then what causes unacceptable latencies?
> 

I found that the BUG report only occurred when opening the camera APP.
Maybe something in imgsys_cmdq_sendtask() is too expensive or somewhere
else in imgsys driver.

I'm wondering why this BUG report is not occurred in display use case
which is more frequent than imgsys use case.
Does this mean sleep() is not always called in pm_runtime_get_sync()
and if we can guarantee this sleep() won't be called, then using
pm_runtime_get_sync() in atomic context is OK?

> > This is why I opted for autosuspend - it's only bringing down
> certain clocks for
> > the CMDQ HW, adding up a bit of power saving to the mix which, for
> some use cases
> > such as mobile devices with relatively small batteries, is
> definitely important.
> >
> > I'll also briefly (and only briefly) mention that 120Hz displays
> are already a
> > common thing and in this case the gap between TX and ACK is ~8.33ms
> instead, let
> > alone that displays with a framerate of more than 120Hz also do
> exist even though
> > they're less common.
> >
> I don't know how even busier channels help your point.
> 
> > All of the above describes a few of the reasons why autosuspend is
> a good choice
> > here, instead of a shutdown->startup flow.
> > And again - I can place some bets that PM would also be applicable
> to SoCs from
> > other vendors as well, with most probably different benefits (but
> still with some
> > power related benefits!) compared to MediaTek.

I agree with Angelo's point!


Regard,
Jason-JH Lin

> >
> Sure, if some platform _actually_ has a high channel
> startup()/shutdown() cost, it may need finer PM control. And I have a
> way for that, but even with that I am sure someone from MTK will
> realize they didn't need that.
> 
> Thanks.
> 






  reply	other threads:[~2024-06-20  6:33 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-14  4:01 [PATCH 0/2] Fix sleeping function called from invalid context Jason-JH.Lin
2024-06-14  4:01 ` [PATCH 1/2] mailbox: Add power_get/power_put API to mbox_chan_ops Jason-JH.Lin
2024-06-14 11:35   ` Markus Elfring
2024-06-18  6:26     ` Jason-JH Lin (林睿祥)
2024-06-14 16:23   ` kernel test robot
2024-06-14 16:55   ` kernel test robot
2024-06-14 18:51   ` kernel test robot
2024-06-17 12:39   ` Dan Carpenter
2024-06-14  4:01 ` [PATCH 2/2] mailbox: mtk-cmdq: Move pm_runimte_get and put to mbox_chan_ops API Jason-JH.Lin
2024-06-17 18:18   ` Jassi Brar
2024-06-18  8:42     ` Jason-JH Lin (林睿祥)
2024-06-18 15:59       ` Jassi Brar
2024-06-19  8:18         ` AngeloGioacchino Del Regno
2024-06-19 15:38           ` Jassi Brar
2024-06-20  6:32             ` Jason-JH Lin (林睿祥) [this message]
2024-06-20 14:39               ` Jassi Brar
2024-06-24 11:29                 ` AngeloGioacchino Del Regno
2024-06-24 17:45                   ` Jassi Brar
2024-06-25  3:40                     ` Jason-JH Lin (林睿祥)
2024-06-25  4:21                       ` Jassi Brar
2024-06-26  9:32                         ` Jason-JH Lin (林睿祥)
2024-06-28  3:40                           ` Jassi Brar
2024-07-03 16:41                             ` Jason-JH Lin (林睿祥)
2024-07-03 19:06                               ` Jassi Brar
2024-07-05  6:11                                 ` Jason-JH Lin (林睿祥)
2024-07-05 16:43                                   ` Jassi Brar
2024-07-11  2:00                                     ` Jason-JH Lin (林睿祥)
2024-07-11  3:47                                       ` Jassi Brar
2024-07-12  7:23                                         ` Jason-JH Lin (林睿祥)
2024-07-15  9:45                                           ` Jason-JH Lin (林睿祥)
2024-07-17 16:17                                             ` Jassi Brar

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=b7ebc021d391452eaf2149976ea2d53fba3d89fc.camel@mediatek.com \
    --to=jason-jh.lin@mediatek.com \
    --cc=Nancy.Lin@mediatek.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=Singo.Chang@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=chunkuang.hu@kernel.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    /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