Skip to content

Commit 7d476f1

Browse files
ideakjlahtine-intel
authored andcommitted
drm/i915/dp: Fix the enabling/disabling of audio SDP splitting
Adjust the enabling/disabling steps of the DP audio SDP splitting according to a recent Bspec update. This moves the enabling to the audio codec enable sequence after the transcoder is enabled and disables SDP splitting explicitly during the audio disable sequence. Bspec requires waiting for a vblank event after the transcoder is enabled and before SDP splitting is enabled. There is no need for an explicit wait for this, since after the transcoder is enabled this vblank event is guaranteed to have happened via a flip done wait (see intel_atomic_commit_tail() -> drm_atomic_helper_wait_for_flip_done()). The bspec update is for LNL+ only, but the HW team clarified that this has been always the intended sequence on all platforms and bspec will be updated everywhere accordingly. The way SDP splitting was originally enabled matched the version of bspec at that time. Adding here the Fixes: line still, since this change fixes a FIFO underrun on PTL during output enabling when DSC is enabled. Bspec: 49283, 68943 Fixes: 8853750 ("drm/i915: Enable SDP split for DP2.0") Cc: Vinod Govindapillai <[email protected]> Acked-by: Jani Nikula <[email protected]> Reviewed-by: Vinod Govindapillai <[email protected]> Signed-off-by: Imre Deak <[email protected]> Link: https://lore.kernel.org/r/[email protected] (cherry picked from commit 56764c8) Signed-off-by: Joonas Lahtinen <[email protected]>
1 parent f4c7baa commit 7d476f1

File tree

4 files changed

+17
-16
lines changed

4 files changed

+17
-16
lines changed

drivers/gpu/drm/i915/display/intel_audio.c

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,19 @@ hsw_audio_config_update(struct intel_encoder *encoder,
397397
hsw_hdmi_audio_config_update(encoder, crtc_state);
398398
}
399399

400+
static void intel_audio_sdp_split_update(const struct intel_crtc_state *crtc_state,
401+
bool enable)
402+
{
403+
struct intel_display *display = to_intel_display(crtc_state);
404+
enum transcoder trans = crtc_state->cpu_transcoder;
405+
406+
if (!HAS_DP20(display))
407+
return;
408+
409+
intel_de_rmw(display, AUD_DP_2DOT0_CTRL(trans), AUD_ENABLE_SDP_SPLIT,
410+
enable && crtc_state->sdp_split_enable ? AUD_ENABLE_SDP_SPLIT : 0);
411+
}
412+
400413
static void hsw_audio_codec_disable(struct intel_encoder *encoder,
401414
const struct intel_crtc_state *old_crtc_state,
402415
const struct drm_connector_state *old_conn_state)
@@ -430,6 +443,8 @@ static void hsw_audio_codec_disable(struct intel_encoder *encoder,
430443
if (needs_wa_14020863754(display))
431444
intel_de_rmw(display, AUD_CHICKENBIT_REG3, DACBE_DISABLE_MIN_HBLANK_FIX, 0);
432445

446+
intel_audio_sdp_split_update(old_crtc_state, false);
447+
433448
mutex_unlock(&display->audio.mutex);
434449
}
435450

@@ -555,6 +570,8 @@ static void hsw_audio_codec_enable(struct intel_encoder *encoder,
555570
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP))
556571
enable_audio_dsc_wa(encoder, crtc_state);
557572

573+
intel_audio_sdp_split_update(crtc_state, true);
574+
558575
if (needs_wa_14020863754(display))
559576
intel_de_rmw(display, AUD_CHICKENBIT_REG3, 0, DACBE_DISABLE_MIN_HBLANK_FIX);
560577

@@ -681,16 +698,6 @@ static void ibx_audio_codec_enable(struct intel_encoder *encoder,
681698
mutex_unlock(&display->audio.mutex);
682699
}
683700

684-
void intel_audio_sdp_split_update(const struct intel_crtc_state *crtc_state)
685-
{
686-
struct intel_display *display = to_intel_display(crtc_state);
687-
enum transcoder trans = crtc_state->cpu_transcoder;
688-
689-
if (HAS_DP20(display))
690-
intel_de_rmw(display, AUD_DP_2DOT0_CTRL(trans), AUD_ENABLE_SDP_SPLIT,
691-
crtc_state->sdp_split_enable ? AUD_ENABLE_SDP_SPLIT : 0);
692-
}
693-
694701
bool intel_audio_compute_config(struct intel_encoder *encoder,
695702
struct intel_crtc_state *crtc_state,
696703
struct drm_connector_state *conn_state)

drivers/gpu/drm/i915/display/intel_audio.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,5 @@ int intel_audio_min_cdclk(const struct intel_crtc_state *crtc_state);
3131
void intel_audio_init(struct intel_display *display);
3232
void intel_audio_register(struct intel_display *display);
3333
void intel_audio_deinit(struct intel_display *display);
34-
void intel_audio_sdp_split_update(const struct intel_crtc_state *crtc_state);
3534

3635
#endif /* __INTEL_AUDIO_H__ */

drivers/gpu/drm/i915/display/intel_ddi.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3507,9 +3507,6 @@ static void intel_ddi_enable(struct intel_atomic_state *state,
35073507

35083508
intel_vrr_transcoder_enable(crtc_state);
35093509

3510-
/* Enable/Disable DP2.0 SDP split config before transcoder */
3511-
intel_audio_sdp_split_update(crtc_state);
3512-
35133510
/* 128b/132b SST */
35143511
if (!is_hdmi && intel_dp_is_uhbr(crtc_state)) {
35153512
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);

drivers/gpu/drm/i915/display/intel_dp_mst.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,8 +1328,6 @@ static void mst_stream_enable(struct intel_atomic_state *state,
13281328
FECSTALL_DIS_DPTSTREAM_DPTTG,
13291329
pipe_config->fec_enable ? FECSTALL_DIS_DPTSTREAM_DPTTG : 0);
13301330

1331-
intel_audio_sdp_split_update(pipe_config);
1332-
13331331
intel_enable_transcoder(pipe_config);
13341332

13351333
for_each_pipe_crtc_modeset_enable(display, pipe_crtc, pipe_config, i) {

0 commit comments

Comments
 (0)