mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-25 16:42:26 +00:00
backend/drm: drop wlr_drm_backend arg from create_mode_blob()
No need for this, the backend can be grabbed from the connector.
This commit is contained in:
parent
76ed82c101
commit
741aaa3f76
@ -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,
|
bool create_mode_blob(struct wlr_drm_connector *conn,
|
||||||
struct wlr_drm_connector *conn,
|
|
||||||
const struct wlr_drm_connector_state *state, uint32_t *blob_id) {
|
const struct wlr_drm_connector_state *state, uint32_t *blob_id) {
|
||||||
if (!state->active) {
|
if (!state->active) {
|
||||||
*blob_id = 0;
|
*blob_id = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (drmModeCreatePropertyBlob(drm->fd, &state->mode,
|
if (drmModeCreatePropertyBlob(conn->backend->fd, &state->mode,
|
||||||
sizeof(drmModeModeInfo), blob_id)) {
|
sizeof(drmModeModeInfo), blob_id)) {
|
||||||
wlr_log_errno(WLR_ERROR, "Unable to create mode property blob");
|
wlr_log_errno(WLR_ERROR, "Unable to create mode property blob");
|
||||||
return false;
|
return false;
|
||||||
@ -270,7 +269,7 @@ static bool atomic_crtc_commit(struct wlr_drm_connector *conn,
|
|||||||
|
|
||||||
uint32_t mode_id = crtc->mode_id;
|
uint32_t mode_id = crtc->mode_id;
|
||||||
if (modeset) {
|
if (modeset) {
|
||||||
if (!create_mode_blob(drm, conn, state, &mode_id)) {
|
if (!create_mode_blob(conn, state, &mode_id)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -317,7 +317,7 @@ static bool crtc_commit(struct wlr_drm_connector *conn,
|
|||||||
|
|
||||||
uint32_t mode_id = crtc->mode_id;
|
uint32_t mode_id = crtc->mode_id;
|
||||||
if (modeset) {
|
if (modeset) {
|
||||||
if (!create_mode_blob(drm, conn, state, &mode_id)) {
|
if (!create_mode_blob(conn, state, &mode_id)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,8 +31,7 @@ extern const struct wlr_drm_interface liftoff_iface;
|
|||||||
bool drm_legacy_crtc_set_gamma(struct wlr_drm_backend *drm,
|
bool drm_legacy_crtc_set_gamma(struct wlr_drm_backend *drm,
|
||||||
struct wlr_drm_crtc *crtc, size_t size, uint16_t *lut);
|
struct wlr_drm_crtc *crtc, size_t size, uint16_t *lut);
|
||||||
|
|
||||||
bool create_mode_blob(struct wlr_drm_backend *drm,
|
bool create_mode_blob(struct wlr_drm_connector *conn,
|
||||||
struct wlr_drm_connector *conn,
|
|
||||||
const struct wlr_drm_connector_state *state, uint32_t *blob_id);
|
const struct wlr_drm_connector_state *state, uint32_t *blob_id);
|
||||||
bool create_gamma_lut_blob(struct wlr_drm_backend *drm,
|
bool create_gamma_lut_blob(struct wlr_drm_backend *drm,
|
||||||
size_t size, const uint16_t *lut, uint32_t *blob_id);
|
size_t size, const uint16_t *lut, uint32_t *blob_id);
|
||||||
|
Loading…
Reference in New Issue
Block a user