diff mbox series

[7/7] drm/i915: Remove bogus MST check in intel_dp_has_audio()

Message ID 20240517145356.26103-8-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: DSC stuff | expand

Commit Message

Ville Syrjälä May 17, 2024, 2:53 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

No idea what this MST checks is doing in intel_dp_has_audio().
Looks completely pointless, so get rid of it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Jani Nikula May 20, 2024, 11:02 a.m. UTC | #1
On Fri, 17 May 2024, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> No idea what this MST checks is doing in intel_dp_has_audio().
> Looks completely pointless, so get rid of it.

2e775f2d41ef ("drm/i915/display: update intel_dp_has_audio to support MST")
6297ee90f682 ("drm/i915/display: configure SDP split for DP-MST")

The division of changes here is not ideal, but I presume the goal was to
not do functional changes compared to intel_dp_mst_has_audio(). Which
may or may not be a good reason...

BR,
Jani.

>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index af298d5017d9..4a486bb6d48c 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2806,7 +2806,6 @@ intel_dp_drrs_compute_config(struct intel_connector *connector,
>  }
>  
>  static bool intel_dp_has_audio(struct intel_encoder *encoder,
> -			       struct intel_crtc_state *crtc_state,
>  			       const struct drm_connector_state *conn_state)
>  {
>  	struct drm_i915_private *i915 = to_i915(encoder->base.dev);
> @@ -2815,8 +2814,7 @@ static bool intel_dp_has_audio(struct intel_encoder *encoder,
>  	struct intel_connector *connector =
>  		to_intel_connector(conn_state->connector);
>  
> -	if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP_MST) &&
> -	    !intel_dp_port_has_audio(i915, encoder->port))
> +	if (!intel_dp_port_has_audio(i915, encoder->port))
>  		return false;
>  
>  	if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO)
> @@ -2875,7 +2873,7 @@ intel_dp_audio_compute_config(struct intel_encoder *encoder,
>  			      struct drm_connector_state *conn_state)
>  {
>  	pipe_config->has_audio =
> -		intel_dp_has_audio(encoder, pipe_config, conn_state) &&
> +		intel_dp_has_audio(encoder, conn_state) &&
>  		intel_audio_compute_config(encoder, pipe_config, conn_state);
>  
>  	pipe_config->sdp_split_enable = pipe_config->has_audio &&
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index af298d5017d9..4a486bb6d48c 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2806,7 +2806,6 @@  intel_dp_drrs_compute_config(struct intel_connector *connector,
 }
 
 static bool intel_dp_has_audio(struct intel_encoder *encoder,
-			       struct intel_crtc_state *crtc_state,
 			       const struct drm_connector_state *conn_state)
 {
 	struct drm_i915_private *i915 = to_i915(encoder->base.dev);
@@ -2815,8 +2814,7 @@  static bool intel_dp_has_audio(struct intel_encoder *encoder,
 	struct intel_connector *connector =
 		to_intel_connector(conn_state->connector);
 
-	if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP_MST) &&
-	    !intel_dp_port_has_audio(i915, encoder->port))
+	if (!intel_dp_port_has_audio(i915, encoder->port))
 		return false;
 
 	if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO)
@@ -2875,7 +2873,7 @@  intel_dp_audio_compute_config(struct intel_encoder *encoder,
 			      struct drm_connector_state *conn_state)
 {
 	pipe_config->has_audio =
-		intel_dp_has_audio(encoder, pipe_config, conn_state) &&
+		intel_dp_has_audio(encoder, conn_state) &&
 		intel_audio_compute_config(encoder, pipe_config, conn_state);
 
 	pipe_config->sdp_split_enable = pipe_config->has_audio &&