|
|
@ -291,19 +291,19 @@ drm_output_update_complete(struct drm_output *output, uint32_t flags, |
|
|
|
output->state_last = NULL; |
|
|
|
output->state_last = NULL; |
|
|
|
|
|
|
|
|
|
|
|
if (output->destroy_pending) { |
|
|
|
if (output->destroy_pending) { |
|
|
|
output->destroy_pending = 0; |
|
|
|
output->destroy_pending = false; |
|
|
|
output->disable_pending = 0; |
|
|
|
output->disable_pending = false; |
|
|
|
output->dpms_off_pending = 0; |
|
|
|
output->dpms_off_pending = false; |
|
|
|
drm_output_destroy(&output->base); |
|
|
|
drm_output_destroy(&output->base); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} else if (output->disable_pending) { |
|
|
|
} else if (output->disable_pending) { |
|
|
|
output->disable_pending = 0; |
|
|
|
output->disable_pending = false; |
|
|
|
output->dpms_off_pending = 0; |
|
|
|
output->dpms_off_pending = false; |
|
|
|
weston_output_disable(&output->base); |
|
|
|
weston_output_disable(&output->base); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} else if (output->dpms_off_pending) { |
|
|
|
} else if (output->dpms_off_pending) { |
|
|
|
struct drm_pending_state *pending = drm_pending_state_alloc(b); |
|
|
|
struct drm_pending_state *pending = drm_pending_state_alloc(b); |
|
|
|
output->dpms_off_pending = 0; |
|
|
|
output->dpms_off_pending = false; |
|
|
|
drm_output_get_disable_state(pending, output); |
|
|
|
drm_output_get_disable_state(pending, output); |
|
|
|
drm_pending_state_apply_sync(pending); |
|
|
|
drm_pending_state_apply_sync(pending); |
|
|
|
} else if (output->state_cur->dpms == WESTON_DPMS_OFF && |
|
|
|
} else if (output->state_cur->dpms == WESTON_DPMS_OFF && |
|
|
@ -1101,7 +1101,7 @@ drm_set_dpms(struct weston_output *output_base, enum dpms_enum level) |
|
|
|
* a repaint cycle. */ |
|
|
|
* a repaint cycle. */ |
|
|
|
if (level == WESTON_DPMS_ON) { |
|
|
|
if (level == WESTON_DPMS_ON) { |
|
|
|
if (output->dpms_off_pending) |
|
|
|
if (output->dpms_off_pending) |
|
|
|
output->dpms_off_pending = 0; |
|
|
|
output->dpms_off_pending = false; |
|
|
|
weston_output_schedule_repaint(output_base); |
|
|
|
weston_output_schedule_repaint(output_base); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@ -1109,7 +1109,7 @@ drm_set_dpms(struct weston_output *output_base, enum dpms_enum level) |
|
|
|
/* If we've already got a request in the pipeline, then we need to
|
|
|
|
/* If we've already got a request in the pipeline, then we need to
|
|
|
|
* park our DPMS request until that request has quiesced. */ |
|
|
|
* park our DPMS request until that request has quiesced. */ |
|
|
|
if (output->state_last) { |
|
|
|
if (output->state_last) { |
|
|
|
output->dpms_off_pending = 1; |
|
|
|
output->dpms_off_pending = true; |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1738,7 +1738,7 @@ drm_output_enable(struct weston_output *base) |
|
|
|
&output->cursor_plane->base, |
|
|
|
&output->cursor_plane->base, |
|
|
|
NULL); |
|
|
|
NULL); |
|
|
|
else |
|
|
|
else |
|
|
|
b->cursors_are_broken = 1; |
|
|
|
b->cursors_are_broken = true; |
|
|
|
|
|
|
|
|
|
|
|
weston_compositor_stack_plane(b->compositor, |
|
|
|
weston_compositor_stack_plane(b->compositor, |
|
|
|
&output->scanout_plane->base, |
|
|
|
&output->scanout_plane->base, |
|
|
@ -1798,7 +1798,7 @@ drm_output_destroy(struct weston_output *base) |
|
|
|
assert(!output->virtual); |
|
|
|
assert(!output->virtual); |
|
|
|
|
|
|
|
|
|
|
|
if (output->page_flip_pending || output->atomic_complete_pending) { |
|
|
|
if (output->page_flip_pending || output->atomic_complete_pending) { |
|
|
|
output->destroy_pending = 1; |
|
|
|
output->destroy_pending = true; |
|
|
|
weston_log("destroy output while page flip pending\n"); |
|
|
|
weston_log("destroy output while page flip pending\n"); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@ -1827,7 +1827,7 @@ drm_output_disable(struct weston_output *base) |
|
|
|
assert(!output->virtual); |
|
|
|
assert(!output->virtual); |
|
|
|
|
|
|
|
|
|
|
|
if (output->page_flip_pending || output->atomic_complete_pending) { |
|
|
|
if (output->page_flip_pending || output->atomic_complete_pending) { |
|
|
|
output->disable_pending = 1; |
|
|
|
output->disable_pending = true; |
|
|
|
return -1; |
|
|
|
return -1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1836,7 +1836,7 @@ drm_output_disable(struct weston_output *base) |
|
|
|
if (output->base.enabled) |
|
|
|
if (output->base.enabled) |
|
|
|
drm_output_deinit(&output->base); |
|
|
|
drm_output_deinit(&output->base); |
|
|
|
|
|
|
|
|
|
|
|
output->disable_pending = 0; |
|
|
|
output->disable_pending = false; |
|
|
|
|
|
|
|
|
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
@ -2156,8 +2156,8 @@ drm_output_create(struct weston_compositor *compositor, const char *name) |
|
|
|
output->base.attach_head = drm_output_attach_head; |
|
|
|
output->base.attach_head = drm_output_attach_head; |
|
|
|
output->base.detach_head = drm_output_detach_head; |
|
|
|
output->base.detach_head = drm_output_detach_head; |
|
|
|
|
|
|
|
|
|
|
|
output->destroy_pending = 0; |
|
|
|
output->destroy_pending = false; |
|
|
|
output->disable_pending = 0; |
|
|
|
output->disable_pending = false; |
|
|
|
|
|
|
|
|
|
|
|
output->state_cur = drm_output_state_alloc(output, NULL); |
|
|
|
output->state_cur = drm_output_state_alloc(output, NULL); |
|
|
|
|
|
|
|
|
|
|
@ -2662,12 +2662,12 @@ planes_binding(struct weston_keyboard *keyboard, const struct timespec *time, |
|
|
|
|
|
|
|
|
|
|
|
switch (key) { |
|
|
|
switch (key) { |
|
|
|
case KEY_C: |
|
|
|
case KEY_C: |
|
|
|
b->cursors_are_broken ^= 1; |
|
|
|
b->cursors_are_broken ^= true; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case KEY_V: |
|
|
|
case KEY_V: |
|
|
|
/* We don't support overlay-plane usage with legacy KMS. */ |
|
|
|
/* We don't support overlay-plane usage with legacy KMS. */ |
|
|
|
if (b->atomic_modeset) |
|
|
|
if (b->atomic_modeset) |
|
|
|
b->sprites_are_broken ^= 1; |
|
|
|
b->sprites_are_broken ^= true; |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
break; |
|
|
|
break; |
|
|
|