[xserver-commit] xserver/hw/kdrive/src kdrive.h,1.47,1.48 koffscreen.c,1.13,1.14
Eric Anholt
xserver-commit@pdx.freedesktop.org
Sat, 03 Jan 2004 03:17:46 -0800
Committed by: anholt
Update of /cvs/xserver/xserver/hw/kdrive/src
In directory pdx:/home/anholt/xserver/hw/kdrive/src
Modified Files:
kdrive.h koffscreen.c
Log Message:
Actually align the offset of allocated offscreen areas.
Index: kdrive.h
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/src/kdrive.h,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- kdrive.h 30 Dec 2003 08:23:56 -0000 1.47
+++ kdrive.h 3 Jan 2004 11:17:44 -0000 1.48
@@ -121,6 +121,7 @@
struct _KdOffscreenArea {
int offset;
+ int save_offset;
int size;
pointer privData;
Index: koffscreen.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/src/koffscreen.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- koffscreen.c 18 Nov 2003 18:38:47 -0000 1.13
+++ koffscreen.c 3 Jan 2004 11:17:44 -0000 1.14
@@ -195,7 +195,10 @@
area->state = KdOffscreenRemovable;
area->privData = privData;
area->save = save;
-
+
+ area->save_offset = area->offset;
+ area->offset = (area->offset + align - 1) & ~(align - 1);
+
KdOffscreenValidate (pScreen);
DBG_OFFSCREEN (("Alloc 0x%x -> 0x%x\n", size, area->offset));
@@ -260,6 +263,7 @@
area->state = KdOffscreenAvail;
area->save = 0;
+ area->offset = area->save_offset;
/*
* Find previous area