intel_fb: optionally respect connector hz config

This commit is contained in:
Christian Helmuth 2017-09-08 15:15:52 +02:00
parent c63f7725be
commit d80fadc635
1 changed files with 3 additions and 1 deletions

View File

@ -104,6 +104,7 @@ Framebuffer::Driver::_preferred_mode(drm_connector *connector)
unsigned long width = 0;
unsigned long height = 0;
long hz = xn.attribute_value("hz", 0L);
xn.attribute("width").value(&width);
xn.attribute("height").value(&height);
@ -111,7 +112,8 @@ Framebuffer::Driver::_preferred_mode(drm_connector *connector)
list_for_each_entry(mode, &connector->modes, head) {
if (mode->hdisplay == (int) width &&
mode->vdisplay == (int) height)
return mode;
if (!hz || hz == mode->vrefresh)
return mode;
};
}
} catch (...) {