[PATCH] wayland: Destroy frame callback when destroying surface

2012-10-27 Thread Jonas Ådahl
If a frame callback is not destroyed when destroying a surface, its handler function will be invoked if the surface was destroyed after the callback was requested but before it was invoked, causing a write on free:ed memory. This can happen if eglDestroySurface() is called shortly after eglSwapBuf

[PATCH wayland] client: Check that the proxy object exists before invoking closure

2012-10-27 Thread Jonas Ådahl
Even when a closure got queued in the queue of a proxy, the proxy object can be destroyed during a closure invoke earlier in the queue. Therefore check that the proxy object still exists before invoking a closure. Signed-off-by: Jonas Ådahl --- Hi, I've been seeing crashes in dispatch_event() w

Re: [PATCH weston 1/2] pci: add PCI helpers to detect primary GPUs

2012-10-27 Thread David Herrmann
Hi Sannu On Sat, Oct 27, 2012 at 8:38 PM, Sannu K wrote: > On Sat, Oct 27, 2012 at 6:24 PM, David Herrmann > wrote: >> This adds one global helper which returns a string describing the primary >> PCI GPU. This string can later be used to compare with drmGetBusid() to >> check whether a given DRM

Re: [PATCH weston 1/2] pci: add PCI helpers to detect primary GPUs

2012-10-27 Thread Sannu K
On Sat, Oct 27, 2012 at 6:24 PM, David Herrmann wrote: > This adds one global helper which returns a string describing the primary > PCI GPU. This string can later be used to compare with drmGetBusid() to > check whether a given DRM GPU is the primary GPU. What do you mean by the term "Primary GP

[PATCH v3 2/2] Move EGLConfig, EGLContext and EGLDisplay fields into gles2-renderer.

2012-10-27 Thread John Kåre Alsaker
--- src/compositor-android.c | 56 ++- src/compositor-drm.c | 38 ++ src/compositor-wayland.c | 46 ++-- src/compositor-x11.c | 57 ++- src/compositor.h | 9 ++- src/gles2-renderer.c | 181 +--

[PATCH v3 1/2] Move weston_output EGL state into gles2-renderer.

2012-10-27 Thread John Kåre Alsaker
--- src/compositor-android.c | 21 ++--- src/compositor-drm.c | 61 ++ src/compositor-wayland.c | 21 ++--- src/compositor-x11.c | 18 +-- src/compositor.h | 16 -- src/gles2-renderer.c | 77 +++

[PATCH weston 2/2] compositor-drm: prefer primary GPU over other GPUs

2012-10-27 Thread David Herrmann
This rewrites the GPU detection of the DRM backend and uses the new PCI helpers to find the primary GPU. If no primary GPU is found, the first GPU on the seat is used. This is useful for systems with multiple GPUs that share display-controllers. We want to use the boot/primary GPU instead of possi

[PATCH weston 1/2] pci: add PCI helpers to detect primary GPUs

2012-10-27 Thread David Herrmann
This adds one global helper which returns a string describing the primary PCI GPU. This string can later be used to compare with drmGetBusid() to check whether a given DRM GPU is the primary GPU. This layer is disabled if weston is compiled without libpciaccess. The heuristics are very similar to