summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-03-06 16:18:59 -0800
committerEric Anholt <eric@anholt.net>2007-03-06 16:20:34 -0800
commit024bbc7cbb924daaf3e305ddfc8e74509acd1e15 (patch)
treec158acacc4b804a5e384d1f83d5600671774f4ed
parent9d94c137596d3f9d9118ec70455b7a30b3582046 (diff)
Bug #9931: Fix linear allocations with a non-1-byte granularity.
This was introduced in 83080809f9a1c1d24b0318e54632f25f5940da25. Instead of aligning the offset, it doubled it. Results were appropriately spectacular.
-rw-r--r--hw/xfree86/common/xf86fbman.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/common/xf86fbman.c b/hw/xfree86/common/xf86fbman.c
index d64cfaee4..537d53d7d 100644
--- a/hw/xfree86/common/xf86fbman.c
+++ b/hw/xfree86/common/xf86fbman.c
@@ -968,7 +968,7 @@ localAllocateOffscreenLinear(
linear->size = h * w;
linear->offset = (pitch * area->box.y1) + area->box.x1;
if (gran > 1)
- linear->offset += ((linear->offset + gran - 1) / gran) * gran;
+ linear->offset = ((linear->offset + gran - 1) / gran) * gran;
linear->granularity = gran;
linear->MoveLinearCallback = moveCB;
linear->RemoveLinearCallback = removeCB;