mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sergey Lebedev <lsa.uz@pm.me>
To: Kieran Bingham <kieran.bingham@ideasonboard.com>,
	linux-media@vger.kernel.org
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	German Pablo Lindo <germanpapulindez@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: i2c: ov13858: add horizontal and vertical flip controls
Date: Mon, 21 Sep 2026 09:38:08 +0000	[thread overview]
Message-ID: <20260921093800.83484-1-lsa.uz@pm.me> (raw)
In-Reply-To: <178998112223.1723501.7946524742858282804@ping.linuxembedded.co.uk>

Kieran,

You are right on all four. The bits are fine; the message was not.

1. The numbers are not an angle - nothing there is partly flipped.
   They are how the bits were found: every bit of 0x3820 through
   0x3823 written one at a time and ranked by correlation against a
   flipped reference, there being no public datasheet. "0.2" is a
   spread of 0.2 counts on a mean level of 70, from the same exercise.
   I included the working in case anyone later wanted more than the
   result; a commit message was the wrong place for it. v2 gives the
   result, and the method is yours for the asking.

2. I did check it myself, by eye, and that never reached the message.
   The four states are one contact sheet, which I have sent you
   directly rather than here because it is a 101 KB attachment:

     <EViHAe8VXLnuCLNW2WvrH9wZvJzSwWcAsaS16-dxkYEdCDlpHnQyQpkcfcEGYIIQ1jRO0ChI_aIXf-HNYdroAOlCbEg-BXux6yw76GGfA94=@pm.me>

   Unflipped is upside down, which is what userspace gets today;
   hflip+vflip is the one the right way up. Say the word and it goes to
   anyone else here.

3. The mirror bit is active low, and ov13b10 does the same:
   ov13b10_set_ctrl_hflip() clears BIT(3) of 0x3820 and
   ov13b10_set_ctrl_vflip() sets BIT(4) | BIT(5) of it. v2 says so at
   that line, rather than only in the defines at the top of the file.

Which makes this, in my own message, untrue:

> ov13b10 has the same two controls, but it is a different part and its
> bit assignments do not carry over.

They carry over exactly. BIT(5) differs only in where the mode tables
leave it - 0x88 and 0x8b there, 0xa8/0xab/0xac here - leaving this part
only BIT(4) to move. The real difference is the other way round:
ov13b10 shifts H_WIN_OFFSET and V_WIN_OFFSET on each flip to reverse
the Bayer order, and this one does neither. v2 says why, from the
picture rather than a statistic.

Thanks for the fast read.

Sergey


  reply	other threads:[~2026-09-21  9:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21  8:26 Sergey Lebedev
2026-09-21  8:58 ` Kieran Bingham
2026-09-21  9:38   ` Sergey Lebedev [this message]
2026-09-21 10:57   ` Dave Stevenson
2026-09-21 11:06     ` Sakari Ailus
2026-09-21 13:00       ` Sergey Lebedev

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=20260921093800.83484-1-lsa.uz@pm.me \
    --to=lsa.uz@pm.me \
    --cc=germanpapulindez@gmail.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@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

all inboxes | Powered by JetHome®