linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix OV02C10 camera stability on Snapdragon X Elite
@ 2026-01-24  7:17 Saikiran
  2026-01-24  7:17 ` [PATCH] media: qcom: camss: Fix pipeline lock leak in stop_streaming Saikiran
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Saikiran @ 2026-01-24  7:17 UTC (permalink / raw)
  To: linux-media
  Cc: linux-arm-msm, rfoss, todor.too, bryan.odonoghue, bod,
	vladimir.zapolskiy, hansg, sakari.ailus, mchehab, Saikiran

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

Problems addressed:
===================

1. Camera pipeline permanently locked after application closes
   - Affects qcom-camss driver
   - Caused by early return in video_stop_streaming() on subdev errors
   - Result: Camera unusable until reboot

2. Silent failure in sensor disable path
   - Affects ov02c10 driver
   - I2C write errors during stream stop are silently ignored
   - Hinders debugging of power management issues

3. Brownout/latch-up from rapid power cycling
   - Affects ov02c10 driver
   - Occurs during browser WebRTC permission flows (rapid open/close/open)
   - Sensor microcontroller locks up requiring full system reboot
   - Root cause: Incomplete regulator discharge between power cycles

Without these fixes, the camera becomes permanently unusable after rapid
open/close cycles and requires a full system reboot to recover.

Testing:
========

All patches tested together on Linux 6.19-rc5 with:
- 50+ camera open/close/open rapid cycles (< 100ms between operations)
- Browser WebRTC permission flows (Chrome, Firefox, Brave)
- qcam stress testing
- libcamera/pipewire integration testing

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

Ubuntu bug tracking:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2138756

Patch overview:
===============

Patch 1: Fix qcom-camss pipeline lock leak
  - Ensures pipeline is always released even when subdevices fail to stop
  - Prevents permanent camera lockup
  - Improves error messages to identify failing subdevice

Patch 2: Add error logging to ov02c10 disable_streams
  - Captures and logs I2C write failures during stream stop
  - Still returns 0 to prevent pipeline lock leaks
  - Aids in debugging power management issues

Patch 3: Enforce 2-second power cycle cool-down in ov02c10
  - Tracks last power-off timestamp
  - Enforces minimum 2-second gap between power cycles
  - Tested delays: 900ms (failed), 1500ms (failed), 2000ms (reliable)
  - Improves power sequencing (MCLK off before regulators)
  - Zero performance penalty for normal usage (camera opened after >2s)

Impact:
=======

These patches resolve a critical user-facing issue where the camera becomes
completely unusable and requires a full system reboot to recover. This
commonly occurs during:
- Browser WebRTC permission prompts
- Video conferencing application startup
- Rapid application switching
- Camera application crashes with immediate restart

The fixes are conservative, well-tested, and maintain backward compatibility
while significantly improving system stability.

Saikiran (3):
  media: qcom: camss: Fix pipeline lock leak in stop_streaming
  media: i2c: ov02c10: Check for errors in disable_streams
  media: i2c: ov02c10: Enforce cool-down period to prevent brownout

 drivers/media/i2c/ov02c10.c                     | 75 +++++++++++++++++----
 drivers/media/platform/qcom/camss/camss-video.c | 13 ++--
 2 files changed, 74 insertions(+), 14 deletions(-)

--
2.51.0

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

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

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-24  7:17 [PATCH 0/3] Fix OV02C10 camera stability on Snapdragon X Elite Saikiran
2026-01-24  7:17 ` [PATCH] media: qcom: camss: Fix pipeline lock leak in stop_streaming Saikiran
2026-01-25 12:23   ` Bryan O'Donoghue
2026-01-24  7:17 ` [PATCH] media: i2c: ov02c10: Check for errors in disable_streams Saikiran
2026-01-25 12:26   ` Bryan O'Donoghue
2026-01-26 10:18   ` Hans de Goede
2026-01-24  7:17 ` [PATCH] media: i2c: ov02c10: Enforce cool-down period to prevent brownout Saikiran
2026-01-25 13:21   ` Bryan O'Donoghue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).