mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-21 14:42:25 +00:00
backend/drm: Remove reset from interface
The reset implementations are no longer used.
This commit is contained in:
parent
0f255b46fc
commit
1edd5e224f
@ -527,33 +527,6 @@ out:
|
|||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool drm_atomic_reset(struct wlr_drm_backend *drm) {
|
|
||||||
struct atomic atom;
|
|
||||||
atomic_begin(&atom);
|
|
||||||
|
|
||||||
for (size_t i = 0; i < drm->num_crtcs; i++) {
|
|
||||||
struct wlr_drm_crtc *crtc = &drm->crtcs[i];
|
|
||||||
atomic_add(&atom, crtc->id, crtc->props.mode_id, 0);
|
|
||||||
atomic_add(&atom, crtc->id, crtc->props.active, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct wlr_drm_connector *conn;
|
|
||||||
wl_list_for_each(conn, &drm->connectors, link) {
|
|
||||||
atomic_add(&atom, conn->id, conn->props.crtc_id, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (size_t i = 0; i < drm->num_planes; i++) {
|
|
||||||
plane_disable(&atom, &drm->planes[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t flags = DRM_MODE_ATOMIC_ALLOW_MODESET;
|
|
||||||
bool ok = atomic_commit(&atom, drm, NULL, NULL, flags);
|
|
||||||
atomic_finish(&atom);
|
|
||||||
|
|
||||||
return ok;
|
|
||||||
}
|
|
||||||
|
|
||||||
const struct wlr_drm_interface atomic_iface = {
|
const struct wlr_drm_interface atomic_iface = {
|
||||||
.commit = atomic_device_commit,
|
.commit = atomic_device_commit,
|
||||||
.reset = drm_atomic_reset,
|
|
||||||
};
|
};
|
||||||
|
@ -270,20 +270,6 @@ bool drm_legacy_crtc_set_gamma(struct wlr_drm_backend *drm,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool legacy_reset(struct wlr_drm_backend *drm) {
|
|
||||||
bool ok = true;
|
|
||||||
for (size_t i = 0; i < drm->num_crtcs; i++) {
|
|
||||||
struct wlr_drm_crtc *crtc = &drm->crtcs[i];
|
|
||||||
if (drmModeSetCrtc(drm->fd, crtc->id, 0, 0, 0, NULL, 0, NULL) != 0) {
|
|
||||||
wlr_log_errno(WLR_ERROR, "Failed to disable CRTC %"PRIu32,
|
|
||||||
crtc->id);
|
|
||||||
ok = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ok;
|
|
||||||
}
|
|
||||||
|
|
||||||
const struct wlr_drm_interface legacy_iface = {
|
const struct wlr_drm_interface legacy_iface = {
|
||||||
.commit = legacy_commit,
|
.commit = legacy_commit,
|
||||||
.reset = legacy_reset,
|
|
||||||
};
|
};
|
||||||
|
@ -508,5 +508,4 @@ const struct wlr_drm_interface liftoff_iface = {
|
|||||||
.init = init,
|
.init = init,
|
||||||
.finish = finish,
|
.finish = finish,
|
||||||
.commit = commit,
|
.commit = commit,
|
||||||
.reset = drm_atomic_reset,
|
|
||||||
};
|
};
|
||||||
|
@ -22,8 +22,6 @@ struct wlr_drm_interface {
|
|||||||
bool (*commit)(struct wlr_drm_backend *drm,
|
bool (*commit)(struct wlr_drm_backend *drm,
|
||||||
const struct wlr_drm_device_state *state,
|
const struct wlr_drm_device_state *state,
|
||||||
struct wlr_drm_page_flip *page_flip, uint32_t flags, bool test_only);
|
struct wlr_drm_page_flip *page_flip, uint32_t flags, bool test_only);
|
||||||
// Turn off everything
|
|
||||||
bool (*reset)(struct wlr_drm_backend *drm);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern const struct wlr_drm_interface atomic_iface;
|
extern const struct wlr_drm_interface atomic_iface;
|
||||||
|
Loading…
Reference in New Issue
Block a user