summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Delgass <ldelgass@users.sourceforge.net>2003-04-28 06:52:28 +0000
committerLeif Delgass <ldelgass@users.sourceforge.net>2003-04-28 06:52:28 +0000
commite1bc921270b6087a086e08b91ef99feb698f6b7e (patch)
tree1f0fdd826d51d87e3d56282d4a087b308fc836a7
parent6adec07cb91ea9890f6dce26f14e06f29a5ba9b0 (diff)
Use AGP for ring (part 2 - drm)
-rw-r--r--shared-core/mach64_dma.c66
-rw-r--r--shared-core/mach64_drm.h1
-rw-r--r--shared-core/mach64_drv.h34
-rw-r--r--shared-core/mach64_state.c8
-rw-r--r--shared/mach64_dma.c66
-rw-r--r--shared/mach64_drm.h1
-rw-r--r--shared/mach64_drv.h34
-rw-r--r--shared/mach64_state.c8
8 files changed, 100 insertions, 118 deletions
diff --git a/shared-core/mach64_dma.c b/shared-core/mach64_dma.c
index 98c65ccf..8c66d81b 100644
--- a/shared-core/mach64_dma.c
+++ b/shared-core/mach64_dma.c
@@ -156,7 +156,8 @@ int mach64_do_dma_flush( drm_mach64_private_t *dev_priv )
return mach64_ring_idle( dev_priv );
}
-int mach64_do_dma_idle( drm_mach64_private_t *dev_priv ) {
+int mach64_do_dma_idle( drm_mach64_private_t *dev_priv )
+{
int ret;
/* wait for completion */
@@ -675,6 +676,21 @@ static int mach64_do_dma_init( drm_device_t *dev, drm_mach64_init_t *init )
init->sarea_priv_offset);
if( !dev_priv->is_pci ) {
+ DRM_FIND_MAP( dev_priv->ring_map, init->ring_offset );
+ if ( !dev_priv->ring_map ) {
+ DRM_ERROR( "can not find ring map!\n" );
+ dev->dev_private = (void *)dev_priv;
+ mach64_do_cleanup_dma(dev);
+ return -EINVAL;
+ }
+ DRM_IOREMAP( dev_priv->ring_map );
+ if ( !dev_priv->ring_map->handle ) {
+ DRM_ERROR( "can not ioremap virtual address for"
+ " descriptor ring\n" );
+ dev->dev_private = (void *) dev_priv;
+ mach64_do_cleanup_dma( dev );
+ return -ENOMEM;
+ }
DRM_FIND_MAP( dev_priv->buffers, init->buffers_offset );
if ( !dev_priv->buffers ) {
DRM_ERROR( "can not find dma buffer map!\n" );
@@ -693,7 +709,7 @@ static int mach64_do_dma_init( drm_device_t *dev, drm_mach64_init_t *init )
DRM_FIND_MAP( dev_priv->agp_textures,
init->agp_textures_offset );
if (!dev_priv->agp_textures) {
- DRM_ERROR("could not find agp texture region!\n");
+ DRM_ERROR( "can not find agp texture region!\n" );
dev->dev_private = (void *)dev_priv;
mach64_do_cleanup_dma( dev );
return DRM_ERR(EINVAL);
@@ -735,20 +751,27 @@ static int mach64_do_dma_init( drm_device_t *dev, drm_mach64_init_t *init )
/* allocate descriptor memory from pci pool */
DRM_DEBUG( "Allocating dma descriptor ring\n" );
dev_priv->ring.size = 0x4000; /* 16KB */
- dev_priv->ring.start = pci_alloc_consistent( dev->pdev, dev_priv->ring.size,
- &dev_priv->ring.handle );
- if (!dev_priv->ring.start || !dev_priv->ring.handle) {
- DRM_ERROR( "Allocating dma descriptor ring failed\n");
- return DRM_ERR(ENOMEM);
- } else {
- dev_priv->ring.start_addr = (u32) dev_priv->ring.handle;
- memset( dev_priv->ring.start, 0x0, 0x4000 );
+ if ( dev_priv->is_pci ) {
+ dev_priv->ring.start = pci_alloc_consistent( dev->pdev, dev_priv->ring.size,
+ &dev_priv->ring.handle );
+
+ if (!dev_priv->ring.start || !dev_priv->ring.handle) {
+ DRM_ERROR( "Allocating dma descriptor ring failed\n");
+ return DRM_ERR(ENOMEM);
+ } else {
+ dev_priv->ring.start_addr = (u32) dev_priv->ring.handle;
+ }
+ } else {
+ dev_priv->ring.start = dev_priv->ring_map->handle;
+ dev_priv->ring.start_addr = (u32) dev_priv->ring_map->offset;
}
+ memset( dev_priv->ring.start, 0, dev_priv->ring.size );
DRM_INFO( "descriptor ring: cpu addr 0x%08x, bus addr: 0x%08x\n",
(u32) dev_priv->ring.start, dev_priv->ring.start_addr );
+ ret = 0;
if ( dev_priv->driver_mode != MACH64_MODE_MMIO ) {
/* enable block 1 registers and bus mastering */
@@ -769,11 +792,10 @@ static int mach64_do_dma_init( drm_device_t *dev, drm_mach64_init_t *init )
MACH64_WRITE( MACH64_BUS_CNTL, ( MACH64_READ(MACH64_BUS_CNTL)
| MACH64_BUS_EXT_REG_EN
| MACH64_BUS_MASTER_DIS ) );
- if ( init->dma_mode == MACH64_MODE_MMIO ) {
+ if ( init->dma_mode == MACH64_MODE_MMIO )
DRM_INFO( "Forcing pseudo-DMA mode\n" );
- } else {
+ else
DRM_INFO( "DMA test failed (ret=%d), using pseudo-DMA mode\n", ret );
- }
break;
case MACH64_MODE_DMA_SYNC:
DRM_INFO( "DMA test succeeded, using synchronous DMA mode\n");
@@ -790,7 +812,6 @@ static int mach64_do_dma_init( drm_device_t *dev, drm_mach64_init_t *init )
dev_priv->ring.head = dev_priv->ring.tail = 0;
dev_priv->ring.tail_mask = (dev_priv->ring.size / sizeof(u32)) - 1;
dev_priv->ring.space = dev_priv->ring.size;
- dev_priv->ring.high_mark = 128;
/* setup physical address and size of descriptor table */
mach64_do_wait_for_fifo( dev_priv, 1 );
@@ -967,18 +988,19 @@ int mach64_do_cleanup_dma( drm_device_t *dev )
if ( dev->dev_private ) {
drm_mach64_private_t *dev_priv = dev->dev_private;
- /* Discard the allocations for the descriptor table... */
- if ( (dev_priv->ring.start != NULL) && dev_priv->ring.handle ) {
- DRM_DEBUG( "freeing dma descriptor ring\n" );
- pci_free_consistent( dev->pdev, dev_priv->ring.size,
- dev_priv->ring.start, dev_priv->ring.handle );
+ if ( dev_priv->is_pci ) {
+ if ( (dev_priv->ring.start != NULL) && dev_priv->ring.handle ) {
+ pci_free_consistent( dev->pdev, dev_priv->ring.size,
+ dev_priv->ring.start, dev_priv->ring.handle );
+ }
+ } else {
+ if ( dev_priv->ring_map )
+ DRM_IOREMAPFREE( dev_priv->ring_map );
}
- if ( dev_priv->buffers ) {
+ if ( dev_priv->buffers )
DRM_IOREMAPFREE( dev_priv->buffers );
- }
- DRM_DEBUG( "destroying dma buffer freelist\n" );
mach64_destroy_freelist( dev );
DRM(free)( dev_priv, sizeof(drm_mach64_private_t),
diff --git a/shared-core/mach64_drm.h b/shared-core/mach64_drm.h
index d3f3eb99..44ec6f2c 100644
--- a/shared-core/mach64_drm.h
+++ b/shared-core/mach64_drm.h
@@ -215,6 +215,7 @@ typedef struct drm_mach64_init {
unsigned long fb_offset;
unsigned long mmio_offset;
+ unsigned long ring_offset;
unsigned long buffers_offset;
unsigned long agp_textures_offset;
} drm_mach64_init_t;
diff --git a/shared-core/mach64_drv.h b/shared-core/mach64_drv.h
index d433e30f..00349d01 100644
--- a/shared-core/mach64_drv.h
+++ b/shared-core/mach64_drv.h
@@ -58,8 +58,6 @@ typedef struct drm_mach64_descriptor_ring {
u32 tail; /* dword offset of descriptor ring tail */
u32 tail_mask; /* mask used to wrap ring */
int space; /* number of free bytes in ring */
-
- int high_mark; /* high water mark in bytes */
} drm_mach64_descriptor_ring_t;
typedef struct drm_mach64_private {
@@ -95,6 +93,7 @@ typedef struct drm_mach64_private {
drm_local_map_t *sarea;
drm_local_map_t *fb;
drm_local_map_t *mmio;
+ drm_local_map_t *ring_map;
drm_local_map_t *buffers;
drm_local_map_t *agp_textures;
} drm_mach64_private_t;
@@ -610,7 +609,7 @@ static __inline__ void mach64_ring_start( drm_mach64_private_t *dev_priv )
}
static __inline__ void mach64_ring_resume( drm_mach64_private_t *dev_priv,
- drm_mach64_descriptor_ring_t *ring )
+ drm_mach64_descriptor_ring_t *ring )
{
DRM_DEBUG( "%s: head_addr: 0x%08x head: %d tail: %d space: %d\n",
__FUNCTION__,
@@ -644,7 +643,7 @@ static __inline__ void mach64_ring_resume( drm_mach64_private_t *dev_priv,
}
static __inline__ void mach64_ring_tick( drm_mach64_private_t *dev_priv,
- drm_mach64_descriptor_ring_t *ring )
+ drm_mach64_descriptor_ring_t *ring )
{
DRM_DEBUG( "%s: head_addr: 0x%08x head: %d tail: %d space: %d\n",
__FUNCTION__,
@@ -724,29 +723,6 @@ mach64_update_ring_snapshot( drm_mach64_private_t *dev_priv )
}
}
-/* FIXME: right now this is needed to ensure free buffers for state emits */
-/* CHECKME: I've disabled this as it isn't necessary - we already wait for free buffers */
-#define RING_SPACE_TEST_WITH_RETURN( dev_priv )
-
-#define RING_SPACE_TEST_WITH_RETURN_( dev_priv ) \
-do { \
- drm_mach64_descriptor_ring_t *ring = &dev_priv->ring; int i; \
- if ( ring->space < ring->high_mark ) { \
- for ( i = 0 ; i < dev_priv->usec_timeout ; i++ ) { \
- mach64_update_ring_snapshot( dev_priv ); \
- if ( ring->space >= ring->high_mark ) \
- goto __ring_space_done; \
- DRM_UDELAY( 1 ); \
- } \
- DRM_ERROR( "ring space check failed!\n" ); \
- DRM_INFO( "ring: head addr: 0x%08x head: %d tail: %d space: %d\n", \
- ring->head_addr, ring->head, ring->tail, ring->space ); \
- return DRM_ERR(EBUSY); \
- } \
- __ring_space_done: \
-} while (0)
-
-
/* ================================================================
* DMA descriptor ring macros
*/
@@ -823,8 +799,8 @@ do { \
#define GETRINGOFFSET() (_entry->ring_ofs)
static __inline__ int mach64_find_pending_buf_entry ( drm_mach64_private_t *dev_priv,
- drm_mach64_freelist_t **entry,
- drm_buf_t *buf )
+ drm_mach64_freelist_t **entry,
+ drm_buf_t *buf )
{
struct list_head *ptr;
#if MACH64_EXTRA_CHECKING
diff --git a/shared-core/mach64_state.c b/shared-core/mach64_state.c
index 8be5108c..f6ea7b95 100644
--- a/shared-core/mach64_state.c
+++ b/shared-core/mach64_state.c
@@ -745,8 +745,6 @@ int mach64_dma_clear( DRM_IOCTL_ARGS )
DRM_COPY_FROM_USER_IOCTL( clear, (drm_mach64_clear_t *)data,
sizeof(clear) );
-
- RING_SPACE_TEST_WITH_RETURN( dev_priv );
if ( sarea_priv->nbox > MACH64_NR_SAREA_CLIPRECTS )
sarea_priv->nbox = MACH64_NR_SAREA_CLIPRECTS;
@@ -772,8 +770,6 @@ int mach64_dma_swap( DRM_IOCTL_ARGS )
DRM_DEBUG( "%s: pid=%d\n", __FUNCTION__, DRM_CURRENTPID );
LOCK_TEST_WITH_RETURN( dev, filp );
-
- RING_SPACE_TEST_WITH_RETURN( dev_priv );
if ( sarea_priv->nbox > MACH64_NR_SAREA_CLIPRECTS )
sarea_priv->nbox = MACH64_NR_SAREA_CLIPRECTS;
@@ -819,8 +815,6 @@ int mach64_dma_vertex( DRM_IOCTL_ARGS )
return DRM_ERR(EINVAL);
}
- RING_SPACE_TEST_WITH_RETURN( dev_priv );
-
if ( sarea_priv->nbox > MACH64_NR_SAREA_CLIPRECTS )
sarea_priv->nbox = MACH64_NR_SAREA_CLIPRECTS;
@@ -851,8 +845,6 @@ int mach64_dma_blit( DRM_IOCTL_ARGS )
return DRM_ERR(EINVAL);
}
- RING_SPACE_TEST_WITH_RETURN( dev_priv );
-
ret = mach64_dma_dispatch_blit( filp, dev, &blit );
/* Make sure we restore the 3D state next time.
diff --git a/shared/mach64_dma.c b/shared/mach64_dma.c
index 98c65ccf..8c66d81b 100644
--- a/shared/mach64_dma.c
+++ b/shared/mach64_dma.c
@@ -156,7 +156,8 @@ int mach64_do_dma_flush( drm_mach64_private_t *dev_priv )
return mach64_ring_idle( dev_priv );
}
-int mach64_do_dma_idle( drm_mach64_private_t *dev_priv ) {
+int mach64_do_dma_idle( drm_mach64_private_t *dev_priv )
+{
int ret;
/* wait for completion */
@@ -675,6 +676,21 @@ static int mach64_do_dma_init( drm_device_t *dev, drm_mach64_init_t *init )
init->sarea_priv_offset);
if( !dev_priv->is_pci ) {
+ DRM_FIND_MAP( dev_priv->ring_map, init->ring_offset );
+ if ( !dev_priv->ring_map ) {
+ DRM_ERROR( "can not find ring map!\n" );
+ dev->dev_private = (void *)dev_priv;
+ mach64_do_cleanup_dma(dev);
+ return -EINVAL;
+ }
+ DRM_IOREMAP( dev_priv->ring_map );
+ if ( !dev_priv->ring_map->handle ) {
+ DRM_ERROR( "can not ioremap virtual address for"
+ " descriptor ring\n" );
+ dev->dev_private = (void *) dev_priv;
+ mach64_do_cleanup_dma( dev );
+ return -ENOMEM;
+ }
DRM_FIND_MAP( dev_priv->buffers, init->buffers_offset );
if ( !dev_priv->buffers ) {
DRM_ERROR( "can not find dma buffer map!\n" );
@@ -693,7 +709,7 @@ static int mach64_do_dma_init( drm_device_t *dev, drm_mach64_init_t *init )
DRM_FIND_MAP( dev_priv->agp_textures,
init->agp_textures_offset );
if (!dev_priv->agp_textures) {
- DRM_ERROR("could not find agp texture region!\n");
+ DRM_ERROR( "can not find agp texture region!\n" );
dev->dev_private = (void *)dev_priv;
mach64_do_cleanup_dma( dev );
return DRM_ERR(EINVAL);
@@ -735,20 +751,27 @@ static int mach64_do_dma_init( drm_device_t *dev, drm_mach64_init_t *init )
/* allocate descriptor memory from pci pool */
DRM_DEBUG( "Allocating dma descriptor ring\n" );
dev_priv->ring.size = 0x4000; /* 16KB */
- dev_priv->ring.start = pci_alloc_consistent( dev->pdev, dev_priv->ring.size,
- &dev_priv->ring.handle );
- if (!dev_priv->ring.start || !dev_priv->ring.handle) {
- DRM_ERROR( "Allocating dma descriptor ring failed\n");
- return DRM_ERR(ENOMEM);
- } else {
- dev_priv->ring.start_addr = (u32) dev_priv->ring.handle;
- memset( dev_priv->ring.start, 0x0, 0x4000 );
+ if ( dev_priv->is_pci ) {
+ dev_priv->ring.start = pci_alloc_consistent( dev->pdev, dev_priv->ring.size,
+ &dev_priv->ring.handle );
+
+ if (!dev_priv->ring.start || !dev_priv->ring.handle) {
+ DRM_ERROR( "Allocating dma descriptor ring failed\n");
+ return DRM_ERR(ENOMEM);
+ } else {
+ dev_priv->ring.start_addr = (u32) dev_priv->ring.handle;
+ }
+ } else {
+ dev_priv->ring.start = dev_priv->ring_map->handle;
+ dev_priv->ring.start_addr = (u32) dev_priv->ring_map->offset;
}
+ memset( dev_priv->ring.start, 0, dev_priv->ring.size );
DRM_INFO( "descriptor ring: cpu addr 0x%08x, bus addr: 0x%08x\n",
(u32) dev_priv->ring.start, dev_priv->ring.start_addr );
+ ret = 0;
if ( dev_priv->driver_mode != MACH64_MODE_MMIO ) {
/* enable block 1 registers and bus mastering */
@@ -769,11 +792,10 @@ static int mach64_do_dma_init( drm_device_t *dev, drm_mach64_init_t *init )
MACH64_WRITE( MACH64_BUS_CNTL, ( MACH64_READ(MACH64_BUS_CNTL)
| MACH64_BUS_EXT_REG_EN
| MACH64_BUS_MASTER_DIS ) );
- if ( init->dma_mode == MACH64_MODE_MMIO ) {
+ if ( init->dma_mode == MACH64_MODE_MMIO )
DRM_INFO( "Forcing pseudo-DMA mode\n" );
- } else {
+ else
DRM_INFO( "DMA test failed (ret=%d), using pseudo-DMA mode\n", ret );
- }
break;
case MACH64_MODE_DMA_SYNC:
DRM_INFO( "DMA test succeeded, using synchronous DMA mode\n");
@@ -790,7 +812,6 @@ static int mach64_do_dma_init( drm_device_t *dev, drm_mach64_init_t *init )
dev_priv->ring.head = dev_priv->ring.tail = 0;
dev_priv->ring.tail_mask = (dev_priv->ring.size / sizeof(u32)) - 1;
dev_priv->ring.space = dev_priv->ring.size;
- dev_priv->ring.high_mark = 128;
/* setup physical address and size of descriptor table */
mach64_do_wait_for_fifo( dev_priv, 1 );
@@ -967,18 +988,19 @@ int mach64_do_cleanup_dma( drm_device_t *dev )
if ( dev->dev_private ) {
drm_mach64_private_t *dev_priv = dev->dev_private;
- /* Discard the allocations for the descriptor table... */
- if ( (dev_priv->ring.start != NULL) && dev_priv->ring.handle ) {
- DRM_DEBUG( "freeing dma descriptor ring\n" );
- pci_free_consistent( dev->pdev, dev_priv->ring.size,
- dev_priv->ring.start, dev_priv->ring.handle );
+ if ( dev_priv->is_pci ) {
+ if ( (dev_priv->ring.start != NULL) && dev_priv->ring.handle ) {
+ pci_free_consistent( dev->pdev, dev_priv->ring.size,
+ dev_priv->ring.start, dev_priv->ring.handle );
+ }
+ } else {
+ if ( dev_priv->ring_map )
+ DRM_IOREMAPFREE( dev_priv->ring_map );
}
- if ( dev_priv->buffers ) {
+ if ( dev_priv->buffers )
DRM_IOREMAPFREE( dev_priv->buffers );
- }
- DRM_DEBUG( "destroying dma buffer freelist\n" );
mach64_destroy_freelist( dev );
DRM(free)( dev_priv, sizeof(drm_mach64_private_t),
diff --git a/shared/mach64_drm.h b/shared/mach64_drm.h
index d3f3eb99..44ec6f2c 100644
--- a/shared/mach64_drm.h
+++ b/shared/mach64_drm.h
@@ -215,6 +215,7 @@ typedef struct drm_mach64_init {
unsigned long fb_offset;
unsigned long mmio_offset;
+ unsigned long ring_offset;
unsigned long buffers_offset;
unsigned long agp_textures_offset;
} drm_mach64_init_t;
diff --git a/shared/mach64_drv.h b/shared/mach64_drv.h
index d433e30f..00349d01 100644
--- a/shared/mach64_drv.h
+++ b/shared/mach64_drv.h
@@ -58,8 +58,6 @@ typedef struct drm_mach64_descriptor_ring {
u32 tail; /* dword offset of descriptor ring tail */
u32 tail_mask; /* mask used to wrap ring */
int space; /* number of free bytes in ring */
-
- int high_mark; /* high water mark in bytes */
} drm_mach64_descriptor_ring_t;
typedef struct drm_mach64_private {
@@ -95,6 +93,7 @@ typedef struct drm_mach64_private {
drm_local_map_t *sarea;
drm_local_map_t *fb;
drm_local_map_t *mmio;
+ drm_local_map_t *ring_map;
drm_local_map_t *buffers;
drm_local_map_t *agp_textures;
} drm_mach64_private_t;
@@ -610,7 +609,7 @@ static __inline__ void mach64_ring_start( drm_mach64_private_t *dev_priv )
}
static __inline__ void mach64_ring_resume( drm_mach64_private_t *dev_priv,
- drm_mach64_descriptor_ring_t *ring )
+ drm_mach64_descriptor_ring_t *ring )
{
DRM_DEBUG( "%s: head_addr: 0x%08x head: %d tail: %d space: %d\n",
__FUNCTION__,
@@ -644,7 +643,7 @@ static __inline__ void mach64_ring_resume( drm_mach64_private_t *dev_priv,
}
static __inline__ void mach64_ring_tick( drm_mach64_private_t *dev_priv,
- drm_mach64_descriptor_ring_t *ring )
+ drm_mach64_descriptor_ring_t *ring )
{
DRM_DEBUG( "%s: head_addr: 0x%08x head: %d tail: %d space: %d\n",
__FUNCTION__,
@@ -724,29 +723,6 @@ mach64_update_ring_snapshot( drm_mach64_private_t *dev_priv )
}
}
-/* FIXME: right now this is needed to ensure free buffers for state emits */
-/* CHECKME: I've disabled this as it isn't necessary - we already wait for free buffers */
-#define RING_SPACE_TEST_WITH_RETURN( dev_priv )
-
-#define RING_SPACE_TEST_WITH_RETURN_( dev_priv ) \
-do { \
- drm_mach64_descriptor_ring_t *ring = &dev_priv->ring; int i; \
- if ( ring->space < ring->high_mark ) { \
- for ( i = 0 ; i < dev_priv->usec_timeout ; i++ ) { \
- mach64_update_ring_snapshot( dev_priv ); \
- if ( ring->space >= ring->high_mark ) \
- goto __ring_space_done; \
- DRM_UDELAY( 1 ); \
- } \
- DRM_ERROR( "ring space check failed!\n" ); \
- DRM_INFO( "ring: head addr: 0x%08x head: %d tail: %d space: %d\n", \
- ring->head_addr, ring->head, ring->tail, ring->space ); \
- return DRM_ERR(EBUSY); \
- } \
- __ring_space_done: \
-} while (0)
-
-
/* ================================================================
* DMA descriptor ring macros
*/
@@ -823,8 +799,8 @@ do { \
#define GETRINGOFFSET() (_entry->ring_ofs)
static __inline__ int mach64_find_pending_buf_entry ( drm_mach64_private_t *dev_priv,
- drm_mach64_freelist_t **entry,
- drm_buf_t *buf )
+ drm_mach64_freelist_t **entry,
+ drm_buf_t *buf )
{
struct list_head *ptr;
#if MACH64_EXTRA_CHECKING
diff --git a/shared/mach64_state.c b/shared/mach64_state.c
index 8be5108c..f6ea7b95 100644
--- a/shared/mach64_state.c
+++ b/shared/mach64_state.c
@@ -745,8 +745,6 @@ int mach64_dma_clear( DRM_IOCTL_ARGS )
DRM_COPY_FROM_USER_IOCTL( clear, (drm_mach64_clear_t *)data,
sizeof(clear) );
-
- RING_SPACE_TEST_WITH_RETURN( dev_priv );
if ( sarea_priv->nbox > MACH64_NR_SAREA_CLIPRECTS )
sarea_priv->nbox = MACH64_NR_SAREA_CLIPRECTS;
@@ -772,8 +770,6 @@ int mach64_dma_swap( DRM_IOCTL_ARGS )
DRM_DEBUG( "%s: pid=%d\n", __FUNCTION__, DRM_CURRENTPID );
LOCK_TEST_WITH_RETURN( dev, filp );
-
- RING_SPACE_TEST_WITH_RETURN( dev_priv );
if ( sarea_priv->nbox > MACH64_NR_SAREA_CLIPRECTS )
sarea_priv->nbox = MACH64_NR_SAREA_CLIPRECTS;
@@ -819,8 +815,6 @@ int mach64_dma_vertex( DRM_IOCTL_ARGS )
return DRM_ERR(EINVAL);
}
- RING_SPACE_TEST_WITH_RETURN( dev_priv );
-
if ( sarea_priv->nbox > MACH64_NR_SAREA_CLIPRECTS )
sarea_priv->nbox = MACH64_NR_SAREA_CLIPRECTS;
@@ -851,8 +845,6 @@ int mach64_dma_blit( DRM_IOCTL_ARGS )
return DRM_ERR(EINVAL);
}
- RING_SPACE_TEST_WITH_RETURN( dev_priv );
-
ret = mach64_dma_dispatch_blit( filp, dev, &blit );
/* Make sure we restore the 3D state next time.