mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
To: Devarsh Thakkar <devarsht@ti.com>,
	"jackson.lee" <jackson.lee@chipsnmedia.com>,
	"mchehab@kernel.org" <mchehab@kernel.org>,
	 "sebastian.fricke@collabora.com"
	<sebastian.fricke@collabora.com>
Cc: "linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	 "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"hverkuil@xs4all.nl" <hverkuil@xs4all.nl>,
	 Nas Chung <nas.chung@chipsnmedia.com>,
	"lafley.kim" <lafley.kim@chipsnmedia.com>,
	"b-brnich@ti.com" <b-brnich@ti.com>,
	"Luthra, Jai" <j-luthra@ti.com>, Vibhore <vibhore@ti.com>,
	 Dhruva Gole <d-gole@ti.com>, Aradhya <a-bhatia1@ti.com>,
	"Raghavendra, Vignesh" <vigneshr@ti.com>
Subject: Re: [RESEND PATCH v6 2/4] media: chips-media: wave5: Support runtime suspend/resume
Date: Thu, 20 Jun 2024 13:32:52 -0400	[thread overview]
Message-ID: <07d56a690d5fed16082e73c5565b67777e31494a.camel@collabora.com> (raw)
In-Reply-To: <e901967f-59df-f4b0-de51-61e542c04161@ti.com>

Le jeudi 20 juin 2024 à 19:50 +0530, Devarsh Thakkar a écrit :
> Hi Nicolas,
> 
> On 20/06/24 19:35, Nicolas Dufresne wrote:
> > Hi Devarsh,
> > 
> > Le jeudi 20 juin 2024 à 15:05 +0530, Devarsh Thakkar a écrit :
> > > In my view the delayed suspend functionality is generally helpful for devices
> > > where resume latencies are higher for e.g. this light sensor driver [2] uses
> > > it because it takes 250ms to stabilize after resumption and I don't see this
> > > being used in codec drivers generally since there is no such large resume
> > > latency. Please let me know if I am missing something or there is a strong
> > > reason to have delayed suspend for wave5.
> > 
> > It sounds like you did proper scientific testing of the suspend results calls,
> > mind sharing the actual data ?
> 
> Nopes, I did not do that but yes I agree it is good to profile and evaluate
> the trade-off but I am not expecting 250ms kind of latency. I would suggest
> Jackson to do the profiling for the resume latencies.

I'd clearly like to see numbers before we proceed.

> 
> But perhaps a separate issue, I did notice that intention of the patchset was
> to suspend without waiting for the timeout if there is no application having a
> handle to the wave5 device but even if I close the last instance I still see
> the IP stays on for 5seconds as seen in this logs [1] and this perhaps could
> be because extra pm counter references being hold.

Not sure where this comes from, I'm not aware of drivers doing that with M2M
instances. Only 

> 
> [2024-06-20 12:32:50] Freeing pipeline ...
> 
> and after 5 seconds..
> 
> [2024-06-20 12:32:55] |   204     | AM62AX_DEV_CODEC0 | DEVICE_STATE_ON |
> [2024-06-20 12:32:56] |   204     | AM62AX_DEV_CODEC0 | DEVICE_STATE_OFF
> 
> [1]: https://gist.github.com/devarsht/009075d8706001f447733ed859152d90

Appart from the 5s being too long, that is expected. If it fails after that,
this is a bug, we we should hold on merging this until the problem has been
resolved.

Imagine that userspace is going gapless playback, if you have a lets say 30ms on
forced suspend cycle due to close/open of the decoder instance, it won't
actually endup gapless. The delay will ensure that we only suspend when needed.

There is other changes I have asked in this series, since we always have the
case where userspace just pause on streaming, and we want that prolonged paused
lead to suspend. Hopefully this has been strongly tested and is not just added
for "completeness".

Its important to note that has a reviewer only, my time is limited, and I
completely rely on the author judgment of delay tuning and actual testing.

Nicolas

> 
> Regards
> Devarsh


  reply	other threads:[~2024-06-20 17:32 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-17 10:48 [RESEND PATCH v6 0/4] Add features to an existing driver Jackson.lee
2024-06-17 10:48 ` [RESEND PATCH v6 1/4] media: chips-media: wave5: Support SPS/PPS generation for each IDR Jackson.lee
2024-06-17 10:48 ` [RESEND PATCH v6 2/4] media: chips-media: wave5: Support runtime suspend/resume Jackson.lee
2024-06-19 13:00   ` Devarsh Thakkar
2024-06-19 23:56     ` jackson.lee
2024-06-20  0:11       ` jackson.lee
2024-06-20  9:35         ` Devarsh Thakkar
2024-06-20 14:05           ` Nicolas Dufresne
2024-06-20 14:20             ` Devarsh Thakkar
2024-06-20 17:32               ` Nicolas Dufresne [this message]
2024-06-21  0:30                 ` jackson.lee
2024-06-21 11:55                   ` Devarsh Thakkar
2024-06-21 12:45                     ` jackson.lee
2024-06-21 12:31                 ` Devarsh Thakkar
2024-07-15 17:01                   ` Nicolas Dufresne
2024-07-12  6:10                 ` jackson.lee
2024-07-15 17:05                   ` Nicolas Dufresne
2024-07-16  1:02                     ` jackson.lee
2024-06-20 14:03       ` Nicolas Dufresne
2024-06-20 14:52         ` Devarsh Thakkar
2024-06-20 15:24           ` Nicolas Dufresne
2024-06-21  7:36             ` jackson.lee
2024-06-20 15:20   ` Nicolas Dufresne
2024-06-17 10:48 ` [RESEND PATCH v6 3/4] media: chips-media: wave5: Use helpers to calculate bytesperline and sizeimage Jackson.lee
2024-06-17 10:48 ` [RESEND PATCH v6 4/4] media: chips-media: wave5: Support YUV422 raw pixel-formats on the encoder Jackson.lee
2024-06-18  9:29 ` [RESEND PATCH v6 0/4] Add features to an existing driver Sebastian Fricke
2024-06-19  5:38   ` jackson.lee

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=07d56a690d5fed16082e73c5565b67777e31494a.camel@collabora.com \
    --to=nicolas.dufresne@collabora.com \
    --cc=a-bhatia1@ti.com \
    --cc=b-brnich@ti.com \
    --cc=d-gole@ti.com \
    --cc=devarsht@ti.com \
    --cc=hverkuil@xs4all.nl \
    --cc=j-luthra@ti.com \
    --cc=jackson.lee@chipsnmedia.com \
    --cc=lafley.kim@chipsnmedia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=nas.chung@chipsnmedia.com \
    --cc=sebastian.fricke@collabora.com \
    --cc=vibhore@ti.com \
    --cc=vigneshr@ti.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

all inboxes | Powered by JetHome®