diff --git a/linux/mach64_drv.h b/linux/mach64_drv.h index 2bab6063..7f2f906a 100644 --- a/linux/mach64_drv.h +++ b/linux/mach64_drv.h @@ -56,44 +56,6 @@ typedef struct drm_mach64_buf_priv { int age; } drm_mach64_buf_priv_t; - - /* mach64_drv.c */ -extern int mach64_version( struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg ); -extern int mach64_open( struct inode *inode, struct file *filp ); -extern int mach64_release( struct inode *inode, struct file *filp ); -extern int mach64_ioctl( struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg ); -extern int mach64_lock( struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg ); -extern int mach64_unlock( struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg ); - - /* mach64_bufs.c */ -extern int mach64_addbufs( struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg ); -extern int mach64_mapbufs( struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg ); - - /* mach64_context.c */ -extern int mach64_resctx( struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg ); -extern int mach64_addctx( struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg ); -extern int mach64_modctx( struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg ); -extern int mach64_getctx( struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg ); -extern int mach64_switchctx( struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg ); -extern int mach64_newctx( struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg ); -extern int mach64_rmctx( struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg ); - -extern int mach64_context_switch( drm_device_t *dev, int old, int new ); -extern int mach64_context_switch_complete( drm_device_t *dev, int new ); - /* mach64_dma.c */ extern int mach64_dma_init( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg ); diff --git a/linux/mach64_state.c b/linux/mach64_state.c index aec84dbf..ea0a6a21 100644 --- a/linux/mach64_state.c +++ b/linux/mach64_state.c @@ -309,7 +309,7 @@ static void mach64_dma_dispatch_vertex( drm_device_t *dev, if ( 0 ) mach64_print_dirty( "dispatch_vertex", sarea_priv->dirty ); - DRM_INFO( "idx = %u, offset=0x%08x, address=0x%08x, used=%u\n", buf->idx, buf->bus_address, buf->address, buf->used ); + /* DRM_INFO( "idx = %u, offset=0x%08x, address=0x%08x, used=%u\n", buf->idx, buf->bus_address, buf->address, buf->used ); */ if ( buf->used ) { #if 0 @@ -330,13 +330,13 @@ static void mach64_dma_dispatch_vertex( drm_device_t *dev, #endif /* Emit the vertex buffer rendering commands */ - if (0) { - unsigned * p = buf->address; - unsigned used = buf->used >> 2; + { + u32 *p = (u32 *)((char *)dev_priv->buffers->handle + buf->offset); + u32 used = buf->used >> 2; while(used) { - unsigned reg, count; + u32 reg, count; reg = *p & 0xffff; count = (*p >> 16) + 1; @@ -346,11 +346,11 @@ static void mach64_dma_dispatch_vertex( drm_device_t *dev, while(count && used) { - unsigned data; + u32 data; data = *p; - /* MACH64_WRITE( reg, data ); */ + MACH64_WRITE( reg, data ); p++; used--;