Commit e3e6fa3e authored by Eric Anholt's avatar Eric Anholt
Browse files

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.
parent fe28039f
......@@ -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;
......
......@@ -124,6 +124,15 @@ r128Setup (ScreenPtr pScreen, int wait)
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;
}
......
......@@ -35,6 +35,8 @@ InitCard (char *name)
if (LinuxFindPci (0x1002, 0x4c46, 0, &attr))
KdCardInfoAdd (&r128Funcs, &attr, 0);
else if (LinuxFindPci (0x1002, 0x5046, 0, &attr))
KdCardInfoAdd (&r128Funcs, &attr, 0);
}
void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment