diff options
author | Eric Anholt <eric@anholt.net> | 2007-02-23 13:16:02 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-02-23 13:18:50 -0800 |
commit | 828deff6453872ef0f9fa35c08c9f95f464b1785 (patch) | |
tree | e8b70d95268436c1db99848d97653d923f3386b1 | |
parent | d3ac440e127c8a7716062852cd3b5e7943e289e4 (diff) |
Fix fence allocations on 965.
-rw-r--r-- | src/i830_memory.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/i830_memory.c b/src/i830_memory.c index 93429fba..c88261ec 100644 --- a/src/i830_memory.c +++ b/src/i830_memory.c @@ -241,6 +241,10 @@ i830_reset_allocations(ScrnInfoPtr pScrn) pI830->textures = NULL; pI830->memory_manager = NULL; pI830->LpRing->mem = NULL; + + /* Reset the fence register allocation. */ + pI830->next_fence = 0; + memset(pI830->fence, 0, sizeof(pI830->fence)); } /** @@ -1278,8 +1282,8 @@ i830_set_fence(ScrnInfoPtr pScrn, int nr, unsigned int offset, break; } - /* XXX Is it the next page, or the last page of the fenced region? */ - pI830->fence[FENCE_NEW_NR + nr] = offset + size; + /* The end marker is the address of the last page in the allocation. */ + pI830->fence[FENCE_NEW_NR + nr] = offset + size - 4096; return; } |