Skip to content

Commit a98d9c1

Browse files
committed
drm/i915/ddi: Rely on VBT DDI port info for eDP detection
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 on DDI platforms. For now chicken out from using VBT for port A before GEN9. v2: - Move the DDI port info lookup to intel_bios_is_port_edp() (David, Jani) - Use the DDI port info on all DDI platforms starting from port B. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Jani Nikula <jani.nikula@intel.com> Cc: David Weinehall <david.weinehall@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v1) Reviewed-by: David Weinehall <david.weinehall@linux.intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1482315444-24750-1-git-send-email-imre.deak@intel.com
1 parent 1081094 commit a98d9c1

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

drivers/gpu/drm/i915/i915_drv.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,6 +1669,7 @@ struct ddi_vbt_port_info {
16691669
uint8_t supports_dvi:1;
16701670
uint8_t supports_hdmi:1;
16711671
uint8_t supports_dp:1;
1672+
uint8_t supports_edp:1;
16721673

16731674
uint8_t alternate_aux_channel;
16741675
uint8_t alternate_ddc_pin;

drivers/gpu/drm/i915/intel_bios.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
11611161
info->supports_dvi = is_dvi;
11621162
info->supports_hdmi = is_hdmi;
11631163
info->supports_dp = is_dp;
1164+
info->supports_edp = is_edp;
11641165

11651166
DRM_DEBUG_KMS("Port %c VBT info: DP:%d HDMI:%d DVI:%d EDP:%d CRT:%d\n",
11661167
port_name(port), is_dp, is_hdmi, is_dvi, is_edp, is_crt);
@@ -1664,6 +1665,9 @@ bool intel_bios_is_port_edp(struct drm_i915_private *dev_priv, enum port port)
16641665
};
16651666
int i;
16661667

1668+
if (HAS_DDI(dev_priv))
1669+
return dev_priv->vbt.ddi_port_info[port].supports_edp;
1670+
16671671
if (!dev_priv->vbt.child_dev_num)
16681672
return false;
16691673

drivers/gpu/drm/i915/intel_dp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4975,7 +4975,7 @@ bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port)
49754975
if (INTEL_GEN(dev_priv) < 5)
49764976
return false;
49774977

4978-
if (port == PORT_A)
4978+
if (INTEL_GEN(dev_priv) < 9 && port == PORT_A)
49794979
return true;
49804980

49814981
return intel_bios_is_port_edp(dev_priv, port);

0 commit comments

Comments
 (0)