diff options
author | Simon Ser <contact@emersion.fr> | 2021-07-08 16:31:09 +0200 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2021-07-09 15:31:19 -0400 |
commit | f67cfb2ce288e7fd24c22a372e95939ce120e81c (patch) | |
tree | 8e3b53baf00e6057a134f1e44e5205e680273653 | |
parent | fde56c20b4711e20edfafcaba67341f71e2c1c10 (diff) |
backend/drm: remove backend arg from wlr_drm_interface.crtc_commit
The callee can just get it from the wlr_drm_connector.
-rw-r--r-- | backend/drm/atomic.c | 6 | ||||
-rw-r--r-- | backend/drm/drm.c | 2 | ||||
-rw-r--r-- | backend/drm/legacy.c | 6 | ||||
-rw-r--r-- | include/backend/drm/iface.h | 7 |
4 files changed, 10 insertions, 11 deletions
diff --git a/backend/drm/atomic.c b/backend/drm/atomic.c index 23f9d60f..35dca7d4 100644 --- a/backend/drm/atomic.c +++ b/backend/drm/atomic.c @@ -166,9 +166,9 @@ error: atom->failed = true; } -static bool atomic_crtc_commit(struct wlr_drm_backend *drm, - struct wlr_drm_connector *conn, const struct wlr_output_state *state, - uint32_t flags, bool test_only) { +static bool atomic_crtc_commit(struct wlr_drm_connector *conn, + const struct wlr_output_state *state, uint32_t flags, bool test_only) { + struct wlr_drm_backend *drm = conn->backend; struct wlr_output *output = &conn->output; struct wlr_drm_crtc *crtc = conn->crtc; diff --git a/backend/drm/drm.c b/backend/drm/drm.c index daf6b379..a11c9de3 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -351,7 +351,7 @@ static bool drm_crtc_commit(struct wlr_drm_connector *conn, struct wlr_drm_backend *drm = conn->backend; struct wlr_drm_crtc *crtc = conn->crtc; - bool ok = drm->iface->crtc_commit(drm, conn, state, flags, test_only); + bool ok = drm->iface->crtc_commit(conn, state, flags, test_only); if (ok && !test_only) { drm_plane_set_committed(crtc->primary); if (crtc->cursor != NULL) { diff --git a/backend/drm/legacy.c b/backend/drm/legacy.c index 7c18b3e3..dd9845ff 100644 --- a/backend/drm/legacy.c +++ b/backend/drm/legacy.c @@ -20,9 +20,8 @@ static bool legacy_crtc_test(struct wlr_drm_connector *conn, return true; } -static bool legacy_crtc_commit(struct wlr_drm_backend *drm, - struct wlr_drm_connector *conn, const struct wlr_output_state *state, - uint32_t flags, bool test_only) { +static bool legacy_crtc_commit(struct wlr_drm_connector *conn, + const struct wlr_output_state *state, uint32_t flags, bool test_only) { if (!legacy_crtc_test(conn, state)) { return false; } @@ -30,6 +29,7 @@ static bool legacy_crtc_commit(struct wlr_drm_backend *drm, return true; } + struct wlr_drm_backend *drm = conn->backend; struct wlr_output *output = &conn->output; struct wlr_drm_crtc *crtc = conn->crtc; struct wlr_drm_plane *cursor = crtc->cursor; diff --git a/include/backend/drm/iface.h b/include/backend/drm/iface.h index f7107973..e02c2199 100644 --- a/include/backend/drm/iface.h +++ b/include/backend/drm/iface.h @@ -13,10 +13,9 @@ struct wlr_drm_crtc; // Used to provide atomic or legacy DRM functions struct wlr_drm_interface { - // Commit al pending changes on a CRTC. - bool (*crtc_commit)(struct wlr_drm_backend *drm, - struct wlr_drm_connector *conn, const struct wlr_output_state *state, - uint32_t flags, bool test_only); + // Commit all pending changes on a CRTC. + bool (*crtc_commit)(struct wlr_drm_connector *conn, + const struct wlr_output_state *state, uint32_t flags, bool test_only); }; extern const struct wlr_drm_interface atomic_iface; |