Skip to content

Fix OV02C10 camera color and stability issues

Saikiran linux-media 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 2 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 2 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Fix OV02C10 camera color and stability issues

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 [email protected]

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