diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-15 18:18:19 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-15 18:19:18 +0000 |
commit | 19c184b7e4f8de747ed6fb1f6f910238193cf2a1 (patch) | |
tree | 4ca4c4e94aeed0fd9d3b379c3a384295e5285d1b /src/sna/sna_video_textured.c | |
parent | e68a8748f3418179eb41e8d81ba1050b883b7e47 (diff) |
sna/gen3: Check for upload failure of video bo
And propagate that failure back to the client.
Reported-by: Paul Neumann <paul104x@yahoo.de>
References: https://bugs.freedesktop.org/show_bug.cgi?id=43716
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_video_textured.c')
-rw-r--r-- | src/sna/sna_video_textured.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/sna/sna_video_textured.c b/src/sna/sna_video_textured.c index 8531fc6b..ba0e146c 100644 --- a/src/sna/sna_video_textured.c +++ b/src/sna/sna_video_textured.c @@ -227,6 +227,7 @@ sna_video_textured_put_image(ScrnInfoPtr scrn, BoxRec dstBox; xf86CrtcPtr crtc; Bool flush = false; + Bool ret; if (!sna_pixmap(pixmap)) return BadAlloc; @@ -265,10 +266,12 @@ sna_video_textured_put_image(ScrnInfoPtr scrn, flush = sna_wait_for_scanline(sna, pixmap, crtc, &clip->extents); - sna->render.video(sna, video, &frame, clip, - src_w, src_h, - drw_w, drw_h, - pixmap); + ret = Success; + if (!sna->render.video(sna, video, &frame, clip, + src_w, src_h, + drw_w, drw_h, + pixmap)) + ret = BadAlloc; kgem_bo_destroy(&sna->kgem, frame.bo); @@ -280,7 +283,7 @@ sna_video_textured_put_image(ScrnInfoPtr scrn, if (flush) kgem_submit(&sna->kgem); - return Success; + return ret; } static int |