summaryrefslogtreecommitdiff
path: root/linux/mga_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/mga_state.c')
-rw-r--r--linux/mga_state.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/linux/mga_state.c b/linux/mga_state.c
index dc2c8c30..1e1c2827 100644
--- a/linux/mga_state.c
+++ b/linux/mga_state.c
@@ -591,20 +591,9 @@ static void mga_dma_dispatch_swap( drm_device_t *dev )
int i;
DMA_LOCALS;
DRM_DEBUG( __FUNCTION__ ":\n" );
- DRM_DEBUG( " head = 0x%06x\n", *dev_priv->prim.head );
+ DRM_DEBUG( " head = 0x%06x\n", MGA_READ( MGA_PRIMADDRESS ) );
- sarea_priv->last_frame.head = dev_priv->prim.tail;
- sarea_priv->last_frame.wrap = dev_priv->prim.last_wrap;
-
- DRM_DEBUG( " tail = 0x%06x\n", dev_priv->prim.tail );
- DRM_DEBUG( " wrap = 0x%06x\n", dev_priv->prim.last_wrap );
-
- BEGIN_DMA( 4 + nbox );
-
- DMA_BLOCK( MGA_DMAPAD, 0x00000000,
- MGA_DMAPAD, 0x00000000,
- MGA_DWGSYNC, 0x00007100,
- MGA_DWGSYNC, 0x00007000 );
+ BEGIN_DMA( 3 + nbox );
DMA_BLOCK( MGA_DSTORG, dev_priv->front_offset,
MGA_MACCESS, dev_priv->maccess,
@@ -635,6 +624,12 @@ 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__ );