Commit 5255e2f8 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Replace vbt edp.support with int_lvds_support

Replace dev_priv->vbt.edp.support with
dev_priv->vbt.int_lvds_support. We'll want to extend its
use beyond the LVDS vs. eDP case in the future.

v2: Nuke the edp.support from parse_edp() (Jani)
    Only clear int_lvds_support for gen5+ to preserve
    the current behaviour (Jani)

Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180508140814.20105-1-ville.syrjala@linux.intel.comReviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 1abb70f5
...@@ -1052,6 +1052,7 @@ struct intel_vbt_data { ...@@ -1052,6 +1052,7 @@ struct intel_vbt_data {
unsigned int lvds_vbt:1; unsigned int lvds_vbt:1;
unsigned int int_crt_support:1; unsigned int int_crt_support:1;
unsigned int lvds_use_ssc:1; unsigned int lvds_use_ssc:1;
unsigned int int_lvds_support:1;
unsigned int display_clock_mode:1; unsigned int display_clock_mode:1;
unsigned int fdi_rx_polarity_inverted:1; unsigned int fdi_rx_polarity_inverted:1;
unsigned int panel_type:4; unsigned int panel_type:4;
...@@ -1067,7 +1068,6 @@ struct intel_vbt_data { ...@@ -1067,7 +1068,6 @@ struct intel_vbt_data {
int vswing; int vswing;
bool low_vswing; bool low_vswing;
bool initialized; bool initialized;
bool support;
int bpp; int bpp;
struct edp_power_seq pps; struct edp_power_seq pps;
} edp; } edp;
......
...@@ -518,8 +518,9 @@ parse_driver_features(struct drm_i915_private *dev_priv, ...@@ -518,8 +518,9 @@ parse_driver_features(struct drm_i915_private *dev_priv,
if (!driver) if (!driver)
return; return;
if (driver->lvds_config == BDB_DRIVER_FEATURE_EDP) if (INTEL_GEN(dev_priv) >= 5 &&
dev_priv->vbt.edp.support = 1; driver->lvds_config == BDB_DRIVER_FEATURE_EDP)
dev_priv->vbt.int_lvds_support = 0;
DRM_DEBUG_KMS("DRRS State Enabled:%d\n", driver->drrs_enabled); DRM_DEBUG_KMS("DRRS State Enabled:%d\n", driver->drrs_enabled);
/* /*
...@@ -542,11 +543,8 @@ parse_edp(struct drm_i915_private *dev_priv, const struct bdb_header *bdb) ...@@ -542,11 +543,8 @@ parse_edp(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
int panel_type = dev_priv->vbt.panel_type; int panel_type = dev_priv->vbt.panel_type;
edp = find_section(bdb, BDB_EDP); edp = find_section(bdb, BDB_EDP);
if (!edp) { if (!edp)
if (dev_priv->vbt.edp.support)
DRM_DEBUG_KMS("No eDP BDB found but eDP panel supported.\n");
return; return;
}
switch ((edp->color_depth >> (panel_type * 2)) & 3) { switch ((edp->color_depth >> (panel_type * 2)) & 3) {
case EDP_18BPP: case EDP_18BPP:
...@@ -1513,6 +1511,9 @@ init_vbt_defaults(struct drm_i915_private *dev_priv) ...@@ -1513,6 +1511,9 @@ init_vbt_defaults(struct drm_i915_private *dev_priv)
dev_priv->vbt.int_tv_support = 1; dev_priv->vbt.int_tv_support = 1;
dev_priv->vbt.int_crt_support = 1; dev_priv->vbt.int_crt_support = 1;
/* driver features */
dev_priv->vbt.int_lvds_support = 1;
/* Default to using SSC */ /* Default to using SSC */
dev_priv->vbt.lvds_use_ssc = 1; dev_priv->vbt.lvds_use_ssc = 1;
/* /*
......
...@@ -1003,6 +1003,11 @@ void intel_lvds_init(struct drm_i915_private *dev_priv) ...@@ -1003,6 +1003,11 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
if (dmi_check_system(intel_no_lvds)) if (dmi_check_system(intel_no_lvds))
return; return;
if (!dev_priv->vbt.int_lvds_support) {
DRM_DEBUG_KMS("Internal LVDS support disabled by VBT\n");
return;
}
if (HAS_PCH_SPLIT(dev_priv)) if (HAS_PCH_SPLIT(dev_priv))
lvds_reg = PCH_LVDS; lvds_reg = PCH_LVDS;
else else
...@@ -1013,10 +1018,6 @@ void intel_lvds_init(struct drm_i915_private *dev_priv) ...@@ -1013,10 +1018,6 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
if (HAS_PCH_SPLIT(dev_priv)) { if (HAS_PCH_SPLIT(dev_priv)) {
if ((lvds & LVDS_DETECTED) == 0) if ((lvds & LVDS_DETECTED) == 0)
return; return;
if (dev_priv->vbt.edp.support) {
DRM_DEBUG_KMS("disable LVDS for eDP support\n");
return;
}
} }
pin = GMBUS_PIN_PANEL; pin = GMBUS_PIN_PANEL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment