summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2005-01-25 06:04:21 +0000
committerKeith Packard <keithp@keithp.com>2005-01-25 06:04:21 +0000
commit8813898ef6b9eb470e079bcdcffa89d1243b63b9 (patch)
tree37f880c7ca750870bb8d4062d7d67241a3099494
parent33155b4fd3ce025d555f07833f96b760d5cdfbd3 (diff)
Fix R100 text by forcing the 3d engine to idle before executing more 3d
commands. Add docs for the ISYNC_CNTL register, which doesn't quite do what we want.
-rw-r--r--hw/kdrive/ati/ati_draw.c3
-rw-r--r--hw/kdrive/ati/ati_reg.h4
2 files changed, 6 insertions, 1 deletions
diff --git a/hw/kdrive/ati/ati_draw.c b/hw/kdrive/ati/ati_draw.c
index ead133b58..a47dc8973 100644
--- a/hw/kdrive/ati/ati_draw.c
+++ b/hw/kdrive/ati/ati_draw.c
@@ -214,8 +214,9 @@ RadeonSwitchTo3D(ATIScreenInfo *atis)
ENTER_DRAW(0);
BEGIN_DMA(4);
OUT_REG(RADEON_REG_RB3D_DSTCACHE_CTLSTAT, RADEON_RB3D_DC_FLUSH);
+ /* We must wait for 3d to idle, in case source was just written as a dest. */
OUT_REG(ATI_REG_WAIT_UNTIL,
- RADEON_WAIT_HOST_IDLECLEAN | RADEON_WAIT_2D_IDLECLEAN);
+ RADEON_WAIT_HOST_IDLECLEAN | RADEON_WAIT_2D_IDLECLEAN | RADEON_WAIT_3D_IDLECLEAN);
END_DMA();
LEAVE_DRAW(0);
}
diff --git a/hw/kdrive/ati/ati_reg.h b/hw/kdrive/ati/ati_reg.h
index 2b38bbee2..17b5db360 100644
--- a/hw/kdrive/ati/ati_reg.h
+++ b/hw/kdrive/ati/ati_reg.h
@@ -416,6 +416,10 @@
# define RADEON_WAIT_BOTH_CRTC_PFLIP (1 << 30)
# define RADEON_ENG_DISPLAY_SELECT (1 << 31)
+#define RADEON_REG_ISYNC_CNTL 0x1724
+#define ISYNC_ANY2D_IDLE3D 0x1
+#define ISYNC_ANY3D_IDLE2D 0x2
+
#define R128_REG_GUI_STAT 0x1740
# define R128_GUI_ACTIVE (1 << 31)