mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-09 07:08:07 +02:00
drm: Count outstanding atomic completions
This is preparation for synchronizing invalid state rebuilding in a future commit. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
b28e6f8836
commit
36f73f67c7
2 changed files with 6 additions and 0 deletions
|
|
@ -196,6 +196,8 @@ struct drm_device {
|
|||
|
||||
bool state_invalid;
|
||||
|
||||
int32_t atomic_completes_pending;
|
||||
|
||||
bool atomic_modeset;
|
||||
|
||||
bool tearing_supported;
|
||||
|
|
|
|||
|
|
@ -736,6 +736,7 @@ drm_output_assign_state(struct drm_output_state *state,
|
|||
drm_debug(b, "\t[CRTC:%u] setting pending flip\n",
|
||||
output->crtc->crtc_id);
|
||||
output->atomic_complete_pending = true;
|
||||
device->atomic_completes_pending++;
|
||||
}
|
||||
|
||||
if (device->atomic_modeset &&
|
||||
|
|
@ -1925,6 +1926,9 @@ atomic_flip_handler(int fd, unsigned int frame, unsigned int sec,
|
|||
drm_debug(b, "[atomic][CRTC:%u] flip processing completed\n", crtc_id);
|
||||
drm_debug(b, "[atomic][CRTC:%u] %.2f page flips computed in %d seconds\n",
|
||||
crtc_id, page_flips_per_timer_interval, frame_counter_interval);
|
||||
|
||||
assert(device->atomic_completes_pending > 0);
|
||||
device->atomic_completes_pending--;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue