[xserver-commit] xserver/hw/kdrive/r128 r128.h,1.1,1.1.2.1 r128draw.c,1.2.2.2,1.2.2.3 r128stub.c,1.1.2.1,1.1.2.2
Eric Anholt
xserver-commit@pdx.freedesktop.org
Sun, 02 Nov 2003 01:27:38 -0800
Committed by: anholt
Update of /cvs/xserver/xserver/hw/kdrive/r128
In directory pdx:/home/anholt/xserver/hw/kdrive/r128
Modified Files:
Tag: xfixes_2_branch
r128.h r128draw.c r128stub.c
Log Message:
Fix fill/copyarea of r128 by setting the scissor registers
in setup, as XFree86 does on engine init. Add another PCI
ID to r128stub.c.
Index: r128.h
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/r128/r128.h,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -d -r1.1 -r1.1.2.1
--- r128.h 11 Oct 2003 19:36:13 -0000 1.1
+++ r128.h 2 Nov 2003 09:27:36 -0000 1.1.2.1
@@ -45,6 +45,10 @@
#define R128_REG_PC_NGUI_CTLSTAT 0x0184
#define R128_REG_DST_HEIGHT_WIDTH 0x143c
#define R128_REG_SRC_Y_X 0x1434
+#define R128_DEFAULT_SC_BOTTOM_RIGHT 0x16e8
+#define R128_AUX_SC_CNTL 0x1660
+#define R128_SC_TOP_LEFT 0x16ec
+#define R128_SC_BOTTOM_RIGHT 0x16f0
#define R128_GMC_DST_DATATYPE_SHIFT 8
#define R128_GMC_CLR_CMP_CNTL_DIS (1 << 28)
@@ -57,6 +61,8 @@
#define R128_GUI_ACTIVE (1 << 31)
#define R128_PC_BUSY (1 << 31)
#define R128_DP_SRC_SOURCE_MEMORY (2 << 24)
+#define R128_DEFAULT_SC_RIGHT_MAX (0x1fff << 0)
+#define R128_DEFAULT_SC_BOTTOM_MAX (0x1fff << 16)
typedef volatile CARD8 VOL8;
typedef volatile CARD16 VOL16;
Index: r128draw.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/r128/r128draw.c,v
retrieving revision 1.2.2.2
retrieving revision 1.2.2.3
diff -u -d -r1.2.2.2 -r1.2.2.3
--- r128draw.c 29 Oct 2003 16:26:43 -0000 1.2.2.2
+++ r128draw.c 2 Nov 2003 09:27:36 -0000 1.2.2.3
@@ -124,6 +124,15 @@
r128WaitAvail (2);
R128_OUT32 (mmio, R128_REG_DEFAULT_OFFSET, 0);
R128_OUT32 (mmio, R128_REG_DEFAULT_PITCH, r128s->pitch);
+
+ r128WaitAvail (4);
+ R128_OUT32 (mmio, R128_AUX_SC_CNTL, 0);
+ R128_OUT32 (mmio, R128_DEFAULT_SC_BOTTOM_RIGHT, (R128_DEFAULT_SC_RIGHT_MAX
+ | R128_DEFAULT_SC_BOTTOM_MAX));
+ R128_OUT32 (mmio, R128_SC_TOP_LEFT, 0);
+ R128_OUT32 (mmio, R128_SC_BOTTOM_RIGHT, (R128_DEFAULT_SC_RIGHT_MAX
+ | R128_DEFAULT_SC_BOTTOM_MAX));
+ r128WaitAvail (wait);
return TRUE;
}
Index: r128stub.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/r128/r128stub.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- r128stub.c 29 Oct 2003 16:26:43 -0000 1.1.2.1
+++ r128stub.c 2 Nov 2003 09:27:36 -0000 1.1.2.2
@@ -35,6 +35,8 @@
if (LinuxFindPci (0x1002, 0x4c46, 0, &attr))
KdCardInfoAdd (&r128Funcs, &attr, 0);
+ else if (LinuxFindPci (0x1002, 0x5046, 0, &attr))
+ KdCardInfoAdd (&r128Funcs, &attr, 0);
}
void