mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 02:19:49 +01:00
drm: do not modeset to current mode
There is no point in modesetting an output to a mode that it is already set to. Modesetting will cause the output to briefly flicker which is undesirable for a noop. This returns early in `drm_connector_set_mode` when attempting to modeset to the current mode.
This commit is contained in:
parent
5c8d2da0a1
commit
72c76b128e
1 changed files with 4 additions and 0 deletions
|
@ -537,6 +537,10 @@ static bool drm_connector_set_mode(struct wlr_output *output,
|
|||
conn->desired_mode = mode;
|
||||
return false;
|
||||
}
|
||||
if (conn->output.current_mode == mode) {
|
||||
// Nothing to do
|
||||
return true;
|
||||
}
|
||||
|
||||
wlr_log(WLR_INFO, "Modesetting '%s' with '%ux%u@%u mHz'",
|
||||
conn->output.name, mode->width, mode->height, mode->refresh);
|
||||
|
|
Loading…
Reference in a new issue