aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-11-21 11:14:03 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-11-22 16:16:03 -0500
commit6a9d51b768e2073736ce43164b639ed8da6791ca (patch)
treee198b3913a3ad372b2b608f935f2cfc7fbad9558
parent2aa4f09917d9854928074bb5bf1b9d8a9364a67f (diff)
drm/i915: Report the origin of the LVDS fixed panel mode
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Jani Nikula <jani.nikula@intel.com> [danvet: resolve conflict around the call to intel_crtc_mode_get. And add the missing NULL check Chris spotted while at it.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/intel_lvds.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 2e266277f035..81502e8be26b 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -1056,14 +1056,23 @@ bool intel_lvds_init(struct drm_device *dev)
1056 1056
1057 list_for_each_entry(scan, &connector->probed_modes, head) { 1057 list_for_each_entry(scan, &connector->probed_modes, head) {
1058 if (scan->type & DRM_MODE_TYPE_PREFERRED) { 1058 if (scan->type & DRM_MODE_TYPE_PREFERRED) {
1059 DRM_DEBUG_KMS("using preferred mode from EDID: ");
1060 drm_mode_debug_printmodeline(scan);
1061
1059 fixed_mode = drm_mode_duplicate(dev, scan); 1062 fixed_mode = drm_mode_duplicate(dev, scan);
1060 intel_find_lvds_downclock(dev, fixed_mode, connector); 1063 if (fixed_mode) {
1061 goto out; 1064 intel_find_lvds_downclock(dev, fixed_mode,
1065 connector);
1066 goto out;
1067 }
1062 } 1068 }
1063 } 1069 }
1064 1070
1065 /* Failed to get EDID, what about VBT? */ 1071 /* Failed to get EDID, what about VBT? */
1066 if (dev_priv->lfp_lvds_vbt_mode) { 1072 if (dev_priv->lfp_lvds_vbt_mode) {
1073 DRM_DEBUG_KMS("using mode from VBT: ");
1074 drm_mode_debug_printmodeline(dev_priv->lfp_lvds_vbt_mode);
1075
1067 fixed_mode = drm_mode_duplicate(dev, dev_priv->lfp_lvds_vbt_mode); 1076 fixed_mode = drm_mode_duplicate(dev, dev_priv->lfp_lvds_vbt_mode);
1068 if (fixed_mode) { 1077 if (fixed_mode) {
1069 fixed_mode->type |= DRM_MODE_TYPE_PREFERRED; 1078 fixed_mode->type |= DRM_MODE_TYPE_PREFERRED;
@@ -1088,6 +1097,8 @@ bool intel_lvds_init(struct drm_device *dev)
1088 if (crtc && (lvds & LVDS_PORT_EN)) { 1097 if (crtc && (lvds & LVDS_PORT_EN)) {
1089 fixed_mode = intel_crtc_mode_get(dev, crtc); 1098 fixed_mode = intel_crtc_mode_get(dev, crtc);
1090 if (fixed_mode) { 1099 if (fixed_mode) {
1100 DRM_DEBUG_KMS("using current (BIOS) mode: ");
1101 drm_mode_debug_printmodeline(fixed_mode);
1091 fixed_mode->type |= DRM_MODE_TYPE_PREFERRED; 1102 fixed_mode->type |= DRM_MODE_TYPE_PREFERRED;
1092 goto out; 1103 goto out;
1093 } 1104 }