xserver: Branch 'master'

Eric Anholt anholt at kemper.freedesktop.org
Wed Mar 7 02:21:47 EET 2007


 hw/xfree86/common/xf86fbman.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

New commits:
diff-tree 024bbc7cbb924daaf3e305ddfc8e74509acd1e15 (from 9d94c137596d3f9d9118ec70455b7a30b3582046)
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Mar 6 16:18:59 2007 -0800

    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.

diff --git a/hw/xfree86/common/xf86fbman.c b/hw/xfree86/common/xf86fbman.c
index d64cfae..537d53d 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;



More information about the xorg-commit mailing list