xf86-video-intel: src/i830_memory.c
Zhenyu Wang
zhen at kemper.freedesktop.org
Wed Mar 12 19:37:56 PDT 2008
src/i830_memory.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
New commits:
commit 1c0e4958564588162bc22a980567436dfc9d1e56
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date: Thu Mar 13 10:15:55 2008 +0800
Always bind memory after agp aperture allocation
This fixed the crash appearing for Xv buffer memory, which appears
allocation and free happening in stolen memory. We should always
try to bind for stolen memory for correct protect setup, otherwise
we might get fault that stolen memory protect reverted to non-r/w
after previous free and unbind.
Credit goes to Lukas Hejtmanek to identify the real problem of Xv
crash!
diff --git a/src/i830_memory.c b/src/i830_memory.c
index ec4d699..2cac26b 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -730,10 +730,6 @@ i830_allocate_agp_memory(ScrnInfoPtr pScrn, i830_memory *mem, int flags)
return FALSE;
}
- if (!i830_bind_memory(pScrn, mem)) {
- return FALSE;
- }
-
return TRUE;
}
@@ -853,6 +849,11 @@ i830_allocate_memory(ScrnInfoPtr pScrn, const char *name,
i830_free_memory(pScrn, mem);
return NULL;
}
+
+ if (!i830_bind_memory(pScrn, mem)) {
+ i830_free_memory(pScrn, mem);
+ return NULL;
+ }
}
mem->tiling = TILE_NONE;
More information about the xorg-commit
mailing list