diff options
author | Leif Delgass <ldelgass@users.sourceforge.net> | 2003-03-30 04:52:48 +0000 |
---|---|---|
committer | Leif Delgass <ldelgass@users.sourceforge.net> | 2003-03-30 04:52:48 +0000 |
commit | 89eb66d97db0af9f4444deb4b683e02a97223f67 (patch) | |
tree | a70a5cd7f6a4c692cae297cc59915059a0c499a1 /shared-core/mga_dma.c | |
parent | ae0b8f750ae4ee190f7567fee5aca95d92e7895e (diff) |
Merge trunk - 4.3.0, filpmach64-0-0-6-20030330
Diffstat (limited to 'shared-core/mga_dma.c')
-rw-r--r-- | shared-core/mga_dma.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/shared-core/mga_dma.c b/shared-core/mga_dma.c index 22bd61f03..5e95c9f9b 100644 --- a/shared-core/mga_dma.c +++ b/shared-core/mga_dma.c @@ -686,7 +686,7 @@ int mga_dma_flush( DRM_IOCTL_ARGS ) drm_mga_private_t *dev_priv = (drm_mga_private_t *)dev->dev_private; drm_lock_t lock; - LOCK_TEST_WITH_RETURN( dev ); + LOCK_TEST_WITH_RETURN( dev, filp ); DRM_COPY_FROM_USER_IOCTL( lock, (drm_lock_t *)data, sizeof(lock) ); @@ -720,7 +720,7 @@ int mga_dma_reset( DRM_IOCTL_ARGS ) DRM_DEVICE; drm_mga_private_t *dev_priv = (drm_mga_private_t *)dev->dev_private; - LOCK_TEST_WITH_RETURN( dev ); + LOCK_TEST_WITH_RETURN( dev, filp ); return mga_do_dma_reset( dev_priv ); } @@ -730,7 +730,8 @@ int mga_dma_reset( DRM_IOCTL_ARGS ) * DMA buffer management */ -static int mga_dma_get_buffers( drm_device_t *dev, drm_dma_t *d ) +static int mga_dma_get_buffers( DRMFILE filp, + drm_device_t *dev, drm_dma_t *d ) { drm_buf_t *buf; int i; @@ -739,7 +740,7 @@ static int mga_dma_get_buffers( drm_device_t *dev, drm_dma_t *d ) buf = mga_freelist_get( dev ); if ( !buf ) return DRM_ERR(EAGAIN); - buf->pid = DRM_CURRENTPID; + buf->filp = filp; if ( DRM_COPY_TO_USER( &d->request_indices[i], &buf->idx, sizeof(buf->idx) ) ) @@ -761,7 +762,7 @@ int mga_dma_buffers( DRM_IOCTL_ARGS ) drm_dma_t d; int ret = 0; - LOCK_TEST_WITH_RETURN( dev ); + LOCK_TEST_WITH_RETURN( dev, filp ); DRM_COPY_FROM_USER_IOCTL( d, (drm_dma_t *)data, sizeof(d) ); @@ -786,7 +787,7 @@ int mga_dma_buffers( DRM_IOCTL_ARGS ) d.granted_count = 0; if ( d.request_count ) { - ret = mga_dma_get_buffers( dev, &d ); + ret = mga_dma_get_buffers( filp, dev, &d ); } DRM_COPY_TO_USER_IOCTL( (drm_dma_t *)data, d, sizeof(d) ); |