Skip to content

drm/msm/dp: port AUX ownership and display state machine from 7.2 research - #85

Merged
ooaklee merged 2 commits into
sp11/ubuntu-qcom-x1e-7.3.yfrom
x/dp-aux-owner-cluster
Nov 14, 2026
Merged

ooaklee merged 2 commits into
sp11/ubuntu-qcom-x1e-7.3.yfrom
x/dp-aux-owner-cluster

Conversation

@ooaklee

@ooaklee ooaklee commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Summary

Ports the DP cluster rework from the 7.2 overlay (507356d03f3c) to the current 7.3 tree:

  • AUX transfer ownership (dp_aux.c/h): explicit owner model with fault draining, owner_stopping gating, and PHY-calibration-on-error handling
  • Ctrl transitions (dp_ctrl.c/h): state-lock-serialized resource transitions, phy_init/exit with newly_owned semantics, ownership/error query API (has_phy_refs, has_power_ref, link_regs_accessible, record_aux_fault)
  • Display lifecycle (dp_display.c): rewritten host state machine with admit/recover paths, locked IRQ handling, and bounded HPD/attention processing
  • Audio (dp_audio.c/h): msm_dp_audio_stop/restart entrypoints; ALSA intent survives video modesets
  • Panel/DRM glue: connector/bridge adaptation for the new lifecycle

Adaptations for the 7.3 base (re-derived, not copied)

  1. config_ctrl keeps the RMW clear of stream-specific bits from the media: port OV13858 and VD55G0 research with explicit stop retries (draft) #73 stream split (7de83c21291f) layered under the overlay rework.
  2. Bridge ops move .atomic_reset → .atomic_create_state (base 65dc3b473bb5c removed atomic_reset support).
  3. container_of splits and line wraps for the 100-col limit.

Build verification

On the Surface Pro 11 (native arm64 gcc 15.2, shipped 7.3.0-jg-1sp11v4 source + Ubuntu config): all 8 dp/*.o + full drivers/gpu/drm/msm/ compile with 0 warnings, 0 errors.

Test plan

  • Boot + internal display on SP11
  • DP altmode hotplug / unplug with a dock
  • External display modeset + suspend/resume under the dock
  • dmesg check for AUX fault drains / recover paths

Stacked context: base already carries #81/#82 merges. This PR is the dp cluster prerequisite for reopening the #72 family follow-ups.

@ooaklee

ooaklee commented Nov 14, 2026

Copy link
Copy Markdown
Owner Author

config_ctrl LSCLK dead-store fixed (from the dp-cluster port review, evidence/dp-cluster-port-review.md §1): the 2 << LSCLK_DIV_SHIFT default before the RMW read was a dead store — the read overwrote it. Now set after the RMW so the link divider is explicit on every configure. Rebuilt on the Surface (arm64 gcc 15.2, 7.3.0-jg-1sp11v4 headers): dp_ctrl.o builds with zero warnings. Other review verdicts: atomic_create_state usage correct, AUX fault-drain race-safe, no 7.2-era API leftovers.

…earch

Port the DP cluster rework from the 7.2 overlay (507356d) to the
current 7.3 tree: explicit AUX transfer ownership with fault draining,
state-lock-serialized ctrl transitions, audio restart/stop entrypoints,
and the rewritten dp_display host lifecycle.

Adaptations for the 7.3 base:
- config_ctrl keeps the RMW clear of stream-specific fields from the
  #73 stream split (commit 7de83c2), layered under the overlay
  rework.
- bridge ops switch from .atomic_reset to .atomic_create_state
  (base commit 65dc3b4 removed atomic_reset support).
- container_of and long-line wraps to keep checkpatch line-length
  clean.

Build-verified on the Surface Pro 11 (native arm64 gcc 15.2, shipped
7.3.0-jg-1sp11v4 source + Ubuntu config): all eight dp/*.o plus the
full msm/ directory compile with zero warnings or errors.

Signed-off-by: Leon Silcott <lnsilcott@gmail.com>
The 2 << LSCLK_DIV_SHIFT default written before the read-modify-write
was a dead store: the RMW immediately overwrote it, so the link-level
divider field kept whatever the register held instead of the intended
1/4 LCLK default. Move the default assignment after the RMW so the
divider is explicitly re-set on every configure, matching the intent of
the split in 7de83c2 (found in the dp-cluster port review).

Built on Surface Pro 11 (arm64 gcc 15.2, 7.3.0-jg-1sp11v4 headers),
zero warnings.

Signed-off-by: Leon Silcott <lnsilcott@gmail.com>
@ooaklee
ooaklee force-pushed the x/dp-aux-owner-cluster branch from cf18939 to 0ee2338 Compare November 14, 2026 05:55
@ooaklee
ooaklee merged commit 5feccf8 into sp11/ubuntu-qcom-x1e-7.3.y Nov 14, 2026
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