diff options
author | Imre Deak <imre.deak@intel.com> | 2018-12-20 15:26:02 +0200 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2019-01-15 16:18:23 +0200 |
commit | e9d49bb718f394faab07498ca5f14d7f8414b1da (patch) | |
tree | 3a7d9f926fadf1ca013870780e558637ff3dfe3d /drivers/gpu/drm/i915/intel_bios.c | |
parent | decd29e6b5fe08e20fade72100e2d4a85dc5f766 (diff) | |
download | linux-e9d49bb718f394faab07498ca5f14d7f8414b1da.tar.gz |
drm/i915/ddi: Move DDI port detection to the corresponding helper
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> Link: https://patchwork.freedesktop.org/patch/msgid/20181220132604.25222-1-imre.deak@intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_bios.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_bios.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index 140c218128cb..561a4f9f044c 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c @@ -1946,6 +1946,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; |