From 97527e52c8023797776d3225b50bfbb1c09499f7 Mon Sep 17 00:00:00 2001 From: Zhao Yakui Date: Fri, 16 Jul 2010 14:28:41 +0800 Subject: [PATCH 1/4] drm/i915: Add fixed panel mode parsed from EDID for eDP without fixed mode in VBT Signed-off-by: Zhao Yakui --- drivers/gpu/drm/i915/intel_dp.c | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index b4f0282..4c51426 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -1325,8 +1325,21 @@ static int intel_dp_get_modes(struct drm_connector *connector) */ ret = intel_ddc_get_modes(connector, intel_encoder->ddc_bus); - if (ret) - return 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); + return ret; + } + } + } else + 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)) { -- 1.5.4.5