diff options
Diffstat (limited to 'sys/dev/pci/drm/radeon_cp.c')
-rw-r--r-- | sys/dev/pci/drm/radeon_cp.c | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/sys/dev/pci/drm/radeon_cp.c b/sys/dev/pci/drm/radeon_cp.c index e3f40db24fc..b098518ff3a 100644 --- a/sys/dev/pci/drm/radeon_cp.c +++ b/sys/dev/pci/drm/radeon_cp.c @@ -1622,8 +1622,8 @@ radeon_wait_ring(drm_radeon_private_t *dev_priv, int n) } int -radeon_cp_get_buffers(struct drm_device *dev, struct drm_file *file_priv, - struct drm_dma * d) +radeon_cp_buffers(struct drm_device *dev, struct drm_dma * d, + struct drm_file *file_priv) { int i; struct drm_buf *buf; @@ -1647,41 +1647,6 @@ radeon_cp_get_buffers(struct drm_device *dev, struct drm_file *file_priv, return 0; } -int -radeon_cp_buffers(struct drm_device *dev, void *data, - struct drm_file *file_priv) -{ - struct drm_device_dma *dma = dev->dma; - int ret = 0; - struct drm_dma *d = data; - - LOCK_TEST_WITH_RETURN(dev, file_priv); - - /* Please don't send us buffers. - */ - if (d->send_count != 0) { - DRM_ERROR("Process %d trying to send %d buffers via drmDMA\n", - DRM_CURRENTPID, d->send_count); - return EINVAL; - } - - /* We'll send you buffers. - */ - if (d->request_count < 0 || d->request_count > dma->buf_count) { - DRM_ERROR("Process %d trying to get %d buffers (of %d max)\n", - DRM_CURRENTPID, d->request_count, dma->buf_count); - return EINVAL; - } - - d->granted_count = 0; - - if (d->request_count) { - ret = radeon_cp_get_buffers(dev, file_priv, d); - } - - return ret; -} - /* Create mappings for registers and framebuffer so userland doesn't necessarily * have to find them. */ |