mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-10-04 20:52:25 +00:00
libweston: Use paced logger for bad repaint delays
Ideally we'd like to see this more than just a single time, but we'd also like to prevent it from triggering endlessly. Let's also make this happen per output. While we're here, use the word "abnormal" instead of "insane" Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
8e661b3c93
commit
f9b57c5234
|
@ -519,6 +519,8 @@ struct weston_output {
|
||||||
enum weston_hdcp_protection current_protection;
|
enum weston_hdcp_protection current_protection;
|
||||||
bool allow_protection;
|
bool allow_protection;
|
||||||
|
|
||||||
|
struct weston_log_pacer repaint_delay_pacer;
|
||||||
|
|
||||||
int (*start_repaint_loop)(struct weston_output *output);
|
int (*start_repaint_loop)(struct weston_output *output);
|
||||||
int (*repaint)(struct weston_output *output, pixman_region32_t *damage);
|
int (*repaint)(struct weston_output *output, pixman_region32_t *damage);
|
||||||
void (*destroy)(struct weston_output *output);
|
void (*destroy)(struct weston_output *output);
|
||||||
|
|
|
@ -3308,12 +3308,11 @@ weston_output_finish_frame(struct weston_output *output,
|
||||||
msec_rel = timespec_sub_to_msec(&output->next_repaint, &now);
|
msec_rel = timespec_sub_to_msec(&output->next_repaint, &now);
|
||||||
|
|
||||||
if (msec_rel < -1000 || msec_rel > 1000) {
|
if (msec_rel < -1000 || msec_rel > 1000) {
|
||||||
static bool warned;
|
weston_log_paced(&output->repaint_delay_pacer,
|
||||||
|
5, 60 * 60 * 1000,
|
||||||
if (!warned)
|
"Warning: computed repaint delay for output "
|
||||||
weston_log("Warning: computed repaint delay is "
|
"[%s] is abnormal: %lld msec\n",
|
||||||
"insane: %lld msec\n", (long long) msec_rel);
|
output->name, (long long) msec_rel);
|
||||||
warned = true;
|
|
||||||
|
|
||||||
output->next_repaint = now;
|
output->next_repaint = now;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue