public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <johannes.goede@oss.qualcomm.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Hans Verkuil <hverkuil@kernel.org>,
	Bryan O'Donoghue <bod@kernel.org>,
	Heimir Thor Sverrisson <heimir.sverrisson@gmail.com>,
	Sebastian Reichel <sre@kernel.org>,
	linux-media@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v2 2/5] media: ov02c10: Adjust x-win/y-win when changing flipping to preserve bayer-pattern
Date: Wed, 7 Jan 2026 14:45:18 +0100	[thread overview]
Message-ID: <082db370-e6cb-45fd-aaf9-bcd9f80dc242@oss.qualcomm.com> (raw)
In-Reply-To: <aV5IH7PIFnySHhYC@kekkonen.localdomain>

Hi Sakari,

On 7-Jan-26 12:48, Sakari Ailus wrote:
> Hi Hans,
> 
> On Wed, Dec 10, 2025 at 12:24:33PM +0100, Hans de Goede wrote:
>> The ov02c10 is capable of having its (crop) window shifted around with 1
>> pixel precision while streaming.
>>
>> This allows changing the x/y window coordinates when changing flipping to
>> preserve the bayer-pattern.
> 
> Ideally we'd use the crop selection to configure this, but given these
> sensors (and drivers) are generally what they are, I guess this is probably
> a reasonable way to go.

Even in sensor drivers where we allow setting the crop selection
to get arbritrary modes, we always round the coordinates to a multiple
of 2, to avoid changing the bayer-pattern seen by userspace when
userspace changes the crop. See e.g. ov2680_set_selection().

And then when doing flipping we might add 1 to either the x and/or y
coordinate to the userspace provided crop x, y before sending it to
the sensor to make flipping not change the bayer order, see e.g.
ov01a10_set_hflip() after the v2 series you've here:

https://git.retiisi.eu/?p=~sailus/linux.git;a=shortlog;h=refs/heads/ov01a10

which does (simplified):

        offset = crop->left;
        if (hflip)
                offset++;

        cci_write(ov01a10->regmap, OV01A10_REG_X_WIN, offset, &ret);

IOW we are trying to not make userspace be able to affect the bayer-pattern
through setting the crop-selection and/or flip.

So I'm not sure what you mean with "Ideally we'd use the crop selection"
because we are actively trying to avoid to have the crop-selection change
the bayer order ?

Generally speaking I think we should avoid any settings change the bayer-order
whenever possible.

Regards,

Hans


here?





  reply	other threads:[~2026-01-07 13:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-10 11:24 [PATCH v2 regression fix for 6.19 0/5] media: ov02c10: h/vflip fixes Hans de Goede
2025-12-10 11:24 ` [PATCH v2 1/5] media: ov02c10: Fix bayer-pattern change after default vflip change Hans de Goede
2025-12-12  2:05   ` Sebastian Reichel
2025-12-10 11:24 ` [PATCH v2 2/5] media: ov02c10: Adjust x-win/y-win when changing flipping to preserve bayer-pattern Hans de Goede
2025-12-12  2:09   ` Sebastian Reichel
2026-01-07 11:48   ` Sakari Ailus
2026-01-07 13:45     ` Hans de Goede [this message]
2026-01-07 21:36       ` Sakari Ailus
2026-01-08  8:38         ` Hans de Goede
2026-01-08 12:18           ` Sakari Ailus
2025-12-10 11:24 ` [PATCH v2 3/5] media: ov02c10: Fix the horizontal flip control Hans de Goede
2025-12-12  2:10   ` Sebastian Reichel
2025-12-10 11:24 ` [PATCH v2 4/5] media: ipu-bridge: Add DMI quirk for Dell XPS laptops with upside down sensors Hans de Goede
2025-12-12  2:13   ` Sebastian Reichel
2026-01-07 21:53   ` Vladimir Zapolskiy
2026-01-08  8:40     ` Hans de Goede
2025-12-10 11:24 ` [PATCH v2 5/5] media: ov02c10: Remove unnecessary hflip and vflip pointers Hans de Goede
2025-12-12  2:10   ` Sebastian Reichel
2025-12-10 12:07 ` [PATCH v2 regression fix for 6.19 0/5] media: ov02c10: h/vflip fixes Hans Verkuil

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=082db370-e6cb-45fd-aaf9-bcd9f80dc242@oss.qualcomm.com \
    --to=johannes.goede@oss.qualcomm.com \
    --cc=bod@kernel.org \
    --cc=heimir.sverrisson@gmail.com \
    --cc=hverkuil@kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=sre@kernel.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