aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2024-02-14 14:42:01 +0100
committerSimon Ser <contact@emersion.fr>2024-02-14 17:13:25 +0100
commit741aaa3f761a7175f622150defac514da8f2fed6 (patch)
tree6a4016603e333c5363ba53a498054bfb56539a08 /backend
parent76ed82c10139c9154efde0abae01c43516a8dca9 (diff)
backend/drm: drop wlr_drm_backend arg from create_mode_blob()
No need for this, the backend can be grabbed from the connector.
Diffstat (limited to 'backend')
-rw-r--r--backend/drm/atomic.c7
-rw-r--r--backend/drm/libliftoff.c2
2 files changed, 4 insertions, 5 deletions
diff --git a/backend/drm/atomic.c b/backend/drm/atomic.c
index 530ee254..60f20e03 100644
--- a/backend/drm/atomic.c
+++ b/backend/drm/atomic.c
@@ -95,15 +95,14 @@ static void atomic_add(struct atomic *atom, uint32_t id, uint32_t prop, uint64_t
}
}
-bool create_mode_blob(struct wlr_drm_backend *drm,
- struct wlr_drm_connector *conn,
+bool create_mode_blob(struct wlr_drm_connector *conn,
const struct wlr_drm_connector_state *state, uint32_t *blob_id) {
if (!state->active) {
*blob_id = 0;
return true;
}
- if (drmModeCreatePropertyBlob(drm->fd, &state->mode,
+ if (drmModeCreatePropertyBlob(conn->backend->fd, &state->mode,
sizeof(drmModeModeInfo), blob_id)) {
wlr_log_errno(WLR_ERROR, "Unable to create mode property blob");
return false;
@@ -270,7 +269,7 @@ static bool atomic_crtc_commit(struct wlr_drm_connector *conn,
uint32_t mode_id = crtc->mode_id;
if (modeset) {
- if (!create_mode_blob(drm, conn, state, &mode_id)) {
+ if (!create_mode_blob(conn, state, &mode_id)) {
return false;
}
}
diff --git a/backend/drm/libliftoff.c b/backend/drm/libliftoff.c
index c877e7b8..a39f2493 100644
--- a/backend/drm/libliftoff.c
+++ b/backend/drm/libliftoff.c
@@ -317,7 +317,7 @@ static bool crtc_commit(struct wlr_drm_connector *conn,
uint32_t mode_id = crtc->mode_id;
if (modeset) {
- if (!create_mode_blob(drm, conn, state, &mode_id)) {
+ if (!create_mode_blob(conn, state, &mode_id)) {
return false;
}
}