mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
Revert "output: atomic mode"
This reverts commit ee5f98ad49.
This intoduced problems where outputs could not be turned off because
they had flips pending.
This commit is contained in:
parent
4d36cc86eb
commit
01f903874b
10 changed files with 114 additions and 291 deletions
|
|
@ -328,9 +328,12 @@ static bool drm_connector_attach_render(struct wlr_output *output,
|
|||
return make_drm_surface_current(&conn->crtc->primary->surf, buffer_age);
|
||||
}
|
||||
|
||||
static bool drm_connector_commit_buffer(struct wlr_output *output) {
|
||||
static bool drm_connector_commit(struct wlr_output *output) {
|
||||
struct wlr_drm_connector *conn = get_drm_connector_from_output(output);
|
||||
struct wlr_drm_backend *drm = get_drm_backend_from_backend(output->backend);
|
||||
if (!drm->session->active) {
|
||||
return false;
|
||||
}
|
||||
|
||||
struct wlr_drm_crtc *crtc = conn->crtc;
|
||||
if (!crtc) {
|
||||
|
|
@ -401,37 +404,6 @@ static bool drm_connector_commit_buffer(struct wlr_output *output) {
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool drm_connector_commit(struct wlr_output *output) {
|
||||
struct wlr_drm_backend *drm = get_drm_backend_from_backend(output->backend);
|
||||
|
||||
if (!drm->session->active) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (output->pending.committed & WLR_OUTPUT_STATE_ENABLED) {
|
||||
if (!enable_drm_connector(output, output->pending.enabled)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (output->pending.committed & WLR_OUTPUT_STATE_MODE) {
|
||||
if (output->pending.mode_type != WLR_OUTPUT_STATE_MODE_FIXED) {
|
||||
return false;
|
||||
}
|
||||
if (!drm_connector_set_mode(output, output->pending.mode)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (output->pending.committed & WLR_OUTPUT_STATE_BUFFER) {
|
||||
if (!drm_connector_commit_buffer(output)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void fill_empty_gamma_table(size_t size,
|
||||
uint16_t *r, uint16_t *g, uint16_t *b) {
|
||||
for (uint32_t i = 0; i < size; ++i) {
|
||||
|
|
@ -950,6 +922,8 @@ static void drm_connector_destroy(struct wlr_output *output) {
|
|||
}
|
||||
|
||||
static const struct wlr_output_impl output_impl = {
|
||||
.enable = enable_drm_connector,
|
||||
.set_mode = drm_connector_set_mode,
|
||||
.set_cursor = drm_connector_set_cursor,
|
||||
.move_cursor = drm_connector_move_cursor,
|
||||
.destroy = drm_connector_destroy,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue