public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "Krzysztof Hałasa" <khalasa@piap.pl>
To: Jacopo Mondi <jacopo@jmondi.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Sakari Ailus <sakari.ailus@iki.fi>,
	Matteo Lisi <matteo.lisi@engicam.com>
Subject: Re: [PATCH v5] Driver for ON Semi AR0521 camera sensor
Date: Thu, 14 Oct 2021 12:43:24 +0200	[thread overview]
Message-ID: <m3lf2vkhtf.fsf@t19.piap.pl> (raw)
In-Reply-To: <20211014075955.xxbv2bzrx73v45bo@uno.localdomain> (Jacopo Mondi's message of "Thu, 14 Oct 2021 09:59:55 +0200")

Jacopo Mondi <jacopo@jmondi.org> writes:

>> This is BTW completely orthogonal to the -EBUSY on set_fmt(). The
>> effects will be exactly the same if the e.g. geometry changes come when
>> the sensor is not streaming.
>>
>
> No, this isn't true. Your s_fmt() implementation stops then restart the
> stream. It has an undocumented side effect and will cause undefined
> behaviour.

It will cause *at*most* a corrupted frame. On a MIPI link. That's right.
Such a corrupted frame will *at*most* cause some transient IO error - it
must not cause anything serious, because corrupted frames on MIPI can
happen for multiple reasons, some of which simply cannot be avoided.
BTW I will see if it's actually the case - chances are, there is no
corruption, but I tested it years ago and haven't yet checked my notes.

In fact those set_fmt() in other drivers may - or may not - cause
corrupted frames just the same.

> If your s_fmt() has to stop and restart streaming to take effect,
> it means userspace should instead stop the stream, change
> the format where opportune in the pipeline, and then restart the
> stream.

Maybe. This is a sensor driver - not userspace.
If the userspace uses it as a part of "frame grabber", it will certainly
do exactly that (nothing else would make sense in practice).

Unfortunately this all will have to wait a bit, so thanks for your help,
expect a new patch in few weeks.
-- 
Krzysztof "Chris" Hałasa

Sieć Badawcza Łukasiewicz
Przemysłowy Instytut Automatyki i Pomiarów PIAP
Al. Jerozolimskie 202, 02-486 Warszawa

      reply	other threads:[~2021-10-14 10:43 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-05 12:05 [PATCH v5] Driver for ON Semi AR0521 camera sensor Krzysztof Hałasa
2021-10-06 17:10 ` Sakari Ailus
2021-10-07  9:11   ` Krzysztof Hałasa
2021-10-09  9:07     ` Jacopo Mondi
2021-10-09 20:18       ` Randy Dunlap
2021-10-09 20:34         ` Sakari Ailus
2021-10-11  6:24           ` Krzysztof Hałasa
2021-10-11  6:20       ` Krzysztof Hałasa
2021-10-11  6:31         ` Laurent Pinchart
2021-10-12  7:52           ` Krzysztof Hałasa
2021-10-09 10:24 ` Jacopo Mondi
2021-10-11 12:19   ` Krzysztof Hałasa
2021-10-11 14:34     ` Jacopo Mondi
2021-10-11 22:22       ` Daniel Scally
2021-10-12  7:16         ` Jacopo Mondi
2021-10-12 12:24       ` Krzysztof Hałasa
2021-10-12 20:30         ` Sakari Ailus
2021-10-13  5:39           ` Krzysztof Hałasa
2021-10-20 18:43             ` Sakari Ailus
2021-10-22  6:42               ` Krzysztof Hałasa
2021-10-13  8:26         ` Jacopo Mondi
2021-10-13 12:55           ` Krzysztof Hałasa
2021-10-13 15:14             ` Jacopo Mondi
2021-10-14  5:43               ` Krzysztof Hałasa
2021-10-14  7:59                 ` Jacopo Mondi
2021-10-14 10:43                   ` Krzysztof Hałasa [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=m3lf2vkhtf.fsf@t19.piap.pl \
    --to=khalasa@piap.pl \
    --cc=jacopo@jmondi.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=matteo.lisi@engicam.com \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@iki.fi \
    /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