diff options
author | Keith Packard <keithp@keithp.com> | 2011-09-19 17:33:26 -0400 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-09-30 19:23:44 -0400 |
commit | 47f0eb2234a2a1c790825393bbaccfadf82463d3 (patch) | |
tree | ac021c31b8a4f0ea14fea07cd51add99cb219ac1 /drivers/gpu/drm | |
parent | 192aac1f19e7a2c69fe486b863c914aabd7acc69 (diff) |
drm/i915: Only use VBT panel mode on eDP if no EDID is found
We're going to assume that EDID is more reliable than the VBT tables
for eDP panels, which is notably true on MacBook machines where the
VBT contains completely bogus data.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 44fef5e1c490..3717fa699f56 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -1755,7 +1755,16 @@ static int intel_dp_get_modes(struct drm_connector *connector) | |||
1755 | 1755 | ||
1756 | /* if eDP has no EDID, try to use fixed panel mode from VBT */ | 1756 | /* if eDP has no EDID, try to use fixed panel mode from VBT */ |
1757 | if (is_edp(intel_dp)) { | 1757 | if (is_edp(intel_dp)) { |
1758 | if (dev_priv->panel_fixed_mode != NULL) { | 1758 | /* initialize panel mode from VBT if available for eDP */ |
1759 | if (dev_priv->panel_fixed_mode == NULL && dev_priv->lfp_lvds_vbt_mode != NULL) { | ||
1760 | dev_priv->panel_fixed_mode = | ||
1761 | drm_mode_duplicate(dev, dev_priv->lfp_lvds_vbt_mode); | ||
1762 | if (dev_priv->panel_fixed_mode) { | ||
1763 | dev_priv->panel_fixed_mode->type |= | ||
1764 | DRM_MODE_TYPE_PREFERRED; | ||
1765 | } | ||
1766 | } | ||
1767 | if (dev_priv->panel_fixed_mode) { | ||
1759 | struct drm_display_mode *mode; | 1768 | struct drm_display_mode *mode; |
1760 | mode = drm_mode_duplicate(dev, dev_priv->panel_fixed_mode); | 1769 | mode = drm_mode_duplicate(dev, dev_priv->panel_fixed_mode); |
1761 | drm_mode_probed_add(connector, mode); | 1770 | drm_mode_probed_add(connector, mode); |
@@ -2068,15 +2077,6 @@ intel_dp_init(struct drm_device *dev, int output_reg) | |||
2068 | intel_encoder->hot_plug = intel_dp_hot_plug; | 2077 | intel_encoder->hot_plug = intel_dp_hot_plug; |
2069 | 2078 | ||
2070 | if (is_edp(intel_dp)) { | 2079 | if (is_edp(intel_dp)) { |
2071 | /* initialize panel mode from VBT if available for eDP */ | ||
2072 | if (dev_priv->lfp_lvds_vbt_mode) { | ||
2073 | dev_priv->panel_fixed_mode = | ||
2074 | drm_mode_duplicate(dev, dev_priv->lfp_lvds_vbt_mode); | ||
2075 | if (dev_priv->panel_fixed_mode) { | ||
2076 | dev_priv->panel_fixed_mode->type |= | ||
2077 | DRM_MODE_TYPE_PREFERRED; | ||
2078 | } | ||
2079 | } | ||
2080 | dev_priv->int_edp_connector = connector; | 2080 | dev_priv->int_edp_connector = connector; |
2081 | intel_panel_setup_backlight(dev); | 2081 | intel_panel_setup_backlight(dev); |
2082 | } | 2082 | } |