public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/i915/ddi: Move DDI port detection to the corresponding helper
@ 2018-12-20 13:26 Imre Deak
  2018-12-20 13:26 ` [PATCH 2/3] drm/i915/icl: Detect port F presence via VBT Imre Deak
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: Imre Deak @ 2018-12-20 13:26 UTC (permalink / raw)
  To: intel-gfx

We have already a function to detect DDI ports using VBT, so instead of
opencoding the DDI specific version of this, move the opencoded part to
the existing helper.

Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Mika Kahola <mika.kahola@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/intel_bios.c    | 9 +++++++++
 drivers/gpu/drm/i915/intel_display.c | 4 +---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 764d84d4109b..fa4091c0768b 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1947,6 +1947,15 @@ bool intel_bios_is_port_present(struct drm_i915_private *dev_priv, enum port por
 	};
 	int i;
 
+	if (HAS_DDI(dev_priv)) {
+		const struct ddi_vbt_port_info *port_info =
+			&dev_priv->vbt.ddi_port_info[port];
+
+		return port_info->supports_dp ||
+		       port_info->supports_dvi ||
+		       port_info->supports_hdmi;
+	}
+
 	/* FIXME maybe deal with port A as well? */
 	if (WARN_ON(port == PORT_A) || port >= ARRAY_SIZE(port_mapping))
 		return false;
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 3b7094822aa9..a2f8aaf61c61 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14315,9 +14315,7 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
 		 * On SKL we don't have a way to detect DDI-E so we rely on VBT.
 		 */
 		if (IS_GEN9_BC(dev_priv) &&
-		    (dev_priv->vbt.ddi_port_info[PORT_E].supports_dp ||
-		     dev_priv->vbt.ddi_port_info[PORT_E].supports_dvi ||
-		     dev_priv->vbt.ddi_port_info[PORT_E].supports_hdmi))
+		    intel_bios_is_port_present(dev_priv, PORT_E))
 			intel_ddi_init(dev_priv, PORT_E);
 
 	} else if (HAS_PCH_SPLIT(dev_priv)) {
-- 
2.13.2

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

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

end of thread, other threads:[~2019-01-31 14:48 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-20 13:26 [PATCH 1/3] drm/i915/ddi: Move DDI port detection to the corresponding helper Imre Deak
2018-12-20 13:26 ` [PATCH 2/3] drm/i915/icl: Detect port F presence via VBT Imre Deak
2018-12-21 14:32   ` Jani Nikula
2018-12-20 13:26 ` [PATCH 3/3] drm/i915/icl: Work around broken VBTs for port F detection Imre Deak
2018-12-20 15:52   ` [PATCH v2 " Imre Deak
2019-01-17  1:33     ` Dhinakaran Pandiyan
2019-01-17 16:09       ` Imre Deak
2018-12-20 15:02 ` ✗ Fi.CI.SPARSE: warning for series starting with [1/3] drm/i915/ddi: Move DDI port detection to the corresponding helper Patchwork
2018-12-20 15:29 ` ✓ Fi.CI.BAT: success " Patchwork
2018-12-20 16:39 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915/ddi: Move DDI port detection to the corresponding helper (rev2) Patchwork
2018-12-20 16:40 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-12-20 17:00 ` ✓ Fi.CI.BAT: success " Patchwork
2018-12-21 14:26 ` [PATCH 1/3] drm/i915/ddi: Move DDI port detection to the corresponding helper Jani Nikula
2018-12-21 16:02 ` ✓ Fi.CI.IGT: success for series starting with [1/3] drm/i915/ddi: Move DDI port detection to the corresponding helper (rev2) Patchwork
2019-01-15 14:51   ` Imre Deak
2019-01-31 14:48   ` Imre Deak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox