xf86-video-intel: 2 commits - src/uxa/i915_video.c src/uxa/intel_uxa.c

Chris Wilson ickle at kemper.freedesktop.org
Sun Oct 13 02:40:29 PDT 2013


 src/uxa/i915_video.c |    5 +++++
 src/uxa/intel_uxa.c  |    3 +++
 2 files changed, 8 insertions(+)

New commits:
commit f9a18c9f38d09c145eb513ca989966dc135c1e9b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Oct 13 10:36:35 2013 +0100

    uxa: Check for allocation failure in i915 video
    
    For a large screen, we have to create a temporary surface for rendering
    the textured video. If this pixmap creation fails we may be left with a
    system memory only pixmap leading to a segfault.
    
    Reported-by: Bas Wijnen <wijnen at debian.org>
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/uxa/i915_video.c b/src/uxa/i915_video.c
index f6a1c6e..16389cd 100644
--- a/src/uxa/i915_video.c
+++ b/src/uxa/i915_video.c
@@ -78,6 +78,11 @@ I915DisplayVideoTextured(ScrnInfoPtr scrn,
 		if (target == NULL)
 			return;
 
+		if (intel_get_pixmap_bo(target) == NULL) {
+			screen->DestroyPixmap(target);
+			return;
+		}
+
 		pix_xoff = -dxo;
 		pix_yoff = -dyo;
 	} else {
commit 978b93a20bb2ba647138d0d8954fac60b215f7c6
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Oct 13 10:34:50 2013 +0100

    uxa: Abort CreateScreenResources after allocation failure
    
    One of UXA's invarients is that the ScreenPixmap is complete (i.e. has
    an intel_pixmap private with a bo attached). If we fail to create that
    private during CreateScreenResources we will die very soon afterwards,
    so just report the failure and shutdown gracefully.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/uxa/intel_uxa.c b/src/uxa/intel_uxa.c
index 0b6591a..6fb1333 100644
--- a/src/uxa/intel_uxa.c
+++ b/src/uxa/intel_uxa.c
@@ -1159,6 +1159,9 @@ Bool intel_uxa_create_screen_resources(ScreenPtr screen)
 
 	pixmap = screen->GetScreenPixmap(screen);
 	intel_set_pixmap_bo(pixmap, bo);
+	if (intel_get_pixmap_private(pixmap) == NULL)
+		return FALSE;
+
 	intel_get_pixmap_private(pixmap)->pinned |= PIN_SCANOUT;
 	screen->ModifyPixmapHeader(pixmap,
 				   scrn->virtualX,


More information about the xorg-commit mailing list