summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-11-25 10:07:59 +1000
committerDave Airlie <airlied@redhat.com>2009-11-25 10:07:59 +1000
commit797a3f0c71c94477eec565ea2c95553c6f66d9fd (patch)
tree5b5b8f7464ed4fa6737170515625f8a3058fa7de
parentba76acc76e0d0a51a1c488e4d5494a71e155a05b (diff)
kms: allow prepare copy to fail without dying
-rw-r--r--src/drmmode_display.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 31479812..6e54c8a6 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -204,6 +204,7 @@ void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
int crtc_id = 0;
int i;
int pitch = pScrn->displayWidth * info->CurrentLayout.pixel_bytes;
+ Bool ret;
if (info->accelOn == FALSE)
return;
@@ -228,8 +229,10 @@ void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
if (!dst)
goto out_free_src;
- info->accel_state->exa->PrepareCopy (src, dst,
- -1, -1, GXcopy, FB_ALLONES);
+ ret = info->accel_state->exa->PrepareCopy (src, dst,
+ -1, -1, GXcopy, FB_ALLONES);
+ if (!ret)
+ goto out_free_src;
info->accel_state->exa->Copy (dst, 0, 0, 0, 0,
pScrn->virtualX, pScrn->virtualY);
info->accel_state->exa->DoneCopy (dst);