mutter/wayland: Improved preferred mode selection for the native backend
Instead of selecting the first drm mode as the preferred mode, select the first drm mode marked as preferred. If there are no modes marked as preferred, revert to the old behaviour and select the first mode. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> https://bugzilla.gnome.org/show_bug.cgi?id=750363
This commit is contained in:
parent
103c88bd72
commit
4d5dd01b7d
@ -601,11 +601,17 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
|
||||
break;
|
||||
}
|
||||
|
||||
meta_output->preferred_mode = NULL;
|
||||
meta_output->n_modes = connector->count_modes;
|
||||
meta_output->modes = g_new0 (MetaMonitorMode *, meta_output->n_modes);
|
||||
for (j = 0; j < meta_output->n_modes; j++)
|
||||
for (j = 0; j < meta_output->n_modes; j++) {
|
||||
meta_output->modes[j] = find_meta_mode (manager, &connector->modes[j]);
|
||||
meta_output->preferred_mode = meta_output->modes[0];
|
||||
if (connector->modes[j].type & DRM_MODE_TYPE_PREFERRED)
|
||||
meta_output->preferred_mode = meta_output->modes[j];
|
||||
}
|
||||
|
||||
if (!meta_output->preferred_mode)
|
||||
meta_output->preferred_mode = meta_output->modes[0];
|
||||
|
||||
output_kms->connector = connector;
|
||||
output_kms->n_encoders = connector->count_encoders;
|
||||
|
Loading…
Reference in New Issue
Block a user