public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix OV02C10 camera color and stability issues
@ 2026-01-24  7:43 Saikiran
  2026-01-24  7:43 ` [PATCH] media: i2c: ov02c10: Fix incorrect Bayer pattern to SGRBG10 Saikiran
  2026-01-24  7:43 ` [PATCH] media: i2c: ov02c10: Fix race condition in remove and relax reset timings Saikiran
  0 siblings, 2 replies; 5+ messages in thread
From: Saikiran @ 2026-01-24  7:43 UTC (permalink / raw)
  To: linux-media; +Cc: hansg, bod, sakari.ailus, mchehab, Saikiran

[-- 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-01-26 10:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-24  7:43 [PATCH 0/2] Fix OV02C10 camera color and stability issues Saikiran
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox