From bc0699f2826081dd54dbf8edd67e047393a20d40 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Mon, 10 Jun 2019 09:02:22 -0700 Subject: Use first preferred mode Otherwise we would pick a higher resolution mode that follows the preferred mode. It seems there are some monitors that will accept higher resolutions than their native resolution and scale. Presumably to support 1080p video on a lower resolution panel. --- drm-common.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drm-common.c') diff --git a/drm-common.c b/drm-common.c index 136fe69..e4dad9c 100644 --- a/drm-common.c +++ b/drm-common.c @@ -205,6 +205,7 @@ int init_drm(struct drm *drm, const char *device) if (current_mode->type & DRM_MODE_TYPE_PREFERRED) { drm->mode = current_mode; + break; } int current_area = current_mode->hdisplay * current_mode->vdisplay; -- cgit v1.2.1