diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h index 31eecccb..e50b4971 100644 --- a/include/libweston/libweston.h +++ b/include/libweston/libweston.h @@ -519,6 +519,8 @@ struct weston_output { enum weston_hdcp_protection current_protection; bool allow_protection; + struct weston_log_pacer repaint_delay_pacer; + int (*start_repaint_loop)(struct weston_output *output); int (*repaint)(struct weston_output *output, pixman_region32_t *damage); void (*destroy)(struct weston_output *output); diff --git a/libweston/compositor.c b/libweston/compositor.c index c7f1ce5b..b30bc29e 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -3308,12 +3308,11 @@ weston_output_finish_frame(struct weston_output *output, msec_rel = timespec_sub_to_msec(&output->next_repaint, &now); if (msec_rel < -1000 || msec_rel > 1000) { - static bool warned; - - if (!warned) - weston_log("Warning: computed repaint delay is " - "insane: %lld msec\n", (long long) msec_rel); - warned = true; + weston_log_paced(&output->repaint_delay_pacer, + 5, 60 * 60 * 1000, + "Warning: computed repaint delay for output " + "[%s] is abnormal: %lld msec\n", + output->name, (long long) msec_rel); output->next_repaint = now; }