diff mbox series

[v2,12/16] drm/i915/ddi: enable ACT handling for 128b/132b SST

Message ID 90c3402b0b11f13600c700f07c103738413ae6f9.1734643485.git.jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/dp: 128b/132b uncompressed SST | expand

Commit Message

Jani Nikula Dec. 19, 2024, 9:34 p.m. UTC
Add ACT handling for 128b/132b SST.

This is preparation for enabling 128b/132b SST. This path is not
reachable yet.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_ddi.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Imre Deak Jan. 2, 2025, 3:59 p.m. UTC | #1
On Thu, Dec 19, 2024 at 11:34:01PM +0200, Jani Nikula wrote:
> Add ACT handling for 128b/132b SST.
> 
> This is preparation for enabling 128b/132b SST. This path is not
> reachable yet.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_ddi.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index 91e6cd91e91f..7b739b9c5a06 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -3486,6 +3486,19 @@ static void intel_ddi_enable(struct intel_atomic_state *state,
>  	/* Enable/Disable DP2.0 SDP split config before transcoder */
>  	intel_audio_sdp_split_update(crtc_state);
>  
> +	/* 128b/132b SST */
> +	if (intel_dp_is_uhbr(crtc_state)) {

Imo, as before the above would also need !hdmi.

> +		struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
> +
> +		intel_ddi_clear_act_sent(encoder, crtc_state);
> +
> +		intel_de_rmw(display, TRANS_DDI_FUNC_CTL(display, cpu_transcoder), 0,
> +			     TRANS_DDI_DP_VC_PAYLOAD_ALLOC);
> +
> +		intel_ddi_wait_for_act_sent(encoder, crtc_state);
> +		drm_dp_dpcd_poll_act_handled(&intel_dp->aux, 0);

The spec requires doing the reverse during disabling - delete the stream
in the payload table, clear the payload alloc flag and wait for both ACT
handled both in DP_TP_STATUS and DPCD, see bspec 68849 / Disable Sequence
steps g/h.

> +	}
> +
>  	intel_enable_transcoder(crtc_state);
>  
>  	intel_ddi_wait_for_fec_status(encoder, crtc_state, true);
> -- 
> 2.39.5
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index 91e6cd91e91f..7b739b9c5a06 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -3486,6 +3486,19 @@  static void intel_ddi_enable(struct intel_atomic_state *state,
 	/* Enable/Disable DP2.0 SDP split config before transcoder */
 	intel_audio_sdp_split_update(crtc_state);
 
+	/* 128b/132b SST */
+	if (intel_dp_is_uhbr(crtc_state)) {
+		struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
+
+		intel_ddi_clear_act_sent(encoder, crtc_state);
+
+		intel_de_rmw(display, TRANS_DDI_FUNC_CTL(display, cpu_transcoder), 0,
+			     TRANS_DDI_DP_VC_PAYLOAD_ALLOC);
+
+		intel_ddi_wait_for_act_sent(encoder, crtc_state);
+		drm_dp_dpcd_poll_act_handled(&intel_dp->aux, 0);
+	}
+
 	intel_enable_transcoder(crtc_state);
 
 	intel_ddi_wait_for_fec_status(encoder, crtc_state, true);