summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2015-06-29 12:59:58 -0700
committerThomas Hellstrom <thellstrom@vmware.com>2015-08-05 14:01:11 +0200
commitf6b05004538ab0933c7527f10a2a6ed88c620f99 (patch)
tree1d6af79077b60f5d0768be44b449772f077b1333 /drivers
parent352b20dc51488b264abe6b9755395c63c90e807b (diff)
downloadlinux-stable-f6b05004538ab0933c7527f10a2a6ed88c620f99.tar.gz
linux-stable-f6b05004538ab0933c7527f10a2a6ed88c620f99.tar.bz2
linux-stable-f6b05004538ab0933c7527f10a2a6ed88c620f99.zip
drm/vmwgfx: Fix kms preferred mode sorting
The preferred mode typically didn't end up first, since the function drm_mode_connector_list_update() reordered the modes. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_kms.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index ae87e7ec06ef..ef605b66458f 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -1554,11 +1554,9 @@ 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, true);
+ /* Move the prefered mode first, help apps pick the right mode. */
+ drm_mode_sort(&connector->modes);
return 1;
}