Skip to content

[QUALIFICATION - DO NOT MERGE] SP11 v8 GPI ordering test - #46

Draft
ooaklee wants to merge 2 commits into
sp11/ubuntu-qcom-x1e-7.2.y-betafrom
sp11/qualification-7.2.2-v8
Draft

[QUALIFICATION - DO NOT MERGE] SP11 v8 GPI ordering test#46
ooaklee wants to merge 2 commits into
sp11/ubuntu-qcom-x1e-7.2.y-betafrom
sp11/qualification-7.2.2-v8

Conversation

@ooaklee

@ooaklee ooaklee commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Purpose

Build and physically test one hypothesis for the Surface Pro 11 touch/pen
regression: order the GPI event-ring producer-pointer read before consuming the
device-written coherent event element.

This is a disposable qualification branch. It targets beta for comparison and
review visibility, but must not merge. The reusable source change remains
isolated in #45.

Exact delta from beta

No early-EOT completion, audio repair, SPI-HID policy, MSHW0485 policy,
runtime-PM change, tracing dependency, delay, module parameter, or userspace
change is included.

Why this test is isolated

The failed v6 build accepted an RX completion for a 3628-byte descriptor but
reported the full 3628-byte residue, showing that the event length was observed
as zero. The failed v7 early-completion experiment converted that condition into
an invalid-cookie kernel BUG and was withdrawn. v19 remains stable on the same
hardware and userspace.

The v8 change preserves normal DMA completion ownership and changes only the
ordering of the device publication-pointer read. A sustained pass is consistent
with the ordering hypothesis, but cannot prove attribution by itself because
the known-good v19 baseline is an older kernel line. A repeat of the same
failure signature falsifies this repair more directly.

Pre-hardware validation

  • source branch is pinned to revision 8fbab0760dca and was fetched into an
    isolated Lexr work volume with --reset-source; its recorded source tree
    matches the committed revision, so unrelated local worktree edits were not
    built;
  • git diff --check: pass;
  • strict patch checkpatch.pl: 0 errors, 0 warnings, 0 checks;
  • targeted ARM64 drivers/dma/qcom/gpi.o build: pass;
  • full Lexr Ubuntu/ARM64 build from exact revision 8fbab0760dca: pass;
  • all four SHA256SUMS entries and Lexr kernel inspect: pass;
  • package control metadata: three arm64 packages plus all-architecture common
    headers, all at version 7.2.2-jg-0sp11v8;
  • the modules package contains the compressed GPI module and both declared
    Surface DTBs;
  • GitHub integration-delta check on dmaengine: qcom: gpi: order event ring pointer reads #45: pass;
  • adversarial OpenCode source review: no source-level critical, high, or medium
    findings; its final release review required the bounded attribution and
    audio-isolation documentation recorded here.

The full Ubuntu configuration emitted five non-fatal warnings in unmodified,
out-of-scope code: one unused UCSI helper, two Mellanox frame-size warnings,
and two WireGuard frame-size warnings. No warning involved GPI, SPI, HID, IPTS,
the SP11 device tree, or packaging.

Required Surface qualification

Preserve 7.2.0-jg-0sp11v19-qcom-x1e and its matching DTB as the verified
fallback. Software mute did not contain the v7 static, so the first v8 boot must
append this parameter to the v8 GRUB linux line with a one-time e edit:

module_blacklist=snd_soc_x1e80100,snd_soc_qcom_sdw,soundwire_qcom

This is a declared safety and isolation variable. It makes a passing result
evidence for touch transport under audio isolation only; it is not combined
beta qualification. Deferred codec/WSA probe messages are expected with these
machine/SoundWire modules blocked and are not by themselves a test failure.

  1. Install only the exact checksum-verified v8 Lexr bundle and confirm the
    per-ABI OLED Denali DTB is staged.
  2. Cold boot and verify uname -r is exactly
    7.2.2-jg-0sp11v8-qcom-x1e.
  3. Confirm the MSHW0485 SPI device, IPTS HID bridge, and input nodes bind before
    touching the display.
  4. Exercise touchscreen and pen continuously for at least 30 minutes, well
    beyond the former intermittent three-second window, including repeated idle
    periods.
  5. Exercise one suspend/resume only after the continuous test remains stable,
    then repeat touch and pen for at least another 10 minutes.
  6. Verify there is no SP11 QSPI pair failed, zero-length completion,
    DMA-cookie BUG, host-fault/reset loop, or loss of HIDRAW/IPTS.

If touch freezes the machine, the old residue signature recurs, or any DMA
ownership warning appears, close this qualification PR and #45 rather than
adding another repair to v8.

Merge policy

Do not merge this qualification branch under any outcome. After a hardware
pass, only #45 may become eligible for its normal review and merge decision,
followed by a fresh beta regression build. A compile-only pass is insufficient.
Do not attempt an unblacklisted beta boot until the loud-static audio defect has
its own qualified repair.

@ooaklee

ooaklee commented Sep 3, 2026

Copy link
Copy Markdown
Owner Author

CI-only relift after #49

This qualification branch was re-lifted from old head 8fbab0760dca728ccedcd9e9eb9de2a314ea4851 to new head ed731b7e158c1542992752a19d4527f7cf6068d3, based on beta 91baa27098d56592add2662bbdb48518b3da8442.

Verification before the force-with-lease update:

  • the complete topic + packaging delta, excluding the newly merged validator script, had an identical SHA-256 before and after the relift;
  • author name/email/date plus complete commit-message stream had an identical SHA-256;
  • git diff between the built old tree and refreshed tree lists only .github/scripts/check-sp11-integration.sh; and
  • the new remote per-commit validator passes both topic commits.

Therefore the existing v8 kernel packages remain exact for hardware behavior; this CI-only ancestry change does not require a rebuild. Hardware qualification is still pending.

The device writes event elements into coherent memory before publishing
its event ring read pointer. Both gpi_process_events() and
gpi_mark_stale_events() read that pointer through readl_relaxed() and then
consume the event memory without an ordering guarantee.

On architectures such as arm64, this can expose a published event before
all its fields are visible. Denali QSPI exposed this as an accepted
completion whose length was observed as zero.

Use ordered MMIO reads only for the event pointer. Keep all other register
accesses relaxed. This follows the ordered ioread32() pattern used by the
Qualcomm IPA GSI event-ring consumer.

Fixes: 5d0c353 ("dmaengine: qcom: Add GPI dma driver")
Signed-off-by: Leon Silcott <leon@boasi.io>
Signed-off-by: Leon Silcott <leon@boasi.io>
@ooaklee
ooaklee force-pushed the sp11/qualification-7.2.2-v8 branch from ed731b7 to e805a56 Compare September 3, 2026 12:13
@ooaklee

ooaklee commented Sep 3, 2026

Copy link
Copy Markdown
Owner Author

Final message-clean qualification head

After the tree-preserving #45 commit-message wrap, the unchanged v8 packaging commit was replayed onto the current topic head. Qualification head is now e805a5691d502dcd515594b515f9d6516602eb42. Its tree is exactly the prior built tree 394cd81631888d2fb063abd450a113d8f69e46bd; the existing v8 packages remain valid. Remote checks pass.

@ooaklee

ooaklee commented Sep 3, 2026

Copy link
Copy Markdown
Owner Author

v8 one-boot audio quarantine

The v8 qualification remains isolated to commit f35a9f804bdf (drivers/dma/qcom/gpi.c) plus its packaging commit. Because the earlier beta-derived qualification produced dangerous speaker static, v8 must test touch/GPI with the internal audio chain unavailable.

A read-only source and package audit confirmed that the four relevant drivers are modules in this build:

  • snd_soc_x1e80100
  • soundwire_qcom
  • snd_soc_wsa884x
  • snd_soc_lpass_wsa_macro

Blacklisting only the machine driver is insufficient: the SoundWire controller, WSA macro, and WSA884x codecs have independent modalias/probe paths. The one-boot v8 GRUB linux line must therefore include:

module_blacklist=snd_soc_x1e80100,soundwire_qcom,snd_soc_wsa884x,snd_soc_lpass_wsa_macro

This is an in-kernel module-loader blacklist, so it also covers initramfs and modalias load attempts. It is not a persistent configuration and must not be added to the fallback v19 entry.

Before the first touchscreen or pen contact, use keyboard/USB mouse and run this passive check:

grep -q 'module_blacklist=snd_soc_x1e80100,soundwire_qcom,snd_soc_wsa884x,snd_soc_lpass_wsa_macro' /proc/cmdline \
  || echo 'FAIL: v8 command line is missing the audio blacklist'

for m in snd_soc_x1e80100 soundwire_qcom snd_soc_wsa884x snd_soc_lpass_wsa_macro; do
  if awk -v m="$m" '$1 == m { found=1 } END { exit !found }' /proc/modules; then
    echo "FAIL: loaded module $m"
  fi
  [ ! -e "/sys/module/$m" ] || echo "FAIL: sysfs module $m"
  modinfo -n "$m" >/dev/null 2>&1 || echo "WARN: module file not found for $m"
done

if [ -r /proc/asound/cards ] && grep -Eiq 'x1e|wsa|sndcard' /proc/asound/cards; then
  echo 'FAIL: internal audio card is present'
else
  echo 'PASS: no internal audio card'
fi

sudo dmesg | grep 'is blacklisted' || true

Pass criteria are zero FAIL lines and no internal X1E/WSA card. Blacklist refusal messages are optional corroboration because drivers which were never requested emit no refusal. A WARN means the expected v8 module file was not found and the installed package must be verified before trusting the result.

Only after this passes should touch and pen be exercised. USB keyboard/mouse, QSPI, mshw0485_touch, IPTSD, and GPI DMA do not depend on these audio modules. Hardware qualification remains pending.

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