mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
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).
This commit is contained in:
parent
7a149fe5ba
commit
69b2279092
5 changed files with 45 additions and 26 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue