diff options
author | Zhao Yakui <yakui.zhao@intel.com> | 2010-07-19 04:43:11 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-08-01 22:40:00 -0400 |
commit | b9efc4804b1e61ee01a0d824c5d27bfdb518fffe (patch) | |
tree | 56b9e9b609629f7d39ffaec71d6f41fe593abe7f /drivers/gpu | |
parent | 81a14b46846fea0741902e8d8dfcc6c6c78154c8 (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')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 16 |
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 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) | |||
1374 | */ | 1374 | */ |
1375 | 1375 | ||
1376 | ret = intel_ddc_get_modes(connector, intel_encoder->ddc_bus); | 1376 | ret = intel_ddc_get_modes(connector, intel_encoder->ddc_bus); |
1377 | if (ret) | 1377 | if (ret) { |
1378 | if ((IS_eDP(intel_encoder) || IS_PCH_eDP(dp_priv)) && | ||
1379 | !dev_priv->panel_fixed_mode) { | ||
1380 | struct drm_display_mode *newmode; | ||
1381 | list_for_each_entry(newmode, &connector->probed_modes, | ||
1382 | head) { | ||
1383 | if (newmode->type & DRM_MODE_TYPE_PREFERRED) { | ||
1384 | dev_priv->panel_fixed_mode = | ||
1385 | drm_mode_duplicate(dev, newmode); | ||
1386 | break; | ||
1387 | } | ||
1388 | } | ||
1389 | } | ||
1390 | |||
1378 | return ret; | 1391 | return ret; |
1392 | } | ||
1379 | 1393 | ||
1380 | /* if eDP has no EDID, try to use fixed panel mode from VBT */ | 1394 | /* if eDP has no EDID, try to use fixed panel mode from VBT */ |
1381 | if (IS_eDP(intel_encoder) || IS_PCH_eDP(dp_priv)) { | 1395 | if (IS_eDP(intel_encoder) || IS_PCH_eDP(dp_priv)) { |