mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans de Goede <hansg@kernel.org>
To: Ricardo Ribalda <ribalda@chromium.org>,
	Muhammad Waleed Badar <walid.badar@gmail.com>
Cc: linux-media@vger.kernel.org,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: uvcvideo: Handle payloads starting in the middle of a bulk URB
Date: Mon, 12 Oct 2026 15:04:53 +0200	[thread overview]
Message-ID: <af1ff8d7-16a3-49ce-86ae-f944978f869b@kernel.org> (raw)
In-Reply-To: <CANiDSCtSo2nmbjzWC8CC3GAg2vsh-OBBW1-Skogb4tFpZ240-w@mail.gmail.com>

Hi,

On 12-Oct-26 03:54, Ricardo Ribalda wrote:
> Hi Muhammad
> 
> I understand that this is a RFC. Let's focus on the problem before we
> discuss the code.
> 
> Currently, both for isoc and bulk, if the camera appends some data at
> the end of the frame (let's call it trailer data) it is silently
> discarded. With your proposal, this trailer data will be considered
> part of the next frame.
> 
> The trailer data is out of spec (check figure 2-12 of the spec), but
> having multiple frames in the same bulk package is also out of spec
> (For some reason the bulk cameras are the worst at following the spec,
> no idea why).
> 
> Your proposal (again, not looking at the code yet), will fix the
> problem for some of the broken cameras but ti will completely break
> the driver for other family of broken cameras (the ones that have
> trailer data).
> 
> If we want to automatically handle your family of broken cameras we should:
> 
> - Add heuristics to also handle the camera with trailer camera (does
> the extra data look like a uvc header?)
> - Add a non compliance warning so the vendors have some feedback about
> their wrongness.

If I understand things correctly from the email thread + previous patch
there is only 1 USB vid:pid combo which needs this.

So although I'm normally in favor of heuristics over per device quirks
I think in this case a device-quirk might make more sense ?

Regards,

Hans


      reply	other threads:[~2026-10-12 13:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-09 16:52 Muhammad Waleed Badar
2026-10-12  1:54 ` Ricardo Ribalda
2026-10-12 13:04   ` Hans de Goede [this message]

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=af1ff8d7-16a3-49ce-86ae-f944978f869b@kernel.org \
    --to=hansg@kernel.org \
    --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=walid.badar@gmail.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 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®