From: Hans de Goede <hdegoede@redhat.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Ricardo Ribalda <ribalda@chromium.org>
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>,
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v2 2/4] media: uvcvideo: Do not set an async control owned by other fh
Date: Wed, 4 Dec 2024 14:46:12 +0100 [thread overview]
Message-ID: <76c867e3-f13f-4afd-93be-639616dc9458@redhat.com> (raw)
In-Reply-To: <20241203193251.GA4242@pendragon.ideasonboard.com>
Hi,
On 3-Dec-24 8:32 PM, Laurent Pinchart wrote:
> On Mon, Dec 02, 2024 at 02:29:24PM +0100, Ricardo Ribalda wrote:
>> On Mon, 2 Dec 2024 at 13:19, Hans de Goede wrote:
>>> On 2-Dec-24 11:50 AM, Ricardo Ribalda wrote:
>>>> On Mon, 2 Dec 2024 at 11:27, Hans de Goede wrote:
<snip>
>>>>> Note that if we simply return -EBUSY on set until acked by a status
>>>>> event we also avoid the issue of ctrl->handle getting overwritten,
>>>>> but that relies on reliable status events; or requires timeout handling.
>>>>>
>>>>> 3. I agree with Ricardo that a timeout based approach for cameras which
>>>>> to not properly send status events for async ctrls is going to be
>>>>> problematic. Things like pan/tilt homing can take multiple seconds which
>>>>> is really long to use as a timeout if we plan to return -EBUSY until
>>>>> the timeout triggers. I think it would be better to just rely on
>>>>> the hardware sending a stall, or it accepting and correctly handling
>>>>> a new CUR_SET command while the previous one is still being processed.
>>>>>
>>>>> I guess we can track if the hw does send status events when async ctrls
>>>>> complete and then do the -EBUSY thing without going out to the hw after
>>>>> the first time an async ctrl has been acked by a status event.
>
> That sounds quite complex, and wouldn't guard against the status event
> being occasionally lost. I'm more concerned about devices that only
> occasionally mess up sending the status event, not devices that never
> send it.
I did wonder if we would see devices where the status event is
occasionally lost.
I think that patches 1-4 of "[PATCH v6 0/5] media: uvcvideo: Two +1 fixes for
async controls" solves the issue at hand nicely, so lets go with that.
And I hereby withdraw my proposal for a per ctrl flag to track if
we get status events for that control, because as you say that will
not work in the case where the status events are missing some of
the time (rather then the status events simply being never send).
Regards,
Hans
next prev parent reply other threads:[~2024-12-04 13:46 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-27 12:14 [PATCH v2 0/4] media: uvcvideo: Two fixes for async controls Ricardo Ribalda
2024-11-27 12:14 ` [PATCH v2 1/4] media: uvcvideo: Remove dangling pointers Ricardo Ribalda
2024-11-28 22:16 ` Laurent Pinchart
2024-11-28 22:25 ` Ricardo Ribalda
2024-11-28 22:28 ` Laurent Pinchart
2024-11-29 0:21 ` Ricardo Ribalda
2024-11-29 21:22 ` Ricardo Ribalda
2024-11-27 12:14 ` [PATCH v2 2/4] media: uvcvideo: Do not set an async control owned by other fh Ricardo Ribalda
2024-11-28 22:22 ` Laurent Pinchart
2024-11-28 22:28 ` Ricardo Ribalda
2024-11-28 22:33 ` Laurent Pinchart
2024-11-29 10:36 ` Hans Verkuil
2024-11-29 10:59 ` Ricardo Ribalda
2024-11-29 11:06 ` Laurent Pinchart
2024-11-29 11:54 ` Ricardo Ribalda
2024-11-29 13:13 ` Hans Verkuil
2024-11-29 13:41 ` Ricardo Ribalda
2024-11-29 18:47 ` Ricardo Ribalda
2024-11-29 22:03 ` Laurent Pinchart
2024-11-29 22:18 ` Ricardo Ribalda
2024-12-02 0:18 ` Laurent Pinchart
2024-12-02 7:28 ` Ricardo Ribalda
2024-12-02 8:38 ` Laurent Pinchart
2024-12-02 10:11 ` Ricardo Ribalda
2024-12-02 8:05 ` Hans Verkuil
2024-12-02 8:11 ` Laurent Pinchart
2024-12-02 8:44 ` Hans Verkuil
2024-12-02 10:26 ` Hans de Goede
2024-12-02 10:50 ` Ricardo Ribalda
2024-12-02 12:19 ` Hans de Goede
2024-12-02 13:29 ` Ricardo Ribalda
2024-12-03 19:32 ` Laurent Pinchart
2024-12-04 13:46 ` Hans de Goede [this message]
2024-12-02 10:55 ` Hans Verkuil
2024-12-03 17:18 ` Laurent Pinchart
2024-12-04 7:59 ` Hans Verkuil
2024-12-04 8:04 ` Hans Verkuil
2024-12-04 9:13 ` Laurent Pinchart
2024-12-04 9:02 ` Laurent Pinchart
2024-11-29 13:10 ` Hans Verkuil
2024-11-29 13:32 ` Hans Verkuil
2024-11-29 13:37 ` Ricardo Ribalda
2024-11-29 21:47 ` Laurent Pinchart
2024-11-29 11:01 ` Laurent Pinchart
2024-11-27 12:14 ` [PATCH v2 3/4] media: uvcvideo: Annotate lock requirements for uvc_ctrl_set Ricardo Ribalda
2024-11-28 21:51 ` Laurent Pinchart
2024-11-27 12:14 ` [PATCH v2 4/4] media: uvcvideo: Remove redundant NULL assignment Ricardo Ribalda
2024-11-28 21:26 ` Laurent Pinchart
2024-11-28 21:34 ` Ricardo Ribalda
2024-11-28 21:47 ` Laurent Pinchart
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=76c867e3-f13f-4afd-93be-639616dc9458@redhat.com \
--to=hdegoede@redhat.com \
--cc=guennadi.liakhovetski@intel.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab+samsung@kernel.org \
--cc=mchehab@kernel.org \
--cc=ribalda@chromium.org \
--cc=stable@vger.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
all inboxes | Powered by JetHome®