vmwgfx: Move the prefered mode first in the list
authorJakob Bornecrantz <jakob@vmware.com>
Thu, 3 Nov 2011 20:03:07 +0000 (21:03 +0100)
committerDave Airlie <airlied@redhat.com>
Mon, 7 Nov 2011 13:16:34 +0000 (13:16 +0000)
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c

index 66e92acb3c5b8545b1fd633f0d3e648233592c0d..8de24836edb1a330a5d549d585c456c23f7a31b2 100644 (file)
@@ -1747,6 +1747,10 @@ int vmw_du_connector_fill_modes(struct drm_connector *connector,
                drm_mode_probed_add(connector, mode);
        }
 
+       /* Move the prefered mode first, help apps pick the right mode. */
+       if (du->pref_mode)
+               list_move(&du->pref_mode->head, &connector->probed_modes);
+
        drm_mode_connector_list_update(connector);
 
        return 1;