From 92b0aaa6fe787c2e17bba1973d19d6fd5a61d03a Mon Sep 17 00:00:00 2001 From: Gareth Hughes Date: Wed, 21 Mar 2001 13:10:27 +0000 Subject: - Fix MGA header info. - Update date strings. - Fix MGA hangs (undocumented side effects of DWGSYNC). - Remove idle before ILOAD??? Seems fine with the above fix. --- linux/mga_state.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'linux/mga_state.c') diff --git a/linux/mga_state.c b/linux/mga_state.c index de5a4309..99778c58 100644 --- a/linux/mga_state.c +++ b/linux/mga_state.c @@ -515,6 +515,15 @@ static void mga_dma_dispatch_clear( drm_device_t *dev, DMA_LOCALS; DRM_DEBUG( __FUNCTION__ ":\n" ); + BEGIN_DMA( 1 ); + + DMA_BLOCK( MGA_DMAPAD, 0x00000000, + MGA_DMAPAD, 0x00000000, + MGA_DWGSYNC, 0x00007100, + MGA_DWGSYNC, 0x00007000 ); + + ADVANCE_DMA(); + for ( i = 0 ; i < nbox ; i++ ) { drm_clip_rect_t *box = &pbox[i]; u32 height = box->y2 - box->y1; @@ -757,7 +766,12 @@ static void mga_dma_dispatch_iload( drm_device_t *dev, drm_buf_t *buf, y2 = length / 64; - BEGIN_DMA( 4 ); + BEGIN_DMA( 5 ); + + DMA_BLOCK( MGA_DMAPAD, 0x00000000, + MGA_DMAPAD, 0x00000000, + MGA_DWGSYNC, 0x00007100, + MGA_DWGSYNC, 0x00007000 ); DMA_BLOCK( MGA_DSTORG, dstorg, MGA_MACCESS, 0x00000000, @@ -1009,8 +1023,13 @@ int mga_dma_iload( struct inode *inode, struct file *filp, if ( copy_from_user( &iload, (drm_mga_iload_t *)arg, sizeof(iload) ) ) return -EFAULT; - if ( mga_do_wait_for_idle( dev_priv ) < 0 ) +#if 0 + if ( mga_do_wait_for_idle( dev_priv ) < 0 ) { + if ( MGA_DMA_DEBUG ) + DRM_INFO( __FUNCTION__": -EBUSY\n" ); return -EBUSY; + } +#endif buf = dma->buflist[iload.idx]; buf_priv = buf->dev_private; -- cgit v1.2.3