public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Ricardo Ribalda <ribalda@chromium.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	Yunke Cao <yunkec@chromium.org>,
	Hans Verkuil <hverkuil@xs4all.nl>
Subject: Re: [PATCH v2 0/6] media: uvcvideo: Implement the Privacy GPIO as a subdevice
Date: Mon, 25 Nov 2024 14:35:35 +0100	[thread overview]
Message-ID: <ef51192b-4791-4e40-a27a-75318cada779@redhat.com> (raw)
In-Reply-To: <20241125125629.GB32280@pendragon.ideasonboard.com>

Hi,

On 25-Nov-24 1:56 PM, Laurent Pinchart wrote:
> On Mon, Nov 25, 2024 at 01:31:49PM +0100, Hans de Goede wrote:
>> Hi Ricardo,
>>
>> On 10-Nov-24 5:04 PM, Ricardo Ribalda wrote:
>>> On Sun, 10 Nov 2024 at 16:14, Laurent Pinchart wrote:
>>
>> <snip>
>>
>>>>> Can we start powering up the device during try/set fmt and then
>>>>> implement the format caching as an improvement?
>>>>
>>>> This sounds worth trying. We'll need to test it on a wide range of
>>>> devices though, both internal and external.
>>
>> Ack, as mentioned in the other mail which I just send I think
>> this is worth trying.
>>
>>> We still need a plan for asynchronous controls.
>>
>> As I mentioned in that other email I think we can do the same there.
>>
>> So basically delay powering up the camera from /dev/video# open till
>> the first moment we actually need to communicate to the camera and
>> track per file-handle if we did a usb_autopm_get_interface() for
>> that file-handle and if yes, then do the put-interface on file-handle
>> close.
>>
>>> And we have to decide if we stop supporting the uvc button (maybe we
>>> can start by moving USB_VIDEO_CLASS_INPUT_EVDEV to staging and see
>>> what happens?)
>>
>> As I mentioned in other threads I do not think that the button
>> only working changing from:
>>
>> "only works when /dev/video# is open"
>>
>> to:
>>
>> "only works when streaming from /dev/video#"
>>
>> (or actually only works when some action on the camera which
>> requires it to be powered-on has been done).
>>
>> is a big deal, since most apps which open /dev/video# for
>> a longer time will almost always do so to actually do something
>> with the camera, at which point the button will work just as
>> before.
>>
>> And for apps which only do a short-lived open of /dev/video#
>> the button does not work with the current code either.
>>
>> TL;DR: IMHO it is fine if the button only works when streaming.
> 
> I'm fine with that, we can reconsider if people complain. It would be
> painful though, as it could mean reverting everything we'll build
> related to power management from now on until someone notices the new
> behaviour, which could easily take a year. The risk is low, but the
> consequences serious.

I think that if some users complain we can just add a default off module
option to restore the old behavior for use-cases which somehow depend
on that.

Doing an extra usb_autopm_get_interface() + usb_autopm_put_interface()
at open/close() time if the option is set is easy, and that will just
render out other get() and put() calls into no-ops.

So we always have that route as an escape-hatch.

Regards,

Hans



  reply	other threads:[~2024-11-25 13:35 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-08 20:25 [PATCH v2 0/6] media: uvcvideo: Implement the Privacy GPIO as a subdevice Ricardo Ribalda
2024-11-08 20:25 ` [PATCH v2 1/6] media: uvcvideo: Factor out gpio functions to its own file Ricardo Ribalda
2024-11-08 20:25 ` [PATCH v2 2/6] media: uvcvideo: Re-implement privacy GPIO as a separate subdevice Ricardo Ribalda
2024-11-08 20:25 ` [PATCH v2 3/6] Revert "media: uvcvideo: Allow entity-defined get_info and get_cur" Ricardo Ribalda
2024-11-08 20:25 ` [PATCH v2 4/6] media: uvcvideo: Create ancillary link for GPIO subdevice Ricardo Ribalda
2024-11-10 10:05   ` Sakari Ailus
2024-11-08 20:25 ` [PATCH v2 5/6] media: v4l2-core: Add new MEDIA_ENT_F_GPIO Ricardo Ribalda
2024-11-08 20:25 ` [PATCH v2 6/6] media: uvcvideo: Use MEDIA_ENT_F_GPIO for the GPIO entity Ricardo Ribalda
2024-11-09 14:04 ` [PATCH v2 0/6] media: uvcvideo: Implement the Privacy GPIO as a subdevice Mauro Carvalho Chehab
2024-11-09 14:57   ` Ricardo Ribalda
2024-11-09 15:37 ` Hans de Goede
2024-11-09 16:29   ` Ricardo Ribalda
2024-11-10 10:02     ` Mauro Carvalho Chehab
2024-11-10 10:29       ` Hans Verkuil
2024-11-10 10:37         ` Ricardo Ribalda
2024-11-10 10:47           ` Hans Verkuil
2024-11-10 12:48           ` Mauro Carvalho Chehab
2024-11-10 10:32       ` Ricardo Ribalda
2024-11-10 10:59         ` Ricardo Ribalda
2024-11-10 12:46         ` Mauro Carvalho Chehab
2024-11-10 16:01           ` Ricardo Ribalda
2024-11-10 15:14     ` Laurent Pinchart
2024-11-10 16:04       ` Ricardo Ribalda
2024-11-25 12:31         ` Hans de Goede
2024-11-25 12:56           ` Laurent Pinchart
2024-11-25 13:35             ` Hans de Goede [this message]
2024-11-10 16:07       ` Ricardo Ribalda
2024-11-25 12:39         ` Hans de Goede
2024-11-25 12:58           ` Laurent Pinchart
2024-11-25 13:44             ` Hans de Goede
2024-11-25 13:50               ` Ricardo Ribalda
2024-11-11 12:03     ` Hans de Goede
2024-11-25 12:25     ` Hans de Goede
2024-11-25 12:49       ` Laurent Pinchart
2024-11-25 13:29         ` Hans de Goede
2024-11-26 17:22           ` Laurent Pinchart
2024-11-25 13:39       ` Ricardo Ribalda
2024-11-25 14:02         ` Hans de Goede
2024-11-26 16:22           ` Ricardo Ribalda
2024-11-26 17:18             ` Laurent Pinchart
2024-11-26 17:29               ` Ricardo Ribalda
2024-11-10 15:08   ` Laurent Pinchart
2024-11-11 12:59 ` Hans de Goede
2024-11-11 14:35   ` Hans de Goede
2024-11-12 17:31   ` Ricardo Ribalda
2024-11-13 15:19     ` Hans de Goede

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=ef51192b-4791-4e40-a27a-75318cada779@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=ribalda@chromium.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=yunkec@chromium.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