summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_dp.c
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2010-07-19 09:43:11 +0100
committerEric Anholt <eric@anholt.net>2010-08-01 19:40:00 -0700
commitb9efc4804b1e61ee01a0d824c5d27bfdb518fffe (patch)
tree56b9e9b609629f7d39ffaec71d6f41fe593abe7f /drivers/gpu/drm/i915/intel_dp.c
parent81a14b46846fea0741902e8d8dfcc6c6c78154c8 (diff)
drm/i915: Add fixed panel mode parsed from EDID for eDP without fixed mode in VBT
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp.c')
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index f7410cffa8c..2b99ab23dc8 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)) {