From 2bbe222883087201db15e5dd052e6380dfbd946b Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Tue, 7 Oct 2025 13:49:31 -0500 Subject: [PATCH] compositor: Improve timing information in scene graph dump After moving the drm-backend's scene graph dump, it now always occurs when repaint_status is REPAINT_AWAITING_COMPLETION, which loses useful timing information we used to have. Add timing information for the REPAINT_AWAITING_COMPLETION state, and also add the expected presentation time. Signed-off-by: Derek Foreman --- libweston/compositor.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/libweston/compositor.c b/libweston/compositor.c index 80e06ffa0..14f640354 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -9560,11 +9560,21 @@ weston_compositor_print_scene_graph(struct weston_compositor *ec) fprintf(fp, "\trepaint status: %s\n", output_repaint_status_text(output)); - if (output->repaint_status == REPAINT_SCHEDULED) - fprintf(fp, "\tnext repaint: %" PRId64 ".%09ld\n", + if (output->repaint_status == REPAINT_SCHEDULED) { + fprintf(fp, "\tnext repaint scheduled for: %" PRId64 ".%09ld\n", (int64_t)output->next_repaint.tv_sec, output->next_repaint.tv_nsec); - + fprintf(fp, "\tto be presented at: %" PRId64 ".%09ld\n", + (int64_t)output->next_present.tv_sec, + output->next_present.tv_nsec); + } else if (output->repaint_status == REPAINT_AWAITING_COMPLETION) { + fprintf(fp, "\twaiting for repaint that occurred at: %" PRId64 ".%09ld\n", + (int64_t)output->next_repaint.tv_sec, + output->next_repaint.tv_nsec); + fprintf(fp, "\tto be presented at: %" PRId64 ".%09ld\n", + (int64_t)output->next_present.tv_sec, + output->next_present.tv_nsec); + } wl_list_for_each(head, &output->head_list, output_link) { fprintf(fp, "\tHead %d (%s): %sconnected\n", head_idx++, head->name,