Skip to content

media: v4l2-subdev: opt into retaining failed stop state - #80

Merged
ooaklee merged 3 commits into
sp11/ubuntu-qcom-x1e-7.3.yfrom
fix/v4l2-retained-stop-opt-in-20261112
Nov 12, 2026
Merged

ooaklee merged 3 commits into
sp11/ubuntu-qcom-x1e-7.3.yfrom
fix/v4l2-retained-stop-opt-in-20261112

Conversation

@ooaklee

@ooaklee ooaklee commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

The legacy V4L2 stream wrapper masks every stop error and clears its enabled state. A helper-based driver that retains its stream resources after disable_streams() fails then cannot receive a later legacy stop retry.

Add an explicit V4L2_SUBDEV_FL_STOP_RETRY contract for drivers using the standard stream helper. For an opted-in driver, return the failed-stop error and retain enabled state. The driver must retain all streaming resources on failure and support a later retry. Unopted helper users and custom legacy callbacks keep their current behavior. This preparatory change opts in no production driver; the retaining VD55 implementation in #73 will opt in separately.

Independent review rejected an earlier helper-identity-only approach: IMX219/IMX335 can release PM resources before returning a stop error, so allowing a retry for all helper users could release twice. The explicit opt-in and compatibility regression cover that distinction.

Validation:

  • 192 assertions across five source-derived regression groups, plus API-disabled compatibility and five expected-failing controls, with ASan/UBSan.
  • Complete AArch64 drivers/media/v4l2-core/v4l2-subdev.o Kbuild with W=1, GCC 15.2 / GNU ld 2.46: passed without warnings.
  • Independent source/CI review: approved. GitHub source-regression CI passed on final head e912a865eb9a. The final CI-only follow-up rejects any unexpected diagnostics, including sanitizer output; source blobs match the AArch64-built revision.

This makes a stop failure observable and a subsequent explicit retry possible. CAMSS currently logs the error and continues; this change does not add automatic retry or establish physical quiescence. The broader camera draft still needs start/remove ownership, schema/full-composition and hardware qualification.

Drivers using the legacy stream helper can explicitly retain stream resources after disable_streams fails. Preserve the legacy enabled state and return the error only for those drivers, allowing a later explicit stop retry. Unopted helper users and custom legacy callbacks retain their existing behavior.

Document the full resource retention and retry contract. No production driver opts in in this preparatory change.
@ooaklee
ooaklee marked this pull request as ready for review November 12, 2026 03:17
@ooaklee
ooaklee merged commit 272ad6e into sp11/ubuntu-qcom-x1e-7.3.y Nov 12, 2026
1 check passed
ooaklee added a commit that referenced this pull request Nov 12, 2026
Port the SP11 camera research from the v25 native camera branch onto
the current 7.3 lifetime.

Add the OmniVision OV13858 device-tree binding and native OF power
management. Extend the ST VD55G1 driver for the VD55G0 global-shutter
sensor: indirect hardware register addressing, model/revision feature
abstraction, unified frame timing, corrected register access widths,
bounded optional LED configuration with illumination gated pending
qualification, GPIO inputs established after firmware boot, native
exposure and HDR limit retention, stream ownership preserved until
stop succeeds, legacy retries after retained stop errors, and safe
line lengths with sensor-style asynchronous registration. Narrow the
st,vd55g1 binding to avoid a family-wide fixed-address claim and
track both bindings in MAINTAINERS.

Validated with strict checkpatch, hermetic AArch64 W=1 builds, and
behavioral fixtures for the stop/retry ownership (see
sp11-driver-parity-artifacts/20261015/private/camera-v3*). The
v4l2-subdev retained-stop opt-in this series depends on merged
earlier as PR #80.

Assisted-by: Codex:gpt-5.6
Assisted-by: OpenCode:omni-route/zai/glm-5.3

Signed-off-by: Leon Silcott <lnsilcott@gmail.com>
ooaklee added a commit that referenced this pull request Nov 12, 2026
media: port OV13858 and VD55G0 research with explicit stop retries (#73)

Port the SP11 camera research from the v25 native camera branch onto
the current 7.3 lifetime.

Add the OmniVision OV13858 device-tree binding and native OF power
management. Extend the ST VD55G1 driver for the VD55G0 global-shutter
sensor: indirect hardware register addressing, model/revision feature
abstraction, unified frame timing, corrected register access widths,
bounded optional LED configuration with illumination gated pending
qualification, GPIO inputs established after firmware boot, native
exposure and HDR limit retention, stream ownership preserved until
stop succeeds, legacy retries after retained stop errors, and safe
line lengths with sensor-style asynchronous registration. Narrow the
st,vd55g1 binding to avoid a family-wide fixed-address claim and
track both bindings in MAINTAINERS.

Validated with strict checkpatch, hermetic AArch64 W=1 builds, and
behavioral fixtures for the stop/retry ownership (see
sp11-driver-parity-artifacts/20261015/private/camera-v3*). The
v4l2-subdev retained-stop opt-in this series depends on merged
earlier as PR #80.

Assisted-by: Codex:gpt-5.6
Assisted-by: OpenCode:omni-route/zai/glm-5.3

Signed-off-by: Leon Silcott <lnsilcott@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant