Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/14] drm/i915/dp: Add the MSA placement Data M/N WA (Wa_14027342164)
@ 2026-11-30  4:32 Chaitanya Kumar Borah
  2026-11-30  4:32 ` [PATCH 01/14] drm/i915/dp: Add the MSA placement Data M/N WA computation Chaitanya Kumar Borah
                   ` (15 more replies)
  0 siblings, 16 replies; 21+ messages in thread
From: Chaitanya Kumar Borah @ 2026-11-30  4:32 UTC (permalink / raw)
  To: intel-xe, intel-gfx
  Cc: Chaitanya Kumar Borah, Mitul Golani, Ankit Nautiyal, Jani Nikula,
	Imre Deak

Some old TCONs can't handle an Audio SDP followed immediately by the
MSA. On the pixel based timing generator the active data, dictated by
the Data M/N, ends before the timing generator's end of line, dictated
by the Link M/N. An SDP can be inserted in the window between the two,
right before the MSA.

Bspec 68922 avoids this by adjusting the Data M/N so that the end of
line of the data is either moved right, past the point where the MSA is
inserted, leaving no window for an SDP, or, if that leaves too little
H. Blank for the audio, moved left, leaving a gap between the Audio SDP
and the MSA. Moving it left needs the Audio Hblank Early programming
adjusted too.

This series implements the WA for 8b/10b SST streams with audio on
Xe3p (display version 35). It isn't applicable to MST, to 128b/132b, or
to split Audio SDPs.

Series structure, with the WA enabled only by the second to last patch,
so patches 1-12 have no functional changes:

  1      The WA computation, a pure function of the mode and link
  2-4    KUnit tests for it, and building them in xe
  5-6    Audio Hblank Early programming for the shifted left case,
         preceded by a rename
  7      Code move needed by patches 8 and 9
  8      Skipping the link configurations failing the WA
  9      Pruning the uncompressed modes failing the WA
  10     Code move needed by patch 11
  11     Pruning the DSC modes failing the WA
  12     Applying the WA to the Data M/N
  13     Enabling the WA on Xe3p
  14     A per-connector debugfs knob to disable the WA, for testing

Patches 7 and 10 only move code, which git diff --color-moved shows.

Design decisions:

- eDP is excluded from the WA. The Bspec doesn't exclude it, but the WA
  doesn't account for eDP specifics (a fixed link configuration, the
  compressed bpp not being lowered, MSO), and eDP panels generally don't
  support audio.

- The WA computes its own Data M with the Bspec fixed N formula, rounded
  up and accounting for the H. Active padding and the DSC symbols,
  instead of reusing the regular Data M/N computation, so that the end
  of line positions and the shifted values come from one consistent
  model. Sharing the model with the regular computation can be a
  follow-up.

- The Bspec adjusts the Data M by the SSC efficiency. That is taken as 1,
  like in the regular 8b/10b SST Data M/N computation, and marked with a
  TODO in patch 1.

- The WA result isn't monotonic in the bpp, so in the mode validation an
  uncompressed mode is valid if any pipe bpp passes the WA, and for DSC
  the minimum compressed bpp is checked first and the higher ones only
  if it fails.

- If the line ends exactly on a TU boundary, the Bspec TU counting, as we
  read it, counts the full last TU twice. In that case the WA takes the
  shift left, to be conservative. The expected result is covered by a
  KUnit test.

- For DSC streams the Audio Hblank Early start count override applies on
  top of the existing 4k DSC calculation, which is not run for DSC modes
  below 4k.

Testing:

- KUnit: 13 vectors for the WA computation, passing in the i915 build,
  with the expected values computed with a reference model of the Bspec
  formulas, not taken from hardware. The xe build compiles the same tests.
- HW, NVL-S with a Dell U2720Q: displaying a test pattern with modetest
  while playing audio with speaker-test, blanking was observed without
  the WA. Commands used:

    speaker-test -Dplughw:0,3 -c 2 -r 192000 -F S16_LE -tsine
    sudo modetest -M xe -w 717:max\ bpc:8
    modetest -M xe -s 717@200:3840x2160-60

  To toggle the WA, the connector was modeset to another mode and back to
  recompute the configuration:

    modetest -M xe -s 717@200:1920x1080-60

  The bpc is limited to 8 to widen the window between the end of the
  data and the MSA, which makes the issue easier to hit.
- HW, NVL-S with a UCD-500: verified the sequence of the SDPs and the MSA
  with and without the WA using the same commands as above. Without the WA
  the sequence was wrong (SDP|MSA) in 17 out of 44 frames, with the WA it
  was correct(MSA|SDP) in all 44 frames.

Bspec: 68922, 68943
Cc: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Imre Deak <imre.deak@intel.com>

Chaitanya Kumar Borah (14):
  drm/i915/dp: Add the MSA placement Data M/N WA computation
  drm/i915/kunit: Export the MSA placement WA Data M/N helper for
    testing
  drm/i915/kunit: Add MSA placement WA Data M/N tests
  drm/xe/kunit: Build the MSA placement WA display tests
  drm/i915/audio: Rename enable_audio_dsc_wa()
  drm/i915/audio: Program Hblank Early for the MSA WA shift left
  drm/i915/dp: Move intel_dp_has_audio() and intel_dp_port_has_audio()
    up
  drm/i915/dp: Account for the MSA WA in SST link config selection
  drm/i915/dp: Prune uncompressed modes failing the MSA WA
  drm/i915/dp: Move intel_dp_mode_valid_format() and
    intel_dp_mode_valid() down
  drm/i915/dp: Account for the MSA WA in DSC mode validation
  drm/i915/dp: Apply the MSA WA to the Data M/N
  drm/i915/display: Enable Wa_14027342164 on Xe3p
  drm/i915/dp: Add a debugfs knob to disable the MSA placement WA

 drivers/gpu/drm/i915/display/intel_audio.c    |   19 +-
 .../drm/i915/display/intel_crtc_state_dump.c  |    5 +-
 drivers/gpu/drm/i915/display/intel_display.c  |   20 +-
 .../drm/i915/display/intel_display_debugfs.c  |    5 +
 .../drm/i915/display/intel_display_types.h    |    8 +
 .../gpu/drm/i915/display/intel_display_wa.c   |    2 +-
 .../gpu/drm/i915/display/intel_display_wa.h   |    1 +
 drivers/gpu/drm/i915/display/intel_dp.c       | 1395 +++++++++++++----
 drivers/gpu/drm/i915/display/intel_dp.h       |   30 +
 drivers/gpu/drm/i915/display/tests/Makefile   |    3 +-
 .../i915/display/tests/intel_dp_msa_wa_test.c |  189 +++
 drivers/gpu/drm/xe/display/tests/Makefile     |    3 +-
 12 files changed, 1318 insertions(+), 362 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/display/tests/intel_dp_msa_wa_test.c

-- 
2.50.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2026-11-30  7:35 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30  4:32 [PATCH 00/14] drm/i915/dp: Add the MSA placement Data M/N WA (Wa_14027342164) Chaitanya Kumar Borah
2026-11-30  4:32 ` [PATCH 01/14] drm/i915/dp: Add the MSA placement Data M/N WA computation Chaitanya Kumar Borah
2026-11-30  4:32 ` [PATCH 02/14] drm/i915/kunit: Export the MSA placement WA Data M/N helper for testing Chaitanya Kumar Borah
2026-11-30  4:32 ` [PATCH 03/14] drm/i915/kunit: Add MSA placement WA Data M/N tests Chaitanya Kumar Borah
2026-11-30  4:32 ` [PATCH 04/14] drm/xe/kunit: Build the MSA placement WA display tests Chaitanya Kumar Borah
2026-11-30  4:32 ` [PATCH 05/14] drm/i915/audio: Rename enable_audio_dsc_wa() Chaitanya Kumar Borah
2026-11-30  4:32 ` [PATCH 06/14] drm/i915/audio: Program Hblank Early for the MSA WA shift left Chaitanya Kumar Borah
2026-11-30  5:14   ` sashiko-bot
2026-11-30  4:32 ` [PATCH 07/14] drm/i915/dp: Move intel_dp_has_audio() and intel_dp_port_has_audio() up Chaitanya Kumar Borah
2026-11-30  4:32 ` [PATCH 08/14] drm/i915/dp: Account for the MSA WA in SST link config selection Chaitanya Kumar Borah
2026-11-30  5:06   ` sashiko-bot
2026-11-30  4:32 ` [PATCH 09/14] drm/i915/dp: Prune uncompressed modes failing the MSA WA Chaitanya Kumar Borah
2026-11-30  4:32 ` [PATCH 10/14] drm/i915/dp: Move intel_dp_mode_valid_format() and intel_dp_mode_valid() down Chaitanya Kumar Borah
2026-11-30  4:32 ` [PATCH 11/14] drm/i915/dp: Account for the MSA WA in DSC mode validation Chaitanya Kumar Borah
2026-11-30  4:32 ` [PATCH 12/14] drm/i915/dp: Apply the MSA WA to the Data M/N Chaitanya Kumar Borah
2026-11-30  5:17   ` sashiko-bot
2026-11-30  4:32 ` [PATCH 13/14] drm/i915/display: Enable Wa_14027342164 on Xe3p Chaitanya Kumar Borah
2026-11-30  5:12   ` sashiko-bot
2026-11-30  4:32 ` [PATCH 14/14] drm/i915/dp: Add a debugfs knob to disable the MSA placement WA Chaitanya Kumar Borah
2026-11-30  5:41 ` ✓ i915.CI.BAT: success for drm/i915/dp: Add the MSA placement Data M/N WA (Wa_14027342164) Patchwork
2026-11-30  7:35 ` ✗ i915.CI.Full: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox