[PATCH weston 2/2] compositor-drm: Fix inconsistency in finish frame timestamps

Pekka Paalanen ppaalanen at gmail.com
Fri Feb 15 00:27:12 PST 2013


On Thu, 14 Feb 2013 11:51:15 -0500
Kristian Høgsberg <hoegsberg at gmail.com> wrote:

> On Wed, Feb 13, 2013 at 04:06:38PM +0200, Ander Conselvan de Oliveira wrote:
> > The page flip event timestamps comes from the monotonic clock, while
> > idle_repaint() gets the time with gettimeofday(). That leads to
> > inconsistent timestamps on the frame callbacks.
> > 
> > Fix this by making the drm backend page flip to the current buffer and
> > call weston_output_finish_frame() with the page flip event timestamp,
> > instead of using gettimeofday().
> 
> Yup, this looks right, but I think we need to require that all
> backends provide a start_repaint_loop function.  Only the backend
> knows what kind of timestamp comes back in finish_frame, so we can't
> assume gttimeofday() as a fallback.  compositor-wayland.c uses the
> frame callback timestamp, for example, and if the host weston is
> running on KMS, that's a monotonic timestamp from the underlying
> pageflip event.

Hi,

while you are making the timestamps consistent, could also make them,
err... correct?

I think the current code in weston_output_repaint() is sending out the
frame callbacks at the moment the rendering has been started, not when
when it has hit the screen. Do you agree?


Thanks,
pq


More information about the wayland-devel mailing list