[PATCH weston 1/2] compositor-drm: skip overlay for shm buffers

Rob Clark rob.clark at linaro.org
Thu Aug 9 12:18:27 PDT 2012


From: Rob Clark <rob at ti.com>

They can't be imported by gbm, so no point in trying, and segfaulting
in gbm when we try to import (because it tries to deref the buffer as
a wl_drm_buffer).

Signed-off-by: Rob Clark <rob at ti.com>
---
 src/compositor-drm.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index ad2c385..d6e6c98 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -566,6 +566,9 @@ drm_output_prepare_overlay_surface(struct weston_output *output_base,
 	if (es->buffer == NULL)
 		return -1;
 
+	if (wl_buffer_is_shm(es->buffer))
+		return -1;
+
 	if (!drm_surface_transform_supported(es))
 		return -1;
 
-- 
1.7.9.5



More information about the wayland-devel mailing list