xf86-video-intel: Branch 'intel-batchbuffer' - src/i830_memory.c
Dave Airlie
airlied at kemper.freedesktop.org
Fri Mar 7 00:15:18 PST 2008
src/i830_memory.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
New commits:
commit cccceab77882042448ddc615b7a686dd92e3ccd3
Author: Dave Airlie <airlied at redhat.com>
Date: Fri Mar 7 17:41:28 2008 +1100
validate buffers into TTM space only.
If we validate into both VRAM and TTM here, then later one we emit a relocation
to only one of the memory types (i.e. TTM) the memory manager seems to lose
the plot and keep allocating memory blocks in the TTM space even though the
buffer is already there.
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 634a796..1610e2f 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -165,13 +165,17 @@ i830_bind_memory(ScrnInfoPtr pScrn, i830_memory *mem)
if (mem->bo.size != 0) {
I830Ptr pI830 = I830PTR(pScrn);
int ret;
+ int flags = DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE;
+
+ if (mem->need_vram)
+ flags |= DRM_BO_FLAG_MEM_VRAM;
+ else
+ flags |= DRM_BO_FLAG_MEM_TT;
+
+ flags |= DRM_BO_FLAG_NO_EVICT;
ret = drmBOSetStatus(pI830->drmSubFD, &mem->bo,
- DRM_BO_FLAG_MEM_VRAM |
- DRM_BO_FLAG_MEM_TT |
- DRM_BO_FLAG_READ |
- DRM_BO_FLAG_WRITE |
- DRM_BO_FLAG_NO_EVICT,
+ flags,
DRM_BO_MASK_MEM |
DRM_BO_FLAG_READ |
DRM_BO_FLAG_WRITE |
More information about the xorg-commit
mailing list