From: media-ci@linuxtv.org
To: Chris Simpson <chris@nilk.net>,
linux-pm@vger.kernel.org, linuxtv-commits@linuxtv.org,
Rafael J. Wysocki <rafael@kernel.org>
Subject: [media.git/next] media: ipu6: Keep psys out of direct-complete on system suspend
Date: Wed, 18 Nov 2026 21:55:20 +0000 [thread overview]
Message-ID: <E1xTnce-0008TD-2q@linuxtv.org> (raw)
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,
},
reply other threads:[~2026-11-18 22:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=E1xTnce-0008TD-2q@linuxtv.org \
--to=media-ci@linuxtv.org \
--cc=chris@nilk.net \
--cc=linux-media@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linuxtv-commits@linuxtv.org \
--cc=rafael@kernel.org \
/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