diff options
author | Gareth Hughes <gareth@users.sourceforge.net> | 2000-12-13 03:19:20 +0000 |
---|---|---|
committer | Gareth Hughes <gareth@users.sourceforge.net> | 2000-12-13 03:19:20 +0000 |
commit | feb5627964d33d7f694c441f21219539ea1ee818 (patch) | |
tree | 336b5050898eb0324d2be7c433920326e94b5d9d | |
parent | a13cd4a9f7147c4b1ff7c0a6ef0c38fb3a2146d9 (diff) |
- Manually disable 2D acceleration, leave sync routine.
- Fix pitch values.
- Update clear ioctl parameters.
-rw-r--r-- | linux-core/mach64_drv.c | 2 | ||||
-rw-r--r-- | linux/mach64_dma.c | 6 | ||||
-rw-r--r-- | linux/mach64_drm.h | 2 | ||||
-rw-r--r-- | linux/mach64_drv.c | 2 | ||||
-rw-r--r-- | linux/mach64_state.c | 31 | ||||
-rw-r--r-- | linux/mga_dma.c | 8 |
6 files changed, 24 insertions, 27 deletions
diff --git a/linux-core/mach64_drv.c b/linux-core/mach64_drv.c index 16232b016..e300d9ea5 100644 --- a/linux-core/mach64_drv.c +++ b/linux-core/mach64_drv.c @@ -35,7 +35,7 @@ #define DRIVER_NAME "mach64" #define DRIVER_DESC "DRM module for the ATI Rage Pro" -#define DRIVER_DATE "20001207" +#define DRIVER_DATE "20001213" #define DRIVER_MAJOR 1 #define DRIVER_MINOR 0 diff --git a/linux/mach64_dma.c b/linux/mach64_dma.c index 67b346c95..7288955bb 100644 --- a/linux/mach64_dma.c +++ b/linux/mach64_dma.c @@ -115,11 +115,11 @@ static int mach64_do_dma_init( drm_device_t *dev, drm_mach64_init_t *init ) dev_priv->depth_offset = init->depth_offset; dev_priv->depth_pitch = init->depth_pitch; - dev_priv->front_offset_pitch = (((dev_priv->front_pitch/8) << 21) | + dev_priv->front_offset_pitch = (((dev_priv->front_pitch/8) << 22) | (dev_priv->front_offset >> 3)); - dev_priv->back_offset_pitch = (((dev_priv->back_pitch/8) << 21) | + dev_priv->back_offset_pitch = (((dev_priv->back_pitch/8) << 22) | (dev_priv->back_offset >> 3)); - dev_priv->depth_offset_pitch = (((dev_priv->depth_pitch/8) << 21) | + dev_priv->depth_offset_pitch = (((dev_priv->depth_pitch/8) << 22) | (dev_priv->depth_offset >> 3)); dev_priv->usec_timeout = 1000000; diff --git a/linux/mach64_drm.h b/linux/mach64_drm.h index 28651bd7b..1f1c0b6e2 100644 --- a/linux/mach64_drm.h +++ b/linux/mach64_drm.h @@ -127,8 +127,6 @@ typedef struct drm_mach64_clear { int x, y, w, h; unsigned int clear_color; unsigned int clear_depth; - unsigned int color_mask; - unsigned int depth_mask; } drm_mach64_clear_t; #endif diff --git a/linux/mach64_drv.c b/linux/mach64_drv.c index 16232b016..e300d9ea5 100644 --- a/linux/mach64_drv.c +++ b/linux/mach64_drv.c @@ -35,7 +35,7 @@ #define DRIVER_NAME "mach64" #define DRIVER_DESC "DRM module for the ATI Rage Pro" -#define DRIVER_DATE "20001207" +#define DRIVER_DATE "20001213" #define DRIVER_MAJOR 1 #define DRIVER_MINOR 0 diff --git a/linux/mach64_state.c b/linux/mach64_state.c index 64fa45bc1..e3b7758af 100644 --- a/linux/mach64_state.c +++ b/linux/mach64_state.c @@ -56,9 +56,7 @@ static void mach64_dma_dispatch_clear( drm_device_t *dev, unsigned int flags, int cx, int cy, int cw, int ch, unsigned int clear_color, - unsigned int clear_depth, - unsigned int color_mask, - unsigned int depth_mask ) + unsigned int clear_depth ) { drm_mach64_private_t *dev_priv = dev->dev_private; drm_mach64_sarea_t *sarea_priv = dev_priv->sarea_priv; @@ -67,24 +65,23 @@ static void mach64_dma_dispatch_clear( drm_device_t *dev, u32 fb_bpp, depth_bpp; int i; DMALOCALS; - DRM_INFO( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __FUNCTION__ ); switch ( dev_priv->fb_bpp ) { case 16: fb_bpp = MACH64_DATATYPE_RGB565; break; case 32: - default: fb_bpp = MACH64_DATATYPE_ARGB8888; break; + default: + return; } switch ( dev_priv->depth_bpp ) { case 16: depth_bpp = MACH64_DATATYPE_RGB565; break; case 24: - depth_bpp = MACH64_DATATYPE_ARGB8888; - break; case 32: depth_bpp = MACH64_DATATYPE_ARGB8888; break; @@ -98,9 +95,9 @@ static void mach64_dma_dispatch_clear( drm_device_t *dev, int w = pbox[i].x2 - x; int h = pbox[i].y2 - y; - DRM_INFO( "dispatch clear %d,%d-%d,%d flags 0x%x\n", - pbox[i].x1, pbox[i].y1, - pbox[i].x2, pbox[i].y2, flags ); + DRM_DEBUG( "dispatch clear %d,%d-%d,%d flags 0x%x\n", + pbox[i].x1, pbox[i].y1, + pbox[i].x2, pbox[i].y2, flags ); if ( flags & (MACH64_FRONT | MACH64_BACK) ) { /* Setup for color buffer clears @@ -122,7 +119,8 @@ static void mach64_dma_dispatch_clear( drm_device_t *dev, (fb_bpp << 28)) ); DMAOUTREG( MACH64_DP_FRGD_CLR, clear_color ); - DMAOUTREG( MACH64_DP_WRITE_MASK, color_mask ); + /* FIXME: Use color mask from state info */ + DMAOUTREG( MACH64_DP_WRITE_MASK, 0xffffffff ); DMAOUTREG( MACH64_DP_MIX, (MACH64_BKGD_MIX_D | MACH64_FRGD_MIX_S) ); DMAOUTREG( MACH64_DP_SRC, (MACH64_BKGD_SRC_FRGD_CLR | @@ -179,7 +177,7 @@ static void mach64_dma_dispatch_clear( drm_device_t *dev, (depth_bpp << 28)) ); DMAOUTREG( MACH64_DP_FRGD_CLR, clear_depth ); - DMAOUTREG( MACH64_DP_WRITE_MASK, depth_mask ); + DMAOUTREG( MACH64_DP_WRITE_MASK, 0xffffffff ); DMAOUTREG( MACH64_DP_MIX, (MACH64_BKGD_MIX_D | MACH64_FRGD_MIX_S) ); DMAOUTREG( MACH64_DP_SRC, (MACH64_BKGD_SRC_FRGD_CLR | @@ -207,7 +205,7 @@ static void mach64_dma_dispatch_swap( drm_device_t *dev ) u32 fb_bpp; int i; DMALOCALS; - DRM_INFO( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __FUNCTION__ ); switch ( dev_priv->fb_bpp ) { case 16: @@ -252,7 +250,7 @@ static void mach64_dma_dispatch_swap( drm_device_t *dev ) int w = pbox[i].x2 - x; int h = pbox[i].y2 - y; - DRM_INFO( "dispatch swap %d,%d-%d,%d\n", + DRM_DEBUG( "dispatch swap %d,%d-%d,%d\n", pbox[i].x1, pbox[i].y1, pbox[i].x2, pbox[i].y2 ); @@ -295,7 +293,7 @@ int mach64_dma_clear( struct inode *inode, struct file *filp, drm_mach64_private_t *dev_priv = dev->dev_private; drm_mach64_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_mach64_clear_t clear; - DRM_INFO( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __FUNCTION__ ); if ( !_DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ) || dev->lock.pid != current->pid ) { @@ -312,8 +310,7 @@ int mach64_dma_clear( struct inode *inode, struct file *filp, mach64_dma_dispatch_clear( dev, clear.flags, clear.x, clear.y, clear.w, clear.h, - clear.clear_color, clear.clear_depth, - clear.color_mask, clear.depth_mask ); + clear.clear_color, clear.clear_depth ); #if 0 /* Make sure we restore the 3D state next time. diff --git a/linux/mga_dma.c b/linux/mga_dma.c index 6adffb8a9..60a0100d2 100644 --- a/linux/mga_dma.c +++ b/linux/mga_dma.c @@ -534,7 +534,7 @@ int mga_dma_schedule(drm_device_t *dev, int locked) int retval = 0; if (!dev_priv) return -EBUSY; - + if (test_and_set_bit(0, &dev->dma_flag)) { retval = -EBUSY; goto sch_out_wakeup; @@ -889,7 +889,7 @@ static int mga_flush_queue(drm_device_t *dev) if(dev_priv->next_prim->num_dwords != 0) { add_wait_queue(&dev_priv->flush_queue, &entry); - if (test_bit(MGA_IN_FLUSH, &dev_priv->dispatch_status)) + if (test_bit(MGA_IN_FLUSH, &dev_priv->dispatch_status)) DRM_ERROR("Incorrect mga_flush_queue logic\n"); set_bit(MGA_IN_FLUSH, &dev_priv->dispatch_status); mga_dma_schedule(dev, 0); @@ -924,7 +924,7 @@ void mga_reclaim_buffers(drm_device_t *dev, pid_t pid) if(dma->buflist == NULL) return; DRM_DEBUG("buf_count=%d\n", dma->buf_count); - + mga_flush_queue(dev); for (i = 0; i < dma->buf_count; i++) { @@ -941,6 +941,7 @@ void mga_reclaim_buffers(drm_device_t *dev, pid_t pid) } } +#if 0 int mga_lock(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { @@ -1014,6 +1015,7 @@ int mga_lock(struct inode *inode, struct file *filp, unsigned int cmd, ret ? "interrupted" : "has lock"); return ret; } +#endif int mga_flush_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) |