From: Zhao Yakui Date: Mon, 19 Jul 2010 08:43:11 +0000 (+0100) Subject: drm/i915: Add fixed panel mode parsed from EDID for eDP without fixed mode in VBT X-Git-Tag: MMI-PSA29.97-13-9~22422^2~70^2~14 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b9efc4804b1e61ee01a0d824c5d27bfdb518fffe;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git drm/i915: Add fixed panel mode parsed from EDID for eDP without fixed mode in VBT Signed-off-by: Zhao Yakui Reviewed-by: Chris Wilson Cc: stable@kernel.org Signed-off-by: Eric Anholt --- diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index f7410cffa8c9..2b99ab23dc8a 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -1374,8 +1374,22 @@ static int intel_dp_get_modes(struct drm_connector *connector) */ ret = intel_ddc_get_modes(connector, intel_encoder->ddc_bus); - if (ret) + if (ret) { + if ((IS_eDP(intel_encoder) || IS_PCH_eDP(dp_priv)) && + !dev_priv->panel_fixed_mode) { + struct drm_display_mode *newmode; + list_for_each_entry(newmode, &connector->probed_modes, + head) { + if (newmode->type & DRM_MODE_TYPE_PREFERRED) { + dev_priv->panel_fixed_mode = + drm_mode_duplicate(dev, newmode); + break; + } + } + } + return ret; + } /* if eDP has no EDID, try to use fixed panel mode from VBT */ if (IS_eDP(intel_encoder) || IS_PCH_eDP(dp_priv)) {