summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-10-13 10:34:50 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-10-13 10:40:21 +0100
commit978b93a20bb2ba647138d0d8954fac60b215f7c6 (patch)
treee25c394bf5b4916ba80ad20fe2c9294cb401b7f5
parente914dada5595a24b5d0fada7e476cc93570fa7c5 (diff)
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@chris-wilson.co.uk>
-rw-r--r--src/uxa/intel_uxa.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/uxa/intel_uxa.c b/src/uxa/intel_uxa.c
index 0b6591af..6fb1333f 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,