Linux Tegra architecture development
 help / color / mirror / Atom feed
* Forcing devices into idle
@ 2025-07-03 10:08 Thierry Reding
  2025-07-03 10:33 ` Oliver Neukum
  0 siblings, 1 reply; 8+ messages in thread
From: Thierry Reding @ 2025-07-03 10:08 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-pm, linux-arm-kernel, linux-tegra

[-- Attachment #1: Type: text/plain, Size: 1544 bytes --]

Hi Rafael, all,

I've been looking at adding support for VPR on Tegra. This is a special
type of protected memory (video protection region) and since it can be
used for potentially large video frames, it can grow fairly large. For
certain devices, this is prohibitively large, so the VPR needs to be
resizable at runtime.

One of the prerequisites for runtime resizing of the VPR is that certain
devices need to go into idle mode. Essentially they need to be suspended
before the VPR resize and resumed after.

Instead of adding some custom API to achieve this, I was hoping I could
use the PM framework for this. I can hook up devices with VPR using DT
properties, and using the reserved memory infrastructure I can get
access to all the necessary struct device:s for the devices that are
impacted by this.

Unfortunately, I can't seem to find a good way to force devices into an
idle mode using the existing APIs. I've had some success by running
pm_runtime_put_sync() and pm_runtime_get_sync() before and after the
resize on these devices, but that feels wrong, since these APIs are more
targeted at being called from the owning drivers themselves.

Any thoughts on how to solve this? Is the pm_runtime_{put,get}_sync()
method acceptable? If not, are there other alternatives to achieve the
same thing that I'm not aware of? Would it be useful to add a new set of
APIs to force devices into an idle state (which could be semantically
different from runtime suspend)? Or is this all too specific for any
kind of generic API?

Thanks,
Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-07-03 14:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-03 10:08 Forcing devices into idle Thierry Reding
2025-07-03 10:33 ` Oliver Neukum
2025-07-03 11:12   ` Rafael J. Wysocki
2025-07-03 12:06     ` Thierry Reding
2025-07-03 13:32       ` Thierry Reding
2025-07-03 13:46         ` Rafael J. Wysocki
2025-07-03 14:14           ` Thierry Reding
2025-07-03 14:22             ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox