summaryrefslogtreecommitdiff
path: root/linux/mga_state.c
diff options
context:
space:
mode:
authorGareth Hughes <gareth@users.sourceforge.net>2001-03-19 11:49:25 +0000
committerGareth Hughes <gareth@users.sourceforge.net>2001-03-19 11:49:25 +0000
commitd15f98443295feeb4e3bd65b26f43c73d655e26e (patch)
treebf652dafc1e4c696c5278a945dcf612b5ec67688 /linux/mga_state.c
parentf2ad4d9bebd052e5b7c9a90c4a813830bd1b72f8 (diff)
Try this...
Diffstat (limited to 'linux/mga_state.c')
-rw-r--r--linux/mga_state.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/linux/mga_state.c b/linux/mga_state.c
index 1e1c2827..4c9c9c05 100644
--- a/linux/mga_state.c
+++ b/linux/mga_state.c
@@ -514,6 +514,9 @@ static void mga_dma_dispatch_clear( drm_device_t *dev,
drm_clip_rect_t *box = &pbox[i];
u32 height = box->y2 - box->y1;
+ DRM_DEBUG( " from=%d,%d to=%d,%d\n",
+ box->x1, box->y1, box->x2, box->y2 );
+
if ( clear->flags & MGA_FRONT ) {
BEGIN_DMA( 2 );
@@ -591,9 +594,16 @@ static void mga_dma_dispatch_swap( drm_device_t *dev )
int i;
DMA_LOCALS;
DRM_DEBUG( __FUNCTION__ ":\n" );
- DRM_DEBUG( " head = 0x%06x\n", MGA_READ( MGA_PRIMADDRESS ) );
- BEGIN_DMA( 3 + nbox );
+ sarea_priv->last_frame.head = dev_priv->prim.tail;
+ sarea_priv->last_frame.wrap = dev_priv->prim.last_wrap;
+
+ BEGIN_DMA( 4 + nbox );
+
+ DMA_BLOCK( MGA_DMAPAD, 0x00000000,
+ MGA_DMAPAD, 0x00000000,
+ MGA_DWGSYNC, 0x00007100,
+ MGA_DWGSYNC, 0x00007000 );
DMA_BLOCK( MGA_DSTORG, dev_priv->front_offset,
MGA_MACCESS, dev_priv->maccess,
@@ -610,6 +620,9 @@ static void mga_dma_dispatch_swap( drm_device_t *dev )
u32 height = box->y2 - box->y1;
u32 start = box->y1 * dev_priv->front_pitch;
+ DRM_DEBUG( " from=%d,%d to=%d,%d\n",
+ box->x1, box->y1, box->x2, box->y2 );
+
DMA_BLOCK( MGA_AR0, start + box->x2 - 1,
MGA_AR3, start + box->x1,
MGA_FXBNDRY, ((box->x2 - 1) << 16) | box->x1,
@@ -624,12 +637,6 @@ static void mga_dma_dispatch_swap( drm_device_t *dev )
ADVANCE_DMA();
- DRM_DEBUG( " tail = 0x%06x\n", dev_priv->prim.tail );
- DRM_DEBUG( " wrap = 0x%06x\n", dev_priv->prim.last_wrap );
-
- sarea_priv->last_frame.head = dev_priv->prim.tail;
- sarea_priv->last_frame.wrap = dev_priv->prim.last_wrap;
-
FLUSH_DMA();
DRM_DEBUG( "%s... done.\n", __FUNCTION__ );