From 9770954095789d2d4e21d0e1e85d2947f544b1f2 Mon Sep 17 00:00:00 2001 From: Thomas Hellström Date: Wed, 6 Dec 2006 13:01:55 +0000 Subject: Cause a "FatalError" if EXA is used with an un-patched Xserver, and an illegal save locked memory action is requested. --- ChangeLog | 7 +++++++ unichrome/via_memory.c | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/ChangeLog b/ChangeLog index 96dfe59..1726807 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-12-06 Thomas Hellstrom + + * unichrome/via_memory.c: (viaExaFBSave), (viaOffScreenLinear): + + Cause a "FatalError" if EXA is used with an un-patched Xserver, + and an illegal save locked memory action is requested. + 2006-12-06 Thomas Hellstrom * unichrome/via_driver.c: (VIAInitialize3DEngine): diff --git a/unichrome/via_memory.c b/unichrome/via_memory.c index 7e626ba..63206d3 100644 --- a/unichrome/via_memory.c +++ b/unichrome/via_memory.c @@ -52,6 +52,15 @@ * 2 - DRM */ +static void +viaExaFBSave(ScreenPtr pScreen, ExaOffscreenArea *exa) +{ + FatalError("Xserver is not properly patched and incompatible with OpenChrome exa.\n" + "\tPlease look at Xorg bugzilla bug #7639, and\n" + "\thttp://wiki.openchrome.org/tikiwiki/tiki-index.php?page=EXAAcceleration .\n"); +} + + void VIAFreeLinear(VIAMemPtr mem) { DEBUG(ErrorF("Freed %lu (pool %d)\n", mem->base, mem->pool)); @@ -100,6 +109,7 @@ viaOffScreenLinear(VIAMemPtr mem, ScrnInfoPtr pScrn, 32, TRUE, NULL,NULL); if (mem->exa == NULL) return BadAlloc; + mem->exa->save = viaExaFBSave; mem->base = mem->exa->offset; mem->pool = 1; mem->pScrn = pScrn; -- cgit v1.2.3