public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Saikiran <bjsaikiran@gmail.com>
To: linux-media@vger.kernel.org
Cc: hansg@kernel.org, bod@kernel.org, sakari.ailus@linux.intel.com,
	mchehab@kernel.org, Saikiran <bjsaikiran@gmail.com>
Subject: [PATCH 0/2] Fix OV02C10 camera color and stability issues
Date: Sat, 24 Jan 2026 13:13:38 +0530	[thread overview]
Message-ID: <20260124074402.7165-1-bjsaikiran@gmail.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 3517 bytes --]

This series fixes critical color rendition and stability issues with the
OV02C10 camera sensor on Snapdragon X Elite platforms, specifically tested
on the Lenovo Yoga Slim 7x (x1e80100).

Relationship to other patch series:
------------------------------------
This is part of a coordinated effort to fully enable the OV02C10 camera
on Snapdragon X Elite:

1. **Device tree enablement** (by Aleksandrs Vinarskis - Unknown):
   - Fix RGB camera regulator supplies (avdd/dvdd/dovdd)
   - Enable camera privacy indicator LED
   - To be submitted to devicetree@vger.kernel.org

2. **Driver fixes for color and basic stability** (this series):
   - Fix incorrect Bayer pattern causing green tint
   - Fix race condition causing crashes on removal
   - Fix reset timing causing initialization failures

3. **Driver fixes for power cycling stability** (submitted Jan 24):
   - Fix qcom-camss pipeline lock leak
   - Add error checking in disable_streams
   - Enforce cool-down period to prevent brownout
   - Submitted separately, currently under review

All three series are complementary and address different aspects of
camera functionality. This series (2) can be reviewed independently
and benefits all OV02C10 platforms, not just x1e80100.

Issues fixed in this series:
-----------------------------
1. Incorrect Bayer pattern (SBGGR10 → SGRBG10)
   - Symptom: Severe green color tint in all captured images
   - Impact: Camera produces completely unusable images
   - Cause: Driver reports wrong pixel format to userspace
   - Testing: Compared all 4 Bayer patterns, only SGRBG10 produces
              natural colors on this hardware

2. Race condition in ov02c10_remove()
   - Symptom: Kernel oops with "Execute from non-executable memory"
   - Impact: System crashes when camera application closes or sensor removed
   - Cause: v4l2_ctrl_handler and media_entity freed before device powered off
   - Trigger: Concurrent userspace access during removal (PipeWire/WirePlumber)

3. Insufficient reset timing margins
   - Symptom: "master 1 queue 0 timeout" CCI I2C errors during initialization
   - Impact: Camera fails to initialize intermittently (10-20% failure rate)
   - Cause: Sensor microcontroller needs longer boot time than driver provides
   - Fix: Assert reset 2ms→5ms, post-reset delay 5ms→20ms

Without these fixes, even with correct power management, the camera produces
green-tinted unusable images and crashes during normal operations.

Testing:
--------
All patches tested together on Linux 6.19-rc5:
- libcamera/qcam: Color accuracy verification with test patterns
- Browser WebRTC: Vivaldi, Firefox, Brave camera permission flows
- PipeWire/WirePlumber: System integration testing
- Stress testing: 100+ camera open/close/remove cycles

Hardware tested:
- Lenovo Yoga Slim 7x (Snapdragon X Elite x1e80100)
- OmniVision OV02C10 2MP RGB camera sensor

Note on testing order:
The complete camera stack requires all patches, but these driver fixes
were validated by:
1. Applying Aleksandrs' DTS patches locally (hardware enablement)
2. Testing this series (fixes green tint and crashes)
3. Testing with brownout series (prevents power cycling issues)

Result: Fully functional camera with natural colors and stable operation.

Saikiran (2):
  media: i2c: ov02c10: Fix incorrect Bayer pattern to SGRBG10
  media: i2c: ov02c10: Fix race condition in remove and relax reset
    timings

 drivers/media/i2c/ov02c10.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

--
2.51.0

             reply	other threads:[~2026-01-24  7:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-24  7:43 Saikiran [this message]
2026-01-24  7:43 ` [PATCH] media: i2c: ov02c10: Fix incorrect Bayer pattern to SGRBG10 Saikiran
2026-01-26 10:15   ` Hans de Goede
2026-01-24  7:43 ` [PATCH] media: i2c: ov02c10: Fix race condition in remove and relax reset timings Saikiran
2026-01-26 10:16   ` Hans de Goede

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=20260124074402.7165-1-bjsaikiran@gmail.com \
    --to=bjsaikiran@gmail.com \
    --cc=bod@kernel.org \
    --cc=hansg@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