summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/r128_cce.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/drm/r128_cce.c')
-rw-r--r--sys/dev/pci/drm/r128_cce.c39
1 files changed, 3 insertions, 36 deletions
diff --git a/sys/dev/pci/drm/r128_cce.c b/sys/dev/pci/drm/r128_cce.c
index aae7092cc79..f80a97f78d9 100644
--- a/sys/dev/pci/drm/r128_cce.c
+++ b/sys/dev/pci/drm/r128_cce.c
@@ -835,9 +835,9 @@ int r128_wait_ring(drm_r128_private_t * dev_priv, int n)
return EBUSY;
}
-static int r128_cce_get_buffers(struct drm_device * dev,
- struct drm_file *file_priv,
- struct drm_dma * d)
+int
+r128_cce_buffers(struct drm_device *dev, struct drm_dma * d,
+ struct drm_file *file_priv)
{
int i;
struct drm_buf *buf;
@@ -860,36 +860,3 @@ static int r128_cce_get_buffers(struct drm_device * dev,
}
return 0;
}
-
-int r128_cce_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 = r128_cce_get_buffers(dev, file_priv, d);
- }
-
- return ret;
-}