devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hansg@kernel.org>
To: Fabian Pfitzner <f.pfitzner@pengutronix.de>,
	Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jacopo Mondi <jacopo@jmondi.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, entwicklung@pengutronix.de
Subject: Re: [PATCH 0/2] parse horizontal/vertical flip properties
Date: Wed, 23 Jul 2025 15:02:42 +0200	[thread overview]
Message-ID: <b2976514-1dbd-4b2a-8df1-05beb98d93a1@kernel.org> (raw)
In-Reply-To: <3ac271c7-a67a-4f6f-935d-256937516068@pengutronix.de>

Hi,

On 23-Jul-25 12:09 PM, Fabian Pfitzner wrote:
> On 7/23/25 11:44, Jacopo Mondi wrote:
>> On Wed, Jul 23, 2025 at 11:29:27AM +0200, Fabian Pfitzner wrote:
>>> On 7/23/25 11:17, Jacopo Mondi wrote:
>>>> Hi Fabian
>>>>
>>>> On Wed, Jul 23, 2025 at 10:58:28AM +0200, Fabian Pfitzner wrote:
>>>>> There are cameras containing a mirror on their optical path e. g. when
>>>>> mounted upside down.
>>>> How is this different from 'rotation = 180' ?
>>> If you simply want to flip the output (e. g. horizontally), you cannot do
>>> this with a rotation.
>>> The camera I'm referring to is not only upside down, but also flipped
>>> horizontally.
>> 180 degress rotation = HFLIP + VFLIP
> I do not want to do both. Only one of them.
>>
>> Yes, you can't express 'mirror' in DTS, because DTS are about the
>> physical mounting rotation of the camera. Sensor drivers shall not
>> apply any flip control automatically, it's userspace that by parsing
>> the rotation property through the associated v4l2 controls should decide
>> if it has to apply flips or not to correct the images.
>>
>> What is the use case you had in mind ? Tell the driver through a DTS
>> property it has to apply flips to auto-compensate ? Because I think we
>> shouldn't and if I'm not mistaken we also document it:
>> https://www.kernel.org/doc/html/latest/userspace-api/media/drivers/camera-sensor.html#rotation-orientation-and-flipping
> I have a camera that does a horizontal flip in its hardware, so the output is not what I want. My example above was misleading. The rotation fixes the "upside down" problem, but does not fix the flip.

Hmm, so is there anything in the optical path causing just
a horizontal flip ? 

Because if not it sounds like the driver is simply buggy and
is applying hflip by default / applying hflip while the hflip
control is set to 0.

We've had this case a couple of times before. So it might just
be that we need to fix the driver here ...

Regards,

Hans


      parent reply	other threads:[~2025-07-23 13:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-23  8:58 [PATCH 0/2] parse horizontal/vertical flip properties Fabian Pfitzner
2025-07-23  8:58 ` [PATCH 1/2] media: dt-bindings: add " Fabian Pfitzner
2025-07-23  8:58 ` [PATCH 2/2] media: v4l: fwnode: parse horizontal/vertical " Fabian Pfitzner
2025-07-23  9:17 ` [PATCH 0/2] " Jacopo Mondi
2025-07-23  9:29   ` Fabian Pfitzner
2025-07-23  9:44     ` Jacopo Mondi
2025-07-23 10:09       ` Fabian Pfitzner
2025-07-23 12:21         ` Jacopo Mondi
2025-07-23 12:50           ` Fabian Pfitzner
2025-07-23 13:00           ` Dave Stevenson
2025-07-23 13:48             ` Fabian Pfitzner
2025-07-23 14:33               ` Dave Stevenson
2025-07-24  9:56                 ` Laurent Pinchart
2025-07-23 13:02         ` Hans de Goede
2025-07-23 13:02         ` 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=b2976514-1dbd-4b2a-8df1-05beb98d93a1@kernel.org \
    --to=hansg@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=entwicklung@pengutronix.de \
    --cc=f.pfitzner@pengutronix.de \
    --cc=jacopo.mondi@ideasonboard.com \
    --cc=jacopo@jmondi.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=robh@kernel.org \
    --cc=sakari.ailus@linux.intel.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;
as well as URLs for NNTP newsgroup(s).