Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Vinod Govindapillai <vinod.govindapillai@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2 3/4] drm/i915/display: combine DP audio compute config steps
Date: Tue, 15 Aug 2023 20:32:16 +0300	[thread overview]
Message-ID: <87o7j8b49r.fsf@intel.com> (raw)
In-Reply-To: <20230815142921.404127-4-vinod.govindapillai@intel.com>

On Tue, 15 Aug 2023, Vinod Govindapillai <vinod.govindapillai@intel.com> wrote:
> Combine all DP audio configs into a single function

This should've been the first step.

>
> Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 97a14afbcfe8..0eb072a78d44 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2236,11 +2236,16 @@ intel_dp_compute_output_format(struct intel_encoder *encoder,
>  static void
>  intel_dp_audio_compute_config(struct intel_encoder *encoder,
>  			      struct intel_crtc_state *pipe_config,
> -			      struct drm_connector_state *conn_state)
> +			      struct drm_connector_state *conn_state,
> +			      struct intel_dp *intel_dp)

No need to pass intel_dp around. And usually if it's necessary, it's the
kind of context parameter that should be one of the first parameters.

>  {
>  	struct drm_i915_private *i915 = to_i915(encoder->base.dev);
>  	struct drm_connector *connector = conn_state->connector;
>  
> +	pipe_config->has_audio =
> +		intel_dp_has_audio(encoder, conn_state, intel_dp) &&
> +		intel_audio_compute_config(encoder, pipe_config, conn_state);
> +
>  	pipe_config->sdp_split_enable = pipe_config->has_audio &&
>  					intel_dp_is_uhbr(pipe_config);
>  
> @@ -2264,10 +2269,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_dp) &&
> -		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);
> @@ -2334,7 +2335,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
>  		adjusted_mode->crtc_clock /= n;
>  	}
>  
> -	intel_dp_audio_compute_config(encoder, pipe_config, conn_state);
> +	intel_dp_audio_compute_config(encoder, pipe_config, conn_state, intel_dp);
>  
>  	intel_link_compute_m_n(output_bpp,
>  			       pipe_config->lane_count,

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2023-08-15 17:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-15 14:29 [Intel-gfx] [PATCH v2 0/4] SDP split for DP-MST Vinod Govindapillai
2023-08-15 14:29 ` [Intel-gfx] [PATCH v2 1/4] drm/i915/display: remove redundant parameter from sdp split update Vinod Govindapillai
2023-08-15 17:20   ` Jani Nikula
2023-08-15 14:29 ` [Intel-gfx] [PATCH v2 2/4] drm/i915/display: combine has_audio check for DP and DP-MST Vinod Govindapillai
2023-08-15 17:29   ` Jani Nikula
2023-08-15 14:29 ` [Intel-gfx] [PATCH v2 3/4] drm/i915/display: combine DP audio compute config steps Vinod Govindapillai
2023-08-15 17:32   ` Jani Nikula [this message]
2023-08-15 14:29 ` [Intel-gfx] [PATCH v2 4/4] drm/915/display: configure SDP split for DP-MST Vinod Govindapillai
2023-08-15 17:34   ` Jani Nikula
2023-08-15 15:18 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2023-08-15 15:18 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-08-15 15:36 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-08-15 16:52 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7j8b49r.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=vinod.govindapillai@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox