Re: [PATCH xserver 1/2] xf86-video-modesetting: Add ms_queue_vblank helper

2018-04-15 Thread Chris Wilson
Quoting Keith Packard (2017-09-29 07:20:46) > This provides an API wrapper around the kernel interface for queueing > a vblank event, simplifying all of the callers. > > Signed-off-by: Keith Packard > --- > diff --git a/hw/xfree86/drivers/modesetting/dri2.c >

[PATCH xserver 3/3] os/WaitFor: Use the simpler xorg_list_for_each_entry()

2018-04-15 Thread Chris Wilson
As we are not freeing elements while iterating the list of timers, we can forgo using the safe variant, and reduce the number of pointer dances required for the insertion sort. Signed-off-by: Chris Wilson --- os/WaitFor.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH xserver 2/3] os/WaitFor: Use xorg_list_append()

2018-04-15 Thread Chris Wilson
Currently, we use xorg_list_add(new, head->prev) which is functionaly equivalent to xorg_list_append(), but with more pointer chasing, so reduce the strain on the reader and compiler by using the simpler append(). Signed-off-by: Chris Wilson --- os/WaitFor.c | 2 +- 1

[PATCH xserver 1/3] os/WaitFor: Check timers on every iteration

2018-04-15 Thread Chris Wilson
Currently we only check timer expiry if there are no client fd (or other input) waiting to be serviced. This makes it very easy to starve the timers with long request queues, and so miss critical timestamps. The timer subsystem is just another input waiting to be serviced, so evaluate it on every