Skip to content

Commit

Permalink
drm/vmwgfx: Fix kms preferred mode sorting
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Hellstrom committed Aug 5, 2015
1 parent 352b20d commit f6b0500
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f6b0500

Please sign in to comment.