u/[rt|ft]: Adjust margins

This commit adds more margins to both the app and the compositor, with the
compute work this yeilds basically no frame misses for the compositor.
This commit is contained in:
Jakob Bornecrantz 2021-04-21 17:45:42 +01:00
parent dda80836c6
commit 608bb987d9
2 changed files with 2 additions and 2 deletions

View file

@ -611,7 +611,7 @@ u_ft_display_timing_create(uint64_t estimated_frame_period_ns, struct u_frame_ti
// When not missing frames but adjusting app time at these increments
dt->adjust_non_miss_ns = get_percent_of_time(estimated_frame_period_ns, 2);
// Extra margin that is added to app time.
dt->margin_ns = get_percent_of_time(estimated_frame_period_ns, 8);
dt->margin_ns = U_TIME_1MS_IN_NS;
*out_uft = &dt->base;

View file

@ -413,7 +413,7 @@ u_rt_create(struct u_render_timing **out_urt)
rt->base.destroy = rt_destroy;
rt->app.cpu_time_ns = U_TIME_1MS_IN_NS * 2;
rt->app.draw_time_ns = U_TIME_1MS_IN_NS * 2;
rt->app.margin_ns = U_TIME_1MS_IN_NS / 2;
rt->app.margin_ns = U_TIME_1MS_IN_NS * 2;
for (size_t i = 0; i < ARRAY_SIZE(rt->frames); i++) {
rt->frames[i].state = U_RT_READY;