[PATCH 2/2] shm: Expose SHM segments to backends

2015-02-14 Thread Chris Wilson
For drivers that can map system memory into their video memory, the overhead in utilizing SHM memory directly is in the cost of creating that mapping. SHM segments are typically much longer lived than either the Pixmap or Image created within them, and so exposing those for the driver to map

[PATCH 1/2] shm: Fix use-after-free in ShmDestroyPixmap

2015-02-14 Thread Chris Wilson
We pass the pPixmap-drawable.id to the ShmDetachSegment function after the pPixmap is freed. Fortunately, we don't use the value inside ShmDetachSegment and can simply pass zero instead. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- Xext/shm.c | 4 ++-- 1 file changed, 2

Re: [PATCH 1/2] shm: Fix use-after-free in ShmDestroyPixmap

2015-02-14 Thread Michel Dänzer
On 14.02.2015 19:36, Chris Wilson wrote: We pass the pPixmap-drawable.id to the ShmDetachSegment function after the pPixmap is freed. Fortunately, we don't use the value inside ShmDetachSegment and can simply pass zero instead. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk ---

[PATCH 2/2] present: Fix presentation of flips out of order

2015-02-14 Thread Chris Wilson
The flip queue currently only holds events submitted to the driver for flipping, awaiting the completion notifier. It is short. We therefore can speed up interrupt processing by keeping the small number of events ready to be flipped on the end of the flip queue. By appending the events to the

[PATCH 1/2] present: Improve scaling of vblank handler

2015-02-14 Thread Chris Wilson
With large numbers of queued vblank, the list iteration on every interupt dominates processing time. If we reorder the list to be in ascending event order, then not only is also likely to be in order for notification queries (i.e. the notification will be near the start of the list), we can also

Re: [PATCH libpciaccess 5/5] linux: Remove no longer needed _GNU_SOURCE define.

2015-02-14 Thread Emil Velikov
On 12/02/15 22:14, Alan Coopersmith wrote: On 02/10/15 06:55 AM, Emil Velikov wrote: With earlier commit we're including config.h before the system headers. As such we no longer require the extra define as it is handled/set via AC_USE_SYSTEM_EXTENSIONS. Note platforms which do not use

Re: [PATCH 1/2] shm: Fix use-after-free in ShmDestroyPixmap

2015-02-14 Thread Chris Wilson
On Sat, Feb 14, 2015 at 08:33:18PM +0900, Michel Dänzer wrote: On 14.02.2015 19:36, Chris Wilson wrote: /*ARGSUSED*/ static int ShmDetachSegment(void *value, /* must conform to DeleteType */ - XID shmseg) + XID unused) { ShmDescPtr shmdesc =