diff options
-rw-r--r-- | hw/kdrive/r128/r128.h | 6 | ||||
-rw-r--r-- | hw/kdrive/r128/r128draw.c | 9 | ||||
-rw-r--r-- | hw/kdrive/r128/r128stub.c | 2 |
3 files changed, 17 insertions, 0 deletions
diff --git a/hw/kdrive/r128/r128.h b/hw/kdrive/r128/r128.h index 06b3d0286..8cf2bd4e2 100644 --- a/hw/kdrive/r128/r128.h +++ b/hw/kdrive/r128/r128.h @@ -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; diff --git a/hw/kdrive/r128/r128draw.c b/hw/kdrive/r128/r128draw.c index 092f8e272..be4dc79ae 100644 --- a/hw/kdrive/r128/r128draw.c +++ b/hw/kdrive/r128/r128draw.c @@ -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; } diff --git a/hw/kdrive/r128/r128stub.c b/hw/kdrive/r128/r128stub.c index 674625f93..30dc32c66 100644 --- a/hw/kdrive/r128/r128stub.c +++ b/hw/kdrive/r128/r128stub.c @@ -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 |