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 v4 3/4] drm/i915/display: update intel_dp_has_audio to support MST
Date: Tue, 22 Aug 2023 15:57:41 +0300	[thread overview]
Message-ID: <871qfv6xq2.fsf@intel.com> (raw)
In-Reply-To: <20230818111950.128992-4-vinod.govindapillai@intel.com>

On Fri, 18 Aug 2023, Vinod Govindapillai <vinod.govindapillai@intel.com> wrote:
> Modify intel_dp_has_audio to handle DP-MST as well.
>
> Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 67c06bbc1760..0ee9b9e05c26 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2171,15 +2171,17 @@ 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);
> -	struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
> -	struct intel_connector *connector = intel_dp->attached_connector;
>  	const struct intel_digital_connector_state *intel_conn_state =
>  		to_intel_digital_connector_state(conn_state);
> +	struct intel_connector *connector =
> +		to_intel_connector(conn_state->connector);
>  
> -	if (!intel_dp_port_has_audio(i915, encoder->port))
> +	if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP) &&

That's inaccurate due to INTEL_OUTPUT_EDP.

!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP_MST)

> +	    !intel_dp_port_has_audio(i915, encoder->port))
>  		return false;
>  
>  	if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO)
> @@ -2241,7 +2243,7 @@ intel_dp_audio_compute_config(struct intel_encoder *encoder,
>  	struct drm_connector *connector = conn_state->connector;
>  
>  	pipe_config->has_audio =
> -		intel_dp_has_audio(encoder, conn_state) &&
> +		intel_dp_has_audio(encoder, pipe_config, conn_state) &&
>  		intel_audio_compute_config(encoder, pipe_config, conn_state);
>  
>  	pipe_config->sdp_split_enable = pipe_config->has_audio &&

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2023-08-22 12:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-18 11:19 [Intel-gfx] [PATCH v4 0/4] SDP split for DP-MST Vinod Govindapillai
2023-08-18 11:19 ` [Intel-gfx] [PATCH v4 1/4] drm/i915/display: remove redundant parameter from sdp split update Vinod Govindapillai
2023-08-18 11:19 ` [Intel-gfx] [PATCH v4 2/4] drm/i915/display: combine DP audio compute config steps Vinod Govindapillai
2023-08-22 13:41   ` Jani Nikula
2023-08-22 14:53     ` Jani Nikula
2023-08-18 11:19 ` [Intel-gfx] [PATCH v4 3/4] drm/i915/display: update intel_dp_has_audio to support MST Vinod Govindapillai
2023-08-22 12:57   ` Jani Nikula [this message]
2023-08-22 20:50     ` Govindapillai, Vinod
2023-08-18 11:19 ` [Intel-gfx] [PATCH v4 4/4] drm/i915/display: configure SDP split for DP-MST Vinod Govindapillai
2023-08-18 12:41 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for SDP split for DP-MST (rev2) Patchwork
2023-08-18 12:41 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-08-18 13:02 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-08-21  9:37 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-08-21 11:50 ` [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=871qfv6xq2.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