This commit is contained in:
david rice
2026-04-22 14:29:27 +01:00
parent b2b2b2c2f7
commit 84ccfb7379
2 changed files with 9 additions and 40 deletions

View File

@@ -65,9 +65,6 @@ CLK_LP_LOW_MIN_NS = 300.0
HS_BURST_AMPLITUDE_MIN_MV = 40.0 # mV — below this, no real HS burst is present HS_BURST_AMPLITUDE_MIN_MV = 40.0 # mV — below this, no real HS burst is present
# Lowered from 50 mV: 48 mV capture (0001) was a false alarm; true flicker (0008) at 34 mV. # Lowered from 50 mV: 48 mV capture (0001) was a false alarm; true flicker (0008) at 34 mV.
HS_BURST_AMPLITUDE_HIGH_MV = 70.0 # mV — above this with short LP-low → anomalous LP states
# Normal HS (dynamic video) = ~1540 mV P95-P5/2 on LP probe (RC-filtered).
# LP-01/LP-10 states in the burst window (cap 0042 type) produce 130+ mV → flag these.
# Mode A minimum amplitude: LP-11-return edge artifacts produce near-zero amplitude in the # Mode A minimum amplitude: LP-11-return edge artifacts produce near-zero amplitude in the
# burst window (burst is pure LP-low DC between two LP-11 regions). Require ≥ this to # burst window (burst is pure LP-low DC between two LP-11 regions). Require ≥ this to
@@ -997,7 +994,7 @@ def analyze_lp_file(path: Path) -> "LPMetrics":
f"(TCLK_PREPARE+TCLK_ZERO minimum) — SN65DSI83 may fail to lock CLK lane" f"(TCLK_PREPARE+TCLK_ZERO minimum) — SN65DSI83 may fail to lock CLK lane"
) )
# Flicker suspect: four confirmed failure modes on this hardware: # Flicker suspect: three confirmed failure modes on this hardware:
# #
# A) Normal LP-low (~342380 ns) → bridge misses SoT → returns to LP-11 # A) Normal LP-low (~342380 ns) → bridge misses SoT → returns to LP-11
# Signature: lp11_to_hs fires at real LP-low end (~347 ns), hs_amplitude ≈ 1530 mV. # Signature: lp11_to_hs fires at real LP-low end (~347 ns), hs_amplitude ≈ 1530 mV.
@@ -1007,21 +1004,13 @@ def analyze_lp_file(path: Path) -> "LPMetrics":
# A2) LP-11 present, HS attempt made but amplitude too weak for rolling-std to fire # A2) LP-11 present, HS attempt made but amplitude too weak for rolling-std to fire
# Signature: lp11_to_hs is None (rolling-std < HS_OSC_STD_V throughout 500 ns # Signature: lp11_to_hs is None (rolling-std < HS_OSC_STD_V throughout 500 ns
# lookahead), hs_amplitude < 50 mV, LP-11 returns ~500 ns later. # lookahead), hs_amplitude < 50 mV, LP-11 returns ~500 ns later.
# Root cause: marginal VDD_DSI (LP-11 sags to ~1.0 V vs 1.2 V nominal), reducing
# HS drive strength below the detection threshold.
# Confirmed: capture 0010 (lp11_to_hs=None, amp≈32 mV, LP-11 returned at +513 ns).
# #
# B) Short LP-low (50200 ns, vs nominal ~342380 ns) → marginal SoT timing # B) Short LP-low (< 200 ns, vs nominal ~342380 ns) → anomalous SoT timing.
# → HS burst starts but is weak, hs_amplitude ≈ 4060 mV (vs normal 100122 mV). # Flag on LP-low duration alone: any lp_low < 200 ns is outside the normal range
# Signature: lp_low anomalously short, lp11_to_hs fires at noise spike (~3 ns). # and warrants investigation regardless of amplitude or rolling-std state.
# The lp11_to_hs guard cannot be used here, so LP-low duration gates the check. # Confirmed: capture 0124 (lp_low=108 ns).
# Confirmed example: capture 0120 (lp_low=108 ns, lp11_to_hs=1.7 ns, amp=49 mV).
# #
# C) No LP-11 detected at all → MIPI link silent or stuck # C) No LP-11 detected at all → MIPI link silent or stuck.
# Signature: no LP-11 region found, lp_transition_valid=False, no LP or HS seen.
# This is the most severe failure: the bridge or DSI IP has stopped outputting.
# Confirmed: follow-up of capture 13 (no LP-11, no HS) while display was flickering.
# Guard: only flag DAT lane (not CLK which is normally in continuous HS mode).
# #
# Only flag DAT lane (CLK is continuous HS — LP states not expected). # Only flag DAT lane (CLK is continuous HS — LP states not expected).
_lp_low_short = ( _lp_low_short = (
@@ -1047,26 +1036,9 @@ def analyze_lp_file(path: Path) -> "LPMetrics":
# weak oscillations are misclassified as LP-low, masking the true HS failure # weak oscillations are misclassified as LP-low, masking the true HS failure
or lp11_to_hs_ns is None or lp11_to_hs_ns is None
# Mode B: LP-low anomalously short + low amplitude = marginal HS launch. # Mode B: LP-low anomalously short + low amplitude = marginal HS launch.
# Gated by hs_rolling_std_found: if HS actually launched (rolling-std fires or _lp_low_short
# after LP-low ends), LP-low being short is a timing anomaly but not a flicker.
or (_lp_low_short and not hs_rolling_std_found)
# Mode D: LP-low normal, noise-spike lp11_to_hs (< 50 ns), low HS amplitude.
# Requires video/dynamic content. Gate: if rolling-std fires after LP-low ends,
# HS launched normally and the early lp11_to_hs was just the LP-low edge trigger.
or (lp11_to_hs_ns is not None
and lp11_to_hs_ns < LP_LOW_DUR_MIN_NS
and not _lp_low_short
and not hs_rolling_std_found)
) )
) )
# Mode E: short LP-low with anomalously HIGH amplitude — LP-01/LP-10 states in the
# burst window (link failed to launch HS cleanly). Normal LP probe HS = 1540 mV;
# LP-01/LP-10 DC levels produce 70+ mV. Confirmed: cap 0042 (lp_low=61 ns, amp=133 mV).
hs_burst_anomalous = (
_lp_low_short
and hs_amplitude_mv is not None
and hs_amplitude_mv > HS_BURST_AMPLITUDE_HIGH_MV
)
# Mode C: no LP-11 at all → link silent (but exclude CLK which is always HS) # Mode C: no LP-11 at all → link silent (but exclude CLK which is always HS)
link_silent = ( link_silent = (
channel == "dat" channel == "dat"
@@ -1080,13 +1052,9 @@ def analyze_lp_file(path: Path) -> "LPMetrics":
or ( or (
lp_transition_valid lp_transition_valid
and ( and (
# LP-00 absent entirely (LP-01/LP-00 skipped — SoT never completed).
# Short-but-non-zero LP-low is handled by Mode B inside hs_burst_absent;
# flagging it standalone (even with healthy HS amplitude) caused false
# positives when noise triggers gave lp_low < 50 ns with normal HS.
lp_low_duration_ns is None lp_low_duration_ns is None
or hs_burst_absent or hs_burst_absent
or hs_burst_anomalous or _lp_low_short
) )
) )
) )
@@ -1108,6 +1076,7 @@ def analyze_lp_file(path: Path) -> "LPMetrics":
hs_amplitude_mv = hs_amplitude_mv, hs_amplitude_mv = hs_amplitude_mv,
lp_transition_valid = lp_transition_valid, lp_transition_valid = lp_transition_valid,
clk_lp_startup_ok = clk_lp_startup_ok, clk_lp_startup_ok = clk_lp_startup_ok,
hs_rolling_std_found = hs_rolling_std_found,
flicker_suspect = flicker_suspect, flicker_suspect = flicker_suspect,
warnings = warnings, warnings = warnings,
) )