intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915/gen9+: Rely on VBT DDI port info for eDP detection
@ 2016-12-20 15:12 Imre Deak
  2016-12-20 15:31 ` Ville Syrjälä
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Imre Deak @ 2016-12-20 15:12 UTC (permalink / raw)
  To: intel-gfx

There is at least one APL based system using port A in DP mode
(connecting to an on-board DP->VGA adaptor). Atm we'll configure port A
unconditionally as eDP which is incorrect in this case. Fix this by
relying on the VBT DDI port 'internal port' flag instead on all ports
GEN9 onwards. For now chicken out from doing this on earlier DDI
platforms too.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h   | 1 +
 drivers/gpu/drm/i915/intel_bios.c | 1 +
 drivers/gpu/drm/i915/intel_dp.c   | 3 +++
 3 files changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 7e94e506..42fb7e9 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1669,6 +1669,7 @@ struct ddi_vbt_port_info {
 	uint8_t supports_dvi:1;
 	uint8_t supports_hdmi:1;
 	uint8_t supports_dp:1;
+	uint8_t supports_edp:1;
 
 	uint8_t alternate_aux_channel;
 	uint8_t alternate_ddc_pin;
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 1cf2fa6..60fdd31 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1161,6 +1161,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
 	info->supports_dvi = is_dvi;
 	info->supports_hdmi = is_hdmi;
 	info->supports_dp = is_dp;
+	info->supports_edp = is_edp;
 
 	DRM_DEBUG_KMS("Port %c VBT info: DP:%d HDMI:%d DVI:%d EDP:%d CRT:%d\n",
 		      port_name(port), is_dp, is_hdmi, is_dvi, is_edp, is_crt);
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index d37cb00..7f3f4fa 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4983,6 +4983,9 @@ bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port)
 	if (INTEL_GEN(dev_priv) < 5)
 		return false;
 
+	if (INTEL_GEN(dev_priv) >= 9)
+		return dev_priv->vbt.ddi_port_info[port].supports_edp;
+
 	if (port == PORT_A)
 		return true;
 
-- 
2.5.0

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

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

end of thread, other threads:[~2016-12-22 12:28 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-20 15:12 [PATCH] drm/i915/gen9+: Rely on VBT DDI port info for eDP detection Imre Deak
2016-12-20 15:31 ` Ville Syrjälä
2016-12-20 16:02 ` David Weinehall
2016-12-20 16:34   ` Imre Deak
2016-12-21  8:34     ` Jani Nikula
2016-12-21 10:03       ` Imre Deak
2016-12-20 17:45 ` ✗ Fi.CI.BAT: warning for " Patchwork
2016-12-21 10:17 ` [PATCH v2] drm/i915/ddi: " Imre Deak
2016-12-21 11:21   ` Jani Nikula
2016-12-21 11:50     ` Imre Deak
2016-12-21 11:56       ` Jani Nikula
2016-12-22  9:12   ` David Weinehall
2016-12-22 12:28     ` Imre Deak
2016-12-21 10:56 ` ✗ Fi.CI.BAT: failure for drm/i915/gen9+: Rely on VBT DDI port info for eDP detection (rev2) Patchwork
2016-12-21 12:15   ` Imre Deak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).