mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
backend/drm: Remove reset from interface
The reset implementations are no longer used.
This commit is contained in:
parent
0f255b46fc
commit
1edd5e224f
4 changed files with 0 additions and 44 deletions
|
|
@ -527,33 +527,6 @@ out:
|
|||
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 = {
|
||||
.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;
|
||||
}
|
||||
|
||||
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 = {
|
||||
.commit = legacy_commit,
|
||||
.reset = legacy_reset,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -508,5 +508,4 @@ const struct wlr_drm_interface liftoff_iface = {
|
|||
.init = init,
|
||||
.finish = finish,
|
||||
.commit = commit,
|
||||
.reset = drm_atomic_reset,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue