Skip to content

Commit 591b917

Browse files
committed
drm/i915/ddi: enable ACT handling for 128b/132b SST
Add ACT handling for 128b/132b SST enable/disable. This is preparation for enabling 128b/132b SST. This path is not reachable yet. v2: - Check for !is_hdmi (Imre) - Add disable sequence (Imre) Reviewed-by: Imre Deak <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/b0226471f9445d988917cee49dbbd93a1493f3c7.1735912293.git.jani.nikula@intel.com
1 parent a9efb7e commit 591b917

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3199,7 +3199,9 @@ static void intel_ddi_post_disable_hdmi_or_sst(struct intel_atomic_state *state,
31993199
{
32003200
struct intel_display *display = to_intel_display(encoder);
32013201
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
3202+
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
32023203
struct intel_crtc *pipe_crtc;
3204+
bool is_hdmi = intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_HDMI);
32033205
int i;
32043206

32053207
for_each_pipe_crtc_modeset_disable(display, pipe_crtc, old_crtc_state, i) {
@@ -3211,6 +3213,20 @@ static void intel_ddi_post_disable_hdmi_or_sst(struct intel_atomic_state *state,
32113213

32123214
intel_disable_transcoder(old_crtc_state);
32133215

3216+
/* 128b/132b SST */
3217+
if (!is_hdmi && intel_dp_is_uhbr(old_crtc_state)) {
3218+
/* VCPID 1, start slot 0 for 128b/132b, clear */
3219+
drm_dp_dpcd_write_payload(&intel_dp->aux, 1, 0, 0);
3220+
3221+
intel_ddi_clear_act_sent(encoder, old_crtc_state);
3222+
3223+
intel_de_rmw(display, TRANS_DDI_FUNC_CTL(display, old_crtc_state->cpu_transcoder),
3224+
TRANS_DDI_DP_VC_PAYLOAD_ALLOC, 0);
3225+
3226+
intel_ddi_wait_for_act_sent(encoder, old_crtc_state);
3227+
drm_dp_dpcd_poll_act_handled(&intel_dp->aux, 0);
3228+
}
3229+
32143230
intel_ddi_disable_transcoder_func(old_crtc_state);
32153231

32163232
for_each_pipe_crtc_modeset_disable(display, pipe_crtc, old_crtc_state, i) {
@@ -3493,6 +3509,19 @@ static void intel_ddi_enable(struct intel_atomic_state *state,
34933509
/* Enable/Disable DP2.0 SDP split config before transcoder */
34943510
intel_audio_sdp_split_update(crtc_state);
34953511

3512+
/* 128b/132b SST */
3513+
if (!is_hdmi && intel_dp_is_uhbr(crtc_state)) {
3514+
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
3515+
3516+
intel_ddi_clear_act_sent(encoder, crtc_state);
3517+
3518+
intel_de_rmw(display, TRANS_DDI_FUNC_CTL(display, cpu_transcoder), 0,
3519+
TRANS_DDI_DP_VC_PAYLOAD_ALLOC);
3520+
3521+
intel_ddi_wait_for_act_sent(encoder, crtc_state);
3522+
drm_dp_dpcd_poll_act_handled(&intel_dp->aux, 0);
3523+
}
3524+
34963525
intel_enable_transcoder(crtc_state);
34973526

34983527
intel_ddi_wait_for_fec_status(encoder, crtc_state, true);

0 commit comments

Comments
 (0)