backend/drm: remove backend arg from wlr_drm_interface.crtc_commit

The callee can just get it from the wlr_drm_connector.
master
Simon Ser 3 years ago committed by Simon Zeni
parent fde56c20b4
commit f67cfb2ce2

@ -166,9 +166,9 @@ error:
atom->failed = true; atom->failed = true;
} }
static bool atomic_crtc_commit(struct wlr_drm_backend *drm, static bool atomic_crtc_commit(struct wlr_drm_connector *conn,
struct wlr_drm_connector *conn, const struct wlr_output_state *state, const struct wlr_output_state *state, uint32_t flags, bool test_only) {
uint32_t flags, bool test_only) { struct wlr_drm_backend *drm = conn->backend;
struct wlr_output *output = &conn->output; struct wlr_output *output = &conn->output;
struct wlr_drm_crtc *crtc = conn->crtc; struct wlr_drm_crtc *crtc = conn->crtc;

@ -351,7 +351,7 @@ static bool drm_crtc_commit(struct wlr_drm_connector *conn,
struct wlr_drm_backend *drm = conn->backend; struct wlr_drm_backend *drm = conn->backend;
struct wlr_drm_crtc *crtc = conn->crtc; 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) { if (ok && !test_only) {
drm_plane_set_committed(crtc->primary); drm_plane_set_committed(crtc->primary);
if (crtc->cursor != NULL) { if (crtc->cursor != NULL) {

@ -20,9 +20,8 @@ static bool legacy_crtc_test(struct wlr_drm_connector *conn,
return true; return true;
} }
static bool legacy_crtc_commit(struct wlr_drm_backend *drm, static bool legacy_crtc_commit(struct wlr_drm_connector *conn,
struct wlr_drm_connector *conn, const struct wlr_output_state *state, const struct wlr_output_state *state, uint32_t flags, bool test_only) {
uint32_t flags, bool test_only) {
if (!legacy_crtc_test(conn, state)) { if (!legacy_crtc_test(conn, state)) {
return false; return false;
} }
@ -30,6 +29,7 @@ static bool legacy_crtc_commit(struct wlr_drm_backend *drm,
return true; return true;
} }
struct wlr_drm_backend *drm = conn->backend;
struct wlr_output *output = &conn->output; struct wlr_output *output = &conn->output;
struct wlr_drm_crtc *crtc = conn->crtc; struct wlr_drm_crtc *crtc = conn->crtc;
struct wlr_drm_plane *cursor = crtc->cursor; struct wlr_drm_plane *cursor = crtc->cursor;

@ -13,10 +13,9 @@ struct wlr_drm_crtc;
// Used to provide atomic or legacy DRM functions // Used to provide atomic or legacy DRM functions
struct wlr_drm_interface { struct wlr_drm_interface {
// Commit al pending changes on a CRTC. // Commit all pending changes on a CRTC.
bool (*crtc_commit)(struct wlr_drm_backend *drm, bool (*crtc_commit)(struct wlr_drm_connector *conn,
struct wlr_drm_connector *conn, const struct wlr_output_state *state, const struct wlr_output_state *state, uint32_t flags, bool test_only);
uint32_t flags, bool test_only);
}; };
extern const struct wlr_drm_interface atomic_iface; extern const struct wlr_drm_interface atomic_iface;

Loading…
Cancel
Save