All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Govindapillai <vinod.govindapillai@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [Intel-gfx] [PATCH v4 3/4] drm/i915/display: update intel_dp_has_audio to support MST
Date: Fri, 18 Aug 2023 14:19:49 +0300	[thread overview]
Message-ID: <20230818111950.128992-4-vinod.govindapillai@intel.com> (raw)
In-Reply-To: <20230818111950.128992-1-vinod.govindapillai@intel.com>

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) &&
+	    !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 &&
-- 
2.34.1


  parent reply	other threads:[~2023-08-18 11:20 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 ` Vinod Govindapillai [this message]
2023-08-22 12:57   ` [Intel-gfx] [PATCH v4 3/4] drm/i915/display: update intel_dp_has_audio to support MST Jani Nikula
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=20230818111950.128992-4-vinod.govindapillai@intel.com \
    --to=vinod.govindapillai@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.