drm/i915: make LVDS fixed mode a preferred mode
authorJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 14 Jan 2009 18:53:36 +0000 (10:53 -0800)
committerDave Airlie <airlied@linux.ie>
Fri, 16 Jan 2009 08:41:01 +0000 (18:41 +1000)
The detected fixed panel mode really is preferred, so mark it as such and
add it to the LVDS connector mode list.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
drivers/gpu/drm/i915/intel_lvds.c

index ccecfaf6307b79b97f3c7ab98817020eec804cef..2fafdcc108fe5161cef9e16862fdad2c8c6fd550 100644 (file)
@@ -456,6 +456,13 @@ void intel_lvds_init(struct drm_device *dev)
                dev_priv->panel_fixed_mode =
                        drm_mode_duplicate(dev, dev_priv->vbt_mode);
                mutex_unlock(&dev->mode_config.mutex);
+               if (dev_priv->panel_fixed_mode) {
+                       dev_priv->panel_fixed_mode->type |=
+                               DRM_MODE_TYPE_PREFERRED;
+                       drm_mode_probed_add(connector,
+                                           dev_priv->panel_fixed_mode);
+                       goto out;
+               }
        }
 
        /*