aboutsummaryrefslogtreecommitdiff
path: root/backend/drm/legacy.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-05-07 17:11:32 +0200
committerSimon Ser <contact@emersion.fr>2020-05-09 16:42:25 +0200
commit69b22790923186bea48ab23e413927334eff828b (patch)
treeaa116fcc5d7653d7a96d4fd4cf8f5cb1387befff /backend/drm/legacy.c
parent7a149fe5baeb61afe51228b6263e6c16ed05647b (diff)
backend/drm: remove mode argument to crtc_pageflip
Add a new wlr_drm_crtc.pending bitfield which keeps track of pending output changes. More fields will be added in the future (e.g. active, gamma).
Diffstat (limited to 'backend/drm/legacy.c')
-rw-r--r--backend/drm/legacy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/backend/drm/legacy.c b/backend/drm/legacy.c
index da9b636f..ba16493f 100644
--- a/backend/drm/legacy.c
+++ b/backend/drm/legacy.c
@@ -7,7 +7,7 @@
#include "backend/drm/util.h"
static bool legacy_crtc_pageflip(struct wlr_drm_backend *drm,
- struct wlr_drm_connector *conn, drmModeModeInfo *mode) {
+ struct wlr_drm_connector *conn) {
struct wlr_drm_crtc *crtc = conn->crtc;
struct wlr_drm_plane *cursor = crtc->cursor;
@@ -22,9 +22,9 @@ static bool legacy_crtc_pageflip(struct wlr_drm_backend *drm,
return false;
}
- if (mode) {
+ if (crtc->pending & WLR_DRM_CRTC_MODE) {
if (drmModeSetCrtc(drm->fd, crtc->id, fb_id, 0, 0,
- &conn->id, 1, mode)) {
+ &conn->id, 1, &crtc->mode)) {
wlr_log_errno(WLR_ERROR, "%s: Failed to set CRTC", conn->output.name);
return false;
}