diff options
author | Gareth Hughes <gareth@users.sourceforge.net> | 2001-03-21 13:10:27 +0000 |
---|---|---|
committer | Gareth Hughes <gareth@users.sourceforge.net> | 2001-03-21 13:10:27 +0000 |
commit | 92b0aaa6fe787c2e17bba1973d19d6fd5a61d03a (patch) | |
tree | a3e5c187618eea1fcc0381cdef540b4b88822dfc /linux/mga_state.c | |
parent | b90028231c5c73783ee45124903794970f244978 (diff) |
- 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.
Diffstat (limited to 'linux/mga_state.c')
-rw-r--r-- | linux/mga_state.c | 23 |
1 files changed, 21 insertions, 2 deletions
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; |