summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2014-04-26 08:58:42 -0400
committerRob Clark <robdclark@gmail.com>2014-04-26 10:06:25 -0400
commitf71bfa9311a0d3c053159a5106ddde2582db88d0 (patch)
treece167038503c8506050eac05f51a7996451b32b7
parent43bc89afc5ae99d393ee2e4958952bd10f893923 (diff)
kms: fix crash with NoAccel
In that case, PrepareCopy will fail. Don't care about it too much, just go fallback path. Signed-off-by: Rob Clark <robdclark@gmail.com>
-rw-r--r--src/drmmode_display.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index fa5db68..28c824f 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -291,7 +291,12 @@ drmmode_fbcon_copy(ScreenPtr pScreen)
goto fallback;
}
- exa->PrepareCopy(fbcon_pix, scanout_pix, 0, 0, GXcopy, ~0);
+ /* we could use CopyArea() and get the normal sw fallbacks, but
+ * then we need to do things in terms of drawables and regions.
+ * So meh, we have XA, let's not worry too much about it.
+ */
+ if (!exa->PrepareCopy(fbcon_pix, scanout_pix, 0, 0, GXcopy, ~0))
+ goto fallback;
exa->Copy(scanout_pix, 0, 0, 0, 0, w, h);
exa->DoneCopy(scanout_pix);