All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] drm/i915/dp: fix DP audio for PORT_A on gen12+
@ 2019-11-25 12:53 ` Kai Vehmanen
  0 siblings, 0 replies; 18+ messages in thread
From: Kai Vehmanen @ 2019-11-25 12:53 UTC (permalink / raw)
  To: intel-gfx, jani.nikula, ville.syrjala

Starting with gen12, PORT_A can be connected to a transcoder
with audio support. Modify the existing logic that disabled
audio on PORT_A unconditionally.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 9b15ac4f2fb6..4519c32f6c24 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2237,6 +2237,17 @@ bool intel_dp_limited_color_range(const struct intel_crtc_state *crtc_state,
 	}
 }
 
+static bool intel_dp_port_has_audio(struct drm_i915_private *dev_priv,
+				    enum port port)
+{
+	if (IS_G4X(dev_priv))
+		return false;
+	if (INTEL_GEN(dev_priv) < 12 && port == PORT_A)
+		return false;
+
+	return true;
+}
+
 int
 intel_dp_compute_config(struct intel_encoder *encoder,
 			struct intel_crtc_state *pipe_config,
@@ -2269,7 +2280,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
 		return ret;
 
 	pipe_config->has_drrs = false;
-	if (IS_G4X(dev_priv) || port == PORT_A)
+	if (!intel_dp_port_has_audio(dev_priv, port))
 		pipe_config->has_audio = false;
 	else if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO)
 		pipe_config->has_audio = intel_dp->has_audio;
-- 
2.17.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-11-28 15:09 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-25 12:53 [PATCH v2 1/2] drm/i915/dp: fix DP audio for PORT_A on gen12+ Kai Vehmanen
2019-11-25 12:53 ` [Intel-gfx] " Kai Vehmanen
2019-11-25 12:53 ` [PATCH v2 2/2] drm/i915/dp: fix DP infoframe init " Kai Vehmanen
2019-11-25 12:53   ` [Intel-gfx] " Kai Vehmanen
2019-11-26 23:52   ` Matt Roper
2019-11-26 23:52     ` [Intel-gfx] " Matt Roper
2019-11-28 15:09     ` Kai Vehmanen
2019-11-28 15:09       ` [Intel-gfx] " Kai Vehmanen
2019-11-25 16:28 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/2] drm/i915/dp: fix DP audio " Patchwork
2019-11-25 16:28   ` [Intel-gfx] " Patchwork
2019-11-26  2:03 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-11-26  2:03   ` [Intel-gfx] " Patchwork
2019-11-26  8:24   ` Kai Vehmanen
2019-11-26  8:24     ` [Intel-gfx] " Kai Vehmanen
2019-11-27  0:15   ` Matt Roper
2019-11-27  0:15     ` [Intel-gfx] " Matt Roper
2019-11-27  0:10 ` [PATCH v2 1/2] " Matt Roper
2019-11-27  0:10   ` [Intel-gfx] " Matt Roper

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.