From 797a3f0c71c94477eec565ea2c95553c6f66d9fd Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 25 Nov 2009 10:07:59 +1000 Subject: kms: allow prepare copy to fail without dying --- src/drmmode_display.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/drmmode_display.c') 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); -- cgit v1.2.3