Linux Power Management development
 help / color / mirror / Atom feed
* [media.git/next] media: ipu6: Keep psys out of direct-complete on system suspend
@ 2026-11-18 21:55 media-ci
  0 siblings, 0 replies; only message in thread
From: media-ci @ 2026-11-18 21:55 UTC (permalink / raw)
  To: Chris Simpson, linux-pm, linuxtv-commits, Rafael J. Wysocki

On Sat Oct 17 16:13:38 2026 -0600, Chris Simpson wrote:
> Since commit a1fa010b3c9f ("driver core: auxiliary bus: Drop
> auxiliary_dev_pm_ops"), the auxiliary bus has no dev_pm_ops. The psys
> auxiliary device has no driver in mainline, and its PM domain,
> ipu6_bus_pm_domain, has only runtime PM callbacks. So
> device_pm_check_callbacks() now sets power.no_pm_callbacks for psys,
> and device_prepare() puts it in direct-complete.
> 
> A runtime-suspended psys in direct-complete gets its runtime PM
> disabled in device_suspend(). Runtime PM is enabled again only in
> psys's own device_resume(), which in practice runs after the PCI
> device's. Before, it came back in device_resume_early(). ipu6_resume(),
> the system resume callback of the PCI device, runtime-resumes psys
> before the firmware authentication. That now fails with -EACCES on
> every resume:
> 
>   auxiliary intel_ipu6.psys.40: Failed to get runtime PM
> 
> and ipu6_resume() returns early, skipping ipu6_buttress_authenticate().
> In secure mode the firmware is then not re-authenticated after resume,
> which matters whenever the IPU has lost power. On s2idle on a Surface
> Pro 9 the cameras still work, and the error is logged on every resume.
> 
> Add suspend and resume callbacks to ipu6_bus_pm_domain that forward to
> the driver. That is what the PM core does without them, so isys is
> unaffected, but psys has PM callbacks again and is not left in
> direct-complete. This restores the behaviour from before the auxiliary
> bus change.
> 
> The fix is kept local rather than in the auxiliary bus or the PM core:
> it is this driver that runtime-resumes a driverless child from its
> parent's ->resume().
> 
> Fixes: a1fa010b3c9f ("driver core: auxiliary bus: Drop auxiliary_dev_pm_ops")
> Cc: stable@vger.kernel.org # v7.1+
> Cc: Rafael J. Wysocki <rafael@kernel.org>
> Cc: linux-pm@vger.kernel.org
> Signed-off-by: Chris Simpson <chris@nilk.net>
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

Patch committed.

Thanks,
Sakari Ailus

 drivers/media/pci/intel/ipu6/ipu6-bus.c | 8 ++++++++
 1 file changed, 8 insertions(+)

---

diff --git a/drivers/media/pci/intel/ipu6/ipu6-bus.c b/drivers/media/pci/intel/ipu6/ipu6-bus.c
index 173616381f62..1b06e581edbd 100644
--- a/drivers/media/pci/intel/ipu6/ipu6-bus.c
+++ b/drivers/media/pci/intel/ipu6/ipu6-bus.c
@@ -63,8 +63,16 @@ out_err:
 	return -EBUSY;
 }
 
+/*
+ * The driverless psys device needs system sleep callbacks, or it is put in
+ * direct-complete and its runtime PM is normally still disabled when
+ * ipu6_resume() tries to runtime-resume it. These only forward to the driver,
+ * as the PM core would do without them.
+ */
 static struct dev_pm_domain ipu6_bus_pm_domain = {
 	.ops = {
+		.suspend = pm_generic_suspend,
+		.resume = pm_generic_resume,
 		.runtime_suspend = bus_pm_runtime_suspend,
 		.runtime_resume = bus_pm_runtime_resume,
 	},

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-18 22:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18 21:55 [media.git/next] media: ipu6: Keep psys out of direct-complete on system suspend media-ci

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