aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/via_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/drm/via_dma.c')
-rw-r--r--drivers/char/drm/via_dma.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/char/drm/via_dma.c b/drivers/char/drm/via_dma.c
index 7009dbddac43..94baec692b57 100644
--- a/drivers/char/drm/via_dma.c
+++ b/drivers/char/drm/via_dma.c
@@ -179,14 +179,12 @@ static int via_initialize(struct drm_device * dev,
179 } 179 }
180 180
181 if (dev_priv->ring.virtual_start != NULL) { 181 if (dev_priv->ring.virtual_start != NULL) {
182 DRM_ERROR("%s called again without calling cleanup\n", 182 DRM_ERROR("called again without calling cleanup\n");
183 __FUNCTION__);
184 return -EFAULT; 183 return -EFAULT;
185 } 184 }
186 185
187 if (!dev->agp || !dev->agp->base) { 186 if (!dev->agp || !dev->agp->base) {
188 DRM_ERROR("%s called with no agp memory available\n", 187 DRM_ERROR("called with no agp memory available\n");
189 __FUNCTION__);
190 return -EFAULT; 188 return -EFAULT;
191 } 189 }
192 190
@@ -267,8 +265,7 @@ static int via_dispatch_cmdbuffer(struct drm_device * dev, drm_via_cmdbuffer_t *
267 dev_priv = (drm_via_private_t *) dev->dev_private; 265 dev_priv = (drm_via_private_t *) dev->dev_private;
268 266
269 if (dev_priv->ring.virtual_start == NULL) { 267 if (dev_priv->ring.virtual_start == NULL) {
270 DRM_ERROR("%s called without initializing AGP ring buffer.\n", 268 DRM_ERROR("called without initializing AGP ring buffer.\n");
271 __FUNCTION__);
272 return -EFAULT; 269 return -EFAULT;
273 } 270 }
274 271
@@ -337,8 +334,7 @@ static int via_cmdbuffer(struct drm_device *dev, void *data, struct drm_file *fi
337 334
338 LOCK_TEST_WITH_RETURN(dev, file_priv); 335 LOCK_TEST_WITH_RETURN(dev, file_priv);
339 336
340 DRM_DEBUG("via cmdbuffer, buf %p size %lu\n", cmdbuf->buf, 337 DRM_DEBUG("buf %p size %lu\n", cmdbuf->buf, cmdbuf->size);
341 cmdbuf->size);
342 338
343 ret = via_dispatch_cmdbuffer(dev, cmdbuf); 339 ret = via_dispatch_cmdbuffer(dev, cmdbuf);
344 if (ret) { 340 if (ret) {
@@ -379,8 +375,7 @@ static int via_pci_cmdbuffer(struct drm_device *dev, void *data, struct drm_file
379 375
380 LOCK_TEST_WITH_RETURN(dev, file_priv); 376 LOCK_TEST_WITH_RETURN(dev, file_priv);
381 377
382 DRM_DEBUG("via_pci_cmdbuffer, buf %p size %lu\n", cmdbuf->buf, 378 DRM_DEBUG("buf %p size %lu\n", cmdbuf->buf, cmdbuf->size);
383 cmdbuf->size);
384 379
385 ret = via_dispatch_pci_cmdbuffer(dev, cmdbuf); 380 ret = via_dispatch_pci_cmdbuffer(dev, cmdbuf);
386 if (ret) { 381 if (ret) {
@@ -648,14 +643,13 @@ static int via_cmdbuf_size(struct drm_device *dev, void *data, struct drm_file *
648 uint32_t tmp_size, count; 643 uint32_t tmp_size, count;
649 drm_via_private_t *dev_priv; 644 drm_via_private_t *dev_priv;
650 645
651 DRM_DEBUG("via cmdbuf_size\n"); 646 DRM_DEBUG("\n");
652 LOCK_TEST_WITH_RETURN(dev, file_priv); 647 LOCK_TEST_WITH_RETURN(dev, file_priv);
653 648
654 dev_priv = (drm_via_private_t *) dev->dev_private; 649 dev_priv = (drm_via_private_t *) dev->dev_private;
655 650
656 if (dev_priv->ring.virtual_start == NULL) { 651 if (dev_priv->ring.virtual_start == NULL) {
657 DRM_ERROR("%s called without initializing AGP ring buffer.\n", 652 DRM_ERROR("called without initializing AGP ring buffer.\n");
658 __FUNCTION__);
659 return -EFAULT; 653 return -EFAULT;
660 } 654 }
661 655