mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-14 08:22:25 -04:00
backend/drm: Allow interlaced modes whose resolution is unique
This partially reverts the filtering-out of interlaced modes, but we still remove those whose resolution matches a progressive mode (at least until wlr-randr and arandr can be taught to distinguish them).
This commit is contained in:
parent
f36f856cdb
commit
e6858621ab
1 changed files with 14 additions and 1 deletions
|
|
@ -1612,7 +1612,20 @@ static bool connect_drm_connector(struct wlr_drm_connector *wlr_conn,
|
|||
bool found_current_mode = false;
|
||||
for (int i = 0; i < drm_conn->count_modes; ++i) {
|
||||
if (drm_conn->modes[i].flags & DRM_MODE_FLAG_INTERLACE) {
|
||||
continue;
|
||||
// Filter out any interlaced mode with the same resolution
|
||||
// as a progressive mode (because wlr-randr and arandr
|
||||
// can't currently distinguish them).
|
||||
int j;
|
||||
for (j = 0; j < drm_conn->count_modes; ++j) {
|
||||
if (!(drm_conn->modes[j].flags & DRM_MODE_FLAG_INTERLACE) &&
|
||||
drm_conn->modes[j].hdisplay == drm_conn->modes[i].hdisplay &&
|
||||
drm_conn->modes[j].vdisplay == drm_conn->modes[i].vdisplay) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (j < drm_conn->count_modes) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
struct wlr_drm_mode *mode = drm_mode_create(&drm_conn->modes[i]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue