diff mbox series

[v4,2/4] drm/i915/display: combine DP audio compute config steps

Message ID 20230818111950.128992-3-vinod.govindapillai@intel.com (mailing list archive)
State New, archived
Headers show
Series SDP split for DP-MST | expand

Commit Message

Vinod Govindapillai Aug. 18, 2023, 11:19 a.m. UTC
Combine all DP audio configs into a single function

Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

Comments

Jani Nikula Aug. 22, 2023, 1:41 p.m. UTC | #1
On Fri, 18 Aug 2023, Vinod Govindapillai <vinod.govindapillai@intel.com> wrote:
> Combine all DP audio configs into a single function
>
> Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 964bf0551bdc..67c06bbc1760 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2240,9 +2240,12 @@ intel_dp_audio_compute_config(struct intel_encoder *encoder,
>  	struct drm_i915_private *i915 = to_i915(encoder->base.dev);
>  	struct drm_connector *connector = conn_state->connector;
>  
> -	pipe_config->sdp_split_enable =
> +	pipe_config->has_audio =
>  		intel_dp_has_audio(encoder, conn_state) &&
> -		intel_dp_is_uhbr(pipe_config);
> +		intel_audio_compute_config(encoder, pipe_config, conn_state);
> +
> +	pipe_config->sdp_split_enable = pipe_config->has_audio &&
> +					intel_dp_is_uhbr(pipe_config);
>  
>  	drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] SDP split enable: %s\n",
>  		    connector->base.id, connector->name,
> @@ -2264,10 +2267,6 @@ intel_dp_compute_config(struct intel_encoder *encoder,
>  	if (HAS_PCH_SPLIT(dev_priv) && !HAS_DDI(dev_priv) && encoder->port != PORT_A)
>  		pipe_config->has_pch_encoder = true;
>  
> -	pipe_config->has_audio =
> -		intel_dp_has_audio(encoder, conn_state) &&
> -		intel_audio_compute_config(encoder, pipe_config, conn_state);
> -
>  	fixed_mode = intel_panel_fixed_mode(connector, adjusted_mode);
>  	if (intel_dp_is_edp(intel_dp) && fixed_mode) {
>  		ret = intel_panel_compute_config(connector, adjusted_mode);
Jani Nikula Aug. 22, 2023, 2:53 p.m. UTC | #2
On Tue, 22 Aug 2023, Jani Nikula <jani.nikula@intel.com> wrote:
> On Fri, 18 Aug 2023, Vinod Govindapillai <vinod.govindapillai@intel.com> wrote:
>> Combine all DP audio configs into a single function
>>
>> Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>

And pushed the first two to drm-intel-next.

BR,
Jani.

>
>> ---
>>  drivers/gpu/drm/i915/display/intel_dp.c | 11 +++++------
>>  1 file changed, 5 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
>> index 964bf0551bdc..67c06bbc1760 100644
>> --- a/drivers/gpu/drm/i915/display/intel_dp.c
>> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
>> @@ -2240,9 +2240,12 @@ intel_dp_audio_compute_config(struct intel_encoder *encoder,
>>  	struct drm_i915_private *i915 = to_i915(encoder->base.dev);
>>  	struct drm_connector *connector = conn_state->connector;
>>  
>> -	pipe_config->sdp_split_enable =
>> +	pipe_config->has_audio =
>>  		intel_dp_has_audio(encoder, conn_state) &&
>> -		intel_dp_is_uhbr(pipe_config);
>> +		intel_audio_compute_config(encoder, pipe_config, conn_state);
>> +
>> +	pipe_config->sdp_split_enable = pipe_config->has_audio &&
>> +					intel_dp_is_uhbr(pipe_config);
>>  
>>  	drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] SDP split enable: %s\n",
>>  		    connector->base.id, connector->name,
>> @@ -2264,10 +2267,6 @@ intel_dp_compute_config(struct intel_encoder *encoder,
>>  	if (HAS_PCH_SPLIT(dev_priv) && !HAS_DDI(dev_priv) && encoder->port != PORT_A)
>>  		pipe_config->has_pch_encoder = true;
>>  
>> -	pipe_config->has_audio =
>> -		intel_dp_has_audio(encoder, conn_state) &&
>> -		intel_audio_compute_config(encoder, pipe_config, conn_state);
>> -
>>  	fixed_mode = intel_panel_fixed_mode(connector, adjusted_mode);
>>  	if (intel_dp_is_edp(intel_dp) && fixed_mode) {
>>  		ret = intel_panel_compute_config(connector, adjusted_mode);
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 964bf0551bdc..67c06bbc1760 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2240,9 +2240,12 @@  intel_dp_audio_compute_config(struct intel_encoder *encoder,
 	struct drm_i915_private *i915 = to_i915(encoder->base.dev);
 	struct drm_connector *connector = conn_state->connector;
 
-	pipe_config->sdp_split_enable =
+	pipe_config->has_audio =
 		intel_dp_has_audio(encoder, conn_state) &&
-		intel_dp_is_uhbr(pipe_config);
+		intel_audio_compute_config(encoder, pipe_config, conn_state);
+
+	pipe_config->sdp_split_enable = pipe_config->has_audio &&
+					intel_dp_is_uhbr(pipe_config);
 
 	drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] SDP split enable: %s\n",
 		    connector->base.id, connector->name,
@@ -2264,10 +2267,6 @@  intel_dp_compute_config(struct intel_encoder *encoder,
 	if (HAS_PCH_SPLIT(dev_priv) && !HAS_DDI(dev_priv) && encoder->port != PORT_A)
 		pipe_config->has_pch_encoder = true;
 
-	pipe_config->has_audio =
-		intel_dp_has_audio(encoder, conn_state) &&
-		intel_audio_compute_config(encoder, pipe_config, conn_state);
-
 	fixed_mode = intel_panel_fixed_mode(connector, adjusted_mode);
 	if (intel_dp_is_edp(intel_dp) && fixed_mode) {
 		ret = intel_panel_compute_config(connector, adjusted_mode);