From: Bryan O'Donoghue <bod@kernel.org>
To: Frederic Stuyk <fstuyk@runbox.com>, hansg@kernel.org
Cc: mchehab@kernel.org, linux-media@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [BUG] OV02C10: image upside down in kernel 6.16
Date: Fri, 8 Aug 2025 10:33:37 +0100 [thread overview]
Message-ID: <bf53e762-883d-4e14-bf84-355ec9ed7ad3@kernel.org> (raw)
In-Reply-To: <fb156b5c-c83c-4d33-86bb-f3cc4cf39ada@kernel.org>
On 08/08/2025 10:27, Bryan O'Donoghue wrote:
> On 08/08/2025 10:03, Frederic Stuyk wrote:
>> Querying the sensor orientation metadata shows:
>>
>> $ v4l2-ctl -d /dev/v4l-subdev6 -C camera_sensor_rotation
>> camera_sensor_rotation: 0
>>
>> This control is read-only and cannot be changed.
>
> Register is defined but not used.
>
> deckard$ grep ROT drivers/media/i2c/ov02c10.c
> #define OV02C10_ROTATE_CONTROL CCI_REG8(0x3820)
> #define OV02C10_CONFIG_ROTATE 0x18
>
> ::set_ctrl()
> case V4L2_CID_HFLIP:
> case V4L2_CID_VFLIP:
> cci_write(ov02c10->regmap, OV02C10_ROTATE_CONTROL,
> ov02c10->hflip->val | ov02c10->vflip->val << 1, &ret);
>
> ::init_controls()
>
> ov02c10->hflip = v4l2_ctrl_new_std(ctrl_hdlr, &ov02c10_ctrl_ops,
> V4L2_CID_HFLIP, 0, 1, 1, 0);
> if (ov02e10->hflip)
> ov02e10->hflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT;
>
> ov02c10->vflip = v4l2_ctrl_new_std(ctrl_hdlr, &ov02c10_ctrl_ops,
> V4L2_CID_VFLIP, 0, 1, 1, 0);
> if (ov02c10->vflip)
> ov02c10->vflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT;
>
> Something like that should work.
>
> I think Hans said the ACPI tables provide the orientation for the sensor.
>
> ---
> bod
0x3820: default 0xa0
bit5: vflip_blc_0
bit4: vflip_0
bit3: hmirror_0
bit2: hbin4_0
bit1: hbin2_0
bit0: vbinf_0
So you want to set bit3 = 0x08
---
bod
next prev parent reply other threads:[~2025-08-08 9:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <7d38cf46-670e-462e-b7c2-78f9aaa9eb43@runbox.com>
2025-08-08 9:03 ` [BUG] OV02C10: image upside down in kernel 6.16 Frederic Stuyk
2025-08-08 9:27 ` Bryan O'Donoghue
2025-08-08 9:33 ` Bryan O'Donoghue [this message]
2025-08-08 14:49 ` Frederic Stuyk
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=bf53e762-883d-4e14-bf84-355ec9ed7ad3@kernel.org \
--to=bod@kernel.org \
--cc=fstuyk@runbox.com \
--cc=hansg@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.