From: Marco Ziliani <rylos78@gmail.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Jacopo Mondi <jacopo.mondi@ideasonboard.com>,
libcamera-devel@lists.libcamera.org, linux-media@vger.kernel.org,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Hans de Goede <hansg@kernel.org>,
Kieran Bingham <kieran.bingham@ideasonboard.com>,
Harvey Yang <chenghaoyang@chromium.org>,
Daniel Scally <dan.scally@ideasonboard.com>
Subject: Re: [RFC PATCH 0/2] libcamera: Power down the lens while the camera is idle
Date: Wed, 28 Oct 2026 12:31:39 +0100 [thread overview]
Message-ID: <20261028113139.36605-1-rylos78@gmail.com> (raw)
In-Reply-To: <20261028102323.GB2587630@killaraus.ideasonboard.com>
Hi Laurent,
On Wed, Oct 28, 2026 at 12:23:23PM +0200, Laurent Pinchart wrote:
> I want this discussion to involve the kernel side.
Agreed, adding linux-media and Sakari.
For the kernel side, the problem in short: lens (VCM) drivers such as
dw9714, dw9719 and ak7375 power the lens up on subdev open() and down
on close(). On ACPI platforms ipu-bridge also adds a DL_FLAG_PM_RUNTIME
device link from the VCM to its sensor, which Hans confirmed earlier in
this thread is needed because of shared power rails and I2C gating.
libcamera opens the lens subdev when it enumerates the cameras and
keeps it open, and the WirePlumber camera monitor keeps the
CameraManager alive for the whole session. On IPU3 and IPU6 Surface
devices the rear sensor therefore stays powered for as long as a user
is logged in.
The options I can see:
1. userspace opens the lens subdev only while the camera runs (this
RFC, and Harvey's patch [1]), which works with current kernels;
2. the kernel powers the VCM together with its sensor's stream (Hans'
series [2], or calling .enable_streams() on the VCM as Jacopo
suggested), with VCM drivers no longer powering up on open().
They are not exclusive: 1 fixes current kernels and stays correct once
2 is in place.
I can test either on a Surface Pro 5 (IPU3, ov8865 + dw9719).
[1] https://patchwork.libcamera.org/patch/21649/
[2] https://lore.kernel.org/linux-media/20240901211834.145186-1-hdegoede@redhat.com/
Regards,
Marco
parent reply other threads:[~2026-10-28 11:31 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20261028102323.GB2587630@killaraus.ideasonboard.com>]
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=20261028113139.36605-1-rylos78@gmail.com \
--to=rylos78@gmail.com \
--cc=chenghaoyang@chromium.org \
--cc=dan.scally@ideasonboard.com \
--cc=hansg@kernel.org \
--cc=jacopo.mondi@ideasonboard.com \
--cc=kieran.bingham@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=libcamera-devel@lists.libcamera.org \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.