Skip to content

media: qcom: restore SP11 camera parity gaps - #40

Draft
ooaklee wants to merge 7 commits into
sp11/ubuntu-qcom-x1e-7.2.y-betafrom
sp11/beta-camera-parity-repair
Draft

media: qcom: restore SP11 camera parity gaps#40
ooaklee wants to merge 7 commits into
sp11/ubuntu-qcom-x1e-7.2.y-betafrom
sp11/beta-camera-parity-repair

Conversation

@ooaklee

@ooaklee ooaklee commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Why this repair exists

The final-tree parity audit after packaging 7.2.2-sp11beta1 found that the
camera re-lift in #35 had omitted active behavior from the hardware-qualified
sp11/integration-7.2.x source. The affected candidate and package were
withdrawn before hardware testing.

This topic restores those behaviors as seven reviewable commits. The source
author dates for Leon Silcott are retained, while his author, committer, and
sign-off identity is consolidated to the preferred leon@boasi.io address. It
must remain draft until the exact stack passes the camera gate below.

Restored behavior

  1. exact stable replay of b910f68a07fe: disable unconfigured CSID680 RDI
    horizontal/vertical crop and drop engines;
  2. exact stable replay of 651e711719df: select MIPI RAW write-client mode
    for VFE680 RDI, consistent with the v17x/v480 RDI implementations;
  3. restore the exact one-trio C-PHY RAW10 3844-to-3840 receiver crop and
    source-pad propagation from 73960c772d24, including the final standalone
    IMX681 format signature from 6621d73e732c;
  4. restore explicit keep-all values for every CSID680 drop engine from
    1592ec377418;
  5. restore the CAMSS partial-stream-start unwind from 0097c12b0fec; and
  6. restore the exact X1E80100/IMX681-scoped read-only CSID and VFE stop
    diagnostics from 4d190bc96139; and
  7. contain the shared CSID680 and VFE680 register changes to the exact
    X1E80100 C-PHY RAW10 IMX681 signature, restoring prior behavior on every
    other route.

The complete camss-video.c and camss-csid.h results match the qualified
source tree. VFE and CSID preserve the qualified SP11 behavior but deliberately
differ elsewhere: C-PHY RX selection is limited to X1E80100, the X1E CSID clock
override is limited to C-PHY, and the restored register programming is selected
only by the qualified IMX681 transport and geometry signature.

Deliberate exclusions

  • The old CCS IMX681 experiment is not restored. In the qualified final tree,
    the Denali camera node binds sony,imx681 to the standalone driver; no live
    device-tree node binds the CCS IMX681 path. Restoring both implementations
    would retain unbound superseded code and risk a future ownership conflict.
  • The CCS-oriented camss_get_link_freq() upstream walk is not restored. The
    active standalone sensor is directly connected and exposes its link-frequency
    control on the sensor source pad. This remains documented as a latent CCS-only
    difference rather than being silently treated as parity.
  • Sensor MODE_SELECT diagnostics from the superseded CCS path are not copied
    into the standalone driver because they are absent from the qualified final
    standalone implementation. Active CSID/VFE diagnostics are retained.

Exact-current-head software evidence

  • seven per-commit strict checkpatch.pl runs: 0 errors, 0 warnings, 0 checks;
  • integration validator: pass, with only the three already recorded aggregate
    warnings and three pre-existing DWC3 alignment checks;
  • clean case-sensitive ARM64 ubuntu_x1e_defconfig build with W=1: all
    changed camera objects and complete qcom-camss.o link pass;
  • X1E/OLED, X1P/LCD, and Dell XPS 13 9345 DTBs: pass and byte-identical to the
    beta checkpoint;
  • independent read-only OpenCode final-tree audit corroborated the active
    omissions and the dead/replaced CCS classification.

Current re-lift verification

The seven-commit repair was re-lifted onto current beta bf631f9, producing head f1ee66a. Ordered stable patch IDs, Leon author identity, and subjects match the pre-sync series. git range-diff pairs every commit in order; only the first two commit messages add explicit Jeroen Karsies source-commit links. GitHub CI and a local detached-head rerun of the exact-current-head integration check pass. A fresh case-sensitive ARM64 W=1 build at this exact head and tree 4659d5af7dc6 passes for every changed camera object, the complete qcom-camss.o link, and all three representative DTBs. The X1E OLED, X1P LCD, and Dell DTB hashes are respectively 0448aa1d7060, 81e289dfbd49, and 7baa7f970464, matching the current beta evidence.

Required hardware gates

  • X1E/OLED: probe and topology, repeated and continuous 3840x2640 RAW10
    capture, correct stride/layout, controls, and privacy LED;
  • verify CSID packet/error counters, VFE completion, and no crop/drop or buffer
    corruption;
  • force or reproduce a partial stream-start failure, then confirm a clean retry
    without runtime-PM imbalance;
  • libcamera, PipeWire, browser preview, repeated stop/start, and suspend/resume;
  • retain the complete stop diagnostics for any failure report; and
  • non-SP11 VFE680 RDI regression testing before upstream submission.

This PR does not authorize merging this topic or the held aggregate stack.

Fixes: #35
Context: jglathe#79 (comment)

@ooaklee

ooaklee commented Sep 2, 2026

Copy link
Copy Markdown
Owner Author

Aggregate hardware qualification is tracked in #41 at exact candidate
08249986a3f4efd7e0826c29e830601bfde928ed (tree
da7479fbffe997cdc980a147b4cb929d71253185).

This topic remains draft. A green aggregate build or CI result does not satisfy
its topic-specific hardware, dependency, provenance, or non-SP11 gates. Record
full-system evidence in #41 and link the relevant result back here before this
topic leaves draft state.

PR #41 is a test-only aggregate and must close without merge.

@ooaklee

ooaklee commented Sep 3, 2026

Copy link
Copy Markdown
Owner Author

Camera provenance rewrite

The branch head is now 5dba023bc2ab7077b66be23b3d7080fc16542523.

The rewrite changes commit messages only. The previous head b26aac2cfb29facb8a814ba4f4b10daa0426d801 and current head have the same Git tree (098e0347e48a2f18dee04162237f965d6e85728c), and git diff --exit-code reports no content change. CI is green on the new head.

The first two guarded CAMSS adaptations now explicitly state that they are based on Jeroen Karsies' SP11 camera snapshot and link the exact source commit/blob. Leon remains the author and sole Signed-off-by identity (Leon Silcott <leon@boasi.io>). We intentionally did not add Co-developed-by for Jeroen because the source snapshot does not provide the corresponding developer sign-off required by kernel DCO conventions.

The rebuilt aggregate qualification bundle at 25b65b5ece94ab051e537bd85884a3bb1efcea31 includes this rewritten camera series and completed successfully with the same source tree/content as the prior aggregate head. Physical camera qualification is still required; this PR remains draft.

@ooaklee

ooaklee commented Sep 3, 2026

Copy link
Copy Markdown
Owner Author

Provenance audit: every relift/parity commit has a matching Leon Silcott <leon@boasi.io> sign-off and retains the public turbineBMW, Jeroen Karsies, and golden-integration source links. The inspected public turbineBMW patch series and Jeroen import do not carry reusable kernel DCO sign-offs for these rewritten commits. Preserve the current explicit source credit, do not fabricate contributor trailers, and obtain contributor confirmation before choosing any From:/Co-developed-by attribution for upstream submission. This is an upstream provenance gate; it does not turn software or future hardware qualification into permission to merge prematurely.

@ooaklee

ooaklee commented Sep 3, 2026

Copy link
Copy Markdown
Owner Author

Final-tree semantic audit against qualified v19: PASS

Independent OpenCode review and direct Git-object checks compared this branch (5dba023bc2ab) with the hardware-qualified v19 final tree (2cbd1ec3e2da):

  • camss-video.c is byte-identical in both trees (blob 7ff03ebb5450).
  • camss-csid.h is byte-identical in both trees (blob 7a91ff319ae9).
  • The remaining CSID/VFE differences only add containment: X1E80100, C-PHY, RAW10, 3840/3844×2640, and packed 3840×2640 stride 4800 as applicable.
  • The shipped x1e80100-microsoft-denali-oled.dts is byte-identical to v19 and supplies C-PHY trio 0, 1,203,000,000 Hz link frequency, 19.2 MHz MCLK4, sony,imx681, and the 3840×2640 RAW10 mode. Every containment predicate therefore evaluates true on the qualified route.
  • Active v19 RX selection, 3844→3840 crop, explicit keep-all drop state, MIPI RAW VFE mode, partial-start unwind, and stop diagnostics remain present.
  • Excluding the old unbound CCS experiment removes no active v19 DT path.

The standalone sensor now rejects an unsupported multi-trio/extra-frequency/non-19.2-MHz description at probe. That is an intentional guardrail, not a parity gap; the shipped Denali graph passes it.

No source-semantic blocker was found. Hardware camera gates in the PR body remain mandatory before merge.

@ooaklee
ooaklee force-pushed the sp11/beta-camera-parity-repair branch 2 times, most recently from 4f62790 to 9e90f8a Compare September 3, 2026 12:12
@ooaklee

ooaklee commented Sep 3, 2026

Copy link
Copy Markdown
Owner Author

Message-only submission cleanup

The bare external SHA in prose was replaced with “the first linked commit” so full-patch checkpatch no longer treats it as an unavailable local commit. The authoritative external Link: remains unchanged. Final tree, all author identities/dates/subjects, and source are unchanged. Current head: 9e90f8aaf0f6287cdefe7582dd7d2df68d460ca3; all seven full patches and source checks pass with zero findings.

The CSID680 RDI path enables horizontal and vertical crop/drop without
programming the corresponding configuration. Leave these optional
operations disabled while retaining the timestamp, packing and interrupt
setup. Do not add drop-pattern writes or sensor-specific crop geometry.

Adapt the enable-bit correction from Jeroen Karsies' SP11 camera bring-up
snapshot b08f76f40b8d7b715bd4da6aef484f86142cc147. This guarded
adaptation is based on Jeroen's original CAMSS implementation in commit
ae8ce1d84841a526644991ceb9b0e98c0bab36d3. Limit the change to receiver
setup.

This remains experimental groundwork: stream counters, capture layout
and repeated starts still need validation on the target hardware.

Link: karsies-wq/sp11-imx681-linux@ae8ce1d
Link: https://github.com/karsies-wq/sp11-imx681-linux/blob/b08f76f40b8d7b715bd4da6aef484f86142cc147/camss/camss-csid-680.c
Link: b910f68
Signed-off-by: Leon Silcott <leon@boasi.io>
Select the MIPI_RAW write-client mode used in Jeroen Karsies' SP11 camera
bring-up snapshot b08f76f40b8d7b715bd4da6aef484f86142cc147. Name the mode
bit and set it together with the existing write-client enable bit.

Keep stride, image configuration, packing, frame increment, interrupts
and stream lifecycle unchanged. This does not establish alignment padding
for unaligned packed RAW widths and does not enable any sensor.

This guarded adaptation is based on Jeroen's original CAMSS implementation
in the first linked commit. It remains experimental
until VFE680 stream status and capture layout are validated on the target
hardware.

Link: karsies-wq/sp11-imx681-linux@ae8ce1d
Link: https://github.com/karsies-wq/sp11-imx681-linux/blob/b08f76f40b8d7b715bd4da6aef484f86142cc147/camss/camss-vfe-680.c
Link: 651e711
Signed-off-by: Leon Silcott <leon@boasi.io>
Restore the CSID-specific part of the qualified camera path: detect the
one-trio C-PHY RAW10 3844x2640 sink format, decode it for the receiver
crop,
program a 3840-pixel horizontal crop, and expose 3840 pixels on the CSID
source pad.

Keep the final source branch's exact 3840-or-3844 IMX681 signature helper
so the standalone 3840x2640 driver can use the same guarded diagnostics.
C-PHY routing itself is already carried by the preceding beta camera
topic, so it is intentionally not duplicated here.

This extracts the remaining receiver-crop and standalone-signature
behavior from the two linked hardware-qualified source commits while
preserving their author.

Link: 73960c7
Link: 6621d73
Signed-off-by: Leon Silcott <leon@boasi.io>
Program period 1 and pattern 0 for the frame, pixel, and line drop
engines.
This preserves every RDI sample explicitly instead of relying on reset
values, while the independently configured IMX681 horizontal crop remains
enabled only for its exact C-PHY RAW10 geometry.

Extract the CSID portion of the hardware-qualified source commit and
preserve its author. Sensor, PHY, device-tree, and packaging changes from
that original multi-area commit are already represented by the preceding
beta camera topic.

Link: 1592ec3
Signed-off-by: Leon Silcott <leon@boasi.io>
Track the last subdevice that accepted stream start. If a later subdevice
fails, stop only the subdevices that were successfully started before
tearing down the media pipeline. Reuse the same helper for normal stream
stop and keep teardown going after nonfatal stop errors.

This preserves the CAMSS portion of the hardware-qualified source commit.
Its sensor, CCS, and packaging changes are not copied because the beta
already uses the validated standalone IMX681 driver and focused packaging.

Link: 0097c12
Signed-off-by: Leon Silcott <leon@boasi.io>
Sample read-only CSID680 receiver, packet, error, IRQ, crop, and linked-
RDI state while its clocks are still running. Sample matching VFE680
write-master and IRQ state before disabling the writer.

Keep the source branch's narrow activation signature: X1E80100,
one-trio C-PHY RAW10, 3840x2640 or its 3844-pixel pre-crop form, and the
exact packed VFE output geometry. Other SoCs, D-PHY routes, formats, and
VFE Lite remain unchanged.

This extracts the active CAMSS diagnostics from the hardware-qualified
source commit and preserves its author. The old CCS sensor diagnostics are
not copied: the qualified final tree replaced that unbound path with the
standalone IMX681 driver.

Link: 4d190bc
Signed-off-by: Leon Silcott <leon@boasi.io>
The qualified integration source applied its CSID680 keep-all state and
VFE680 MIPI RAW write mode to every user of those shared blocks. Preserve
the observed behavior for the X1E80100 C-PHY RAW10 IMX681 route while
restoring the existing programming for all other formats and SoCs.

Use the already exact transport and geometry signature for containment.
For that route, keep crop/drop disabled unless the 3844-to-3840 horizontal
crop is selected, explicitly program all drop engines to keep every
sample, and select the MIPI RAW VFE write-client mode. Other routes retain
their prior RDI flags, reset-value drop state, and VFE mode.

This is an intentional guardrail relative to the qualified source, not a
claim of cross-device equivalence. The SP11 path and a non-SP11 VFE680 RDI
path both require hardware qualification before integration.

Signed-off-by: Leon Silcott <leon@boasi.io>
@ooaklee
ooaklee force-pushed the sp11/beta-camera-parity-repair branch from 9e90f8a to f1ee66a Compare September 4, 2026 01:38
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