summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/radeon_cp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/drm/radeon_cp.c')
-rw-r--r--sys/dev/pci/drm/radeon_cp.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/sys/dev/pci/drm/radeon_cp.c b/sys/dev/pci/drm/radeon_cp.c
index 5c9da607c7c..a69d33747a5 100644
--- a/sys/dev/pci/drm/radeon_cp.c
+++ b/sys/dev/pci/drm/radeon_cp.c
@@ -207,7 +207,7 @@ static int radeon_do_pixcache_flush(drm_radeon_private_t * dev_priv)
DRM_ERROR("failed!\n");
radeon_status(dev_priv);
#endif
- return -EBUSY;
+ return EBUSY;
}
static int radeon_do_wait_for_fifo(drm_radeon_private_t * dev_priv, int entries)
@@ -231,7 +231,7 @@ static int radeon_do_wait_for_fifo(drm_radeon_private_t * dev_priv, int entries)
DRM_ERROR("failed!\n");
radeon_status(dev_priv);
#endif
- return -EBUSY;
+ return EBUSY;
}
static int radeon_do_wait_for_idle(drm_radeon_private_t * dev_priv)
@@ -260,7 +260,7 @@ static int radeon_do_wait_for_idle(drm_radeon_private_t * dev_priv)
DRM_ERROR("failed!\n");
radeon_status(dev_priv);
#endif
- return -EBUSY;
+ return EBUSY;
}
static void radeon_init_pipes(drm_radeon_private_t * dev_priv)
@@ -860,7 +860,7 @@ static int radeon_do_init_cp(struct drm_device * dev, drm_radeon_init_t * init)
if ((dev_priv->flags & RADEON_NEW_MEMMAP) && !dev_priv->new_memmap) {
DRM_ERROR("Cannot initialise DRM on this card\nThis card requires a new X.org DDX for 3D\n");
radeon_do_cleanup_cp(dev);
- return -EINVAL;
+ return EINVAL;
}
if (init->is_pci && (dev_priv->flags & RADEON_IS_AGP))
@@ -878,7 +878,7 @@ static int radeon_do_init_cp(struct drm_device * dev, drm_radeon_init_t * init)
if ((!(dev_priv->flags & RADEON_IS_AGP)) && !dev->sg) {
DRM_ERROR("PCI GART memory not allocated!\n");
radeon_do_cleanup_cp(dev);
- return -EINVAL;
+ return EINVAL;
}
dev_priv->usec_timeout = init->usec_timeout;
@@ -886,7 +886,7 @@ static int radeon_do_init_cp(struct drm_device * dev, drm_radeon_init_t * init)
dev_priv->usec_timeout > RADEON_MAX_USEC_TIMEOUT) {
DRM_DEBUG("TIMEOUT problem!\n");
radeon_do_cleanup_cp(dev);
- return -EINVAL;
+ return EINVAL;
}
/* Enable vblank on CRTC1 for older X servers
@@ -904,7 +904,7 @@ static int radeon_do_init_cp(struct drm_device * dev, drm_radeon_init_t * init)
(init->cp_mode != RADEON_CSQ_PRIBM_INDBM)) {
DRM_DEBUG("BAD cp_mode (%x)!\n", init->cp_mode);
radeon_do_cleanup_cp(dev);
- return -EINVAL;
+ return EINVAL;
}
switch (init->fb_bpp) {
@@ -972,27 +972,27 @@ static int radeon_do_init_cp(struct drm_device * dev, drm_radeon_init_t * init)
if (!dev_priv->sarea) {
DRM_ERROR("could not find sarea!\n");
radeon_do_cleanup_cp(dev);
- return -EINVAL;
+ return EINVAL;
}
dev_priv->cp_ring = drm_core_findmap(dev, init->ring_offset);
if (!dev_priv->cp_ring) {
DRM_ERROR("could not find cp ring region!\n");
radeon_do_cleanup_cp(dev);
- return -EINVAL;
+ return EINVAL;
}
dev_priv->ring_rptr = drm_core_findmap(dev, init->ring_rptr_offset);
if (!dev_priv->ring_rptr) {
DRM_ERROR("could not find ring read pointer!\n");
radeon_do_cleanup_cp(dev);
- return -EINVAL;
+ return EINVAL;
}
dev->agp_buffer_token = init->buffers_offset;
dev->agp_buffer_map = drm_core_findmap(dev, init->buffers_offset);
if (!dev->agp_buffer_map) {
DRM_ERROR("could not find dma buffer region!\n");
radeon_do_cleanup_cp(dev);
- return -EINVAL;
+ return EINVAL;
}
if (init->gart_textures_offset) {
@@ -1001,7 +1001,7 @@ static int radeon_do_init_cp(struct drm_device * dev, drm_radeon_init_t * init)
if (!dev_priv->gart_textures) {
DRM_ERROR("could not find GART texture region!\n");
radeon_do_cleanup_cp(dev);
- return -EINVAL;
+ return EINVAL;
}
}
@@ -1019,7 +1019,7 @@ static int radeon_do_init_cp(struct drm_device * dev, drm_radeon_init_t * init)
!dev->agp_buffer_map->handle) {
DRM_ERROR("could not find ioremap agp regions!\n");
radeon_do_cleanup_cp(dev);
- return -EINVAL;
+ return EINVAL;
}
} else
#endif
@@ -1173,14 +1173,14 @@ static int radeon_do_init_cp(struct drm_device * dev, drm_radeon_init_t * init)
DRM_ERROR
("Cannot use PCI Express without GART in FB memory\n");
radeon_do_cleanup_cp(dev);
- return -EINVAL;
+ return EINVAL;
}
}
if (!drm_ati_pcigart_init(dev, &dev_priv->gart_info)) {
DRM_ERROR("failed to init PCI GART!\n");
radeon_do_cleanup_cp(dev);
- return -ENOMEM;
+ return ENOMEM;
}
/* Turn on PCI GART */
@@ -1260,7 +1260,7 @@ static int radeon_do_resume_cp(struct drm_device * dev)
if (!dev_priv) {
DRM_ERROR("Called with no initialization\n");
- return -EINVAL;
+ return EINVAL;
}
DRM_DEBUG("Starting radeon_do_resume_cp()\n");
@@ -1305,7 +1305,7 @@ int radeon_cp_init(struct drm_device *dev, void *data, struct drm_file *file_pri
return radeon_do_cleanup_cp(dev);
}
- return -EINVAL;
+ return EINVAL;
}
int radeon_cp_start(struct drm_device *dev, void *data, struct drm_file *file_priv)
@@ -1432,7 +1432,7 @@ int radeon_cp_reset(struct drm_device *dev, void *data, struct drm_file *file_pr
if (!dev_priv) {
DRM_DEBUG("called before init done\n");
- return -EINVAL;
+ return EINVAL;
}
radeon_do_cp_reset(dev_priv);
@@ -1625,7 +1625,7 @@ int radeon_wait_ring(drm_radeon_private_t * dev_priv, int n)
radeon_status(dev_priv);
DRM_ERROR("failed!\n");
#endif
- return -EBUSY;
+ return EBUSY;
}
static int radeon_cp_get_buffers(struct drm_device *dev,
@@ -1638,16 +1638,16 @@ static int radeon_cp_get_buffers(struct drm_device *dev,
for (i = d->granted_count; i < d->request_count; i++) {
buf = radeon_freelist_get(dev);
if (!buf)
- return -EBUSY; /* NOTE: broken client */
+ return EBUSY; /* NOTE: broken client */
buf->file_priv = file_priv;
if (DRM_COPY_TO_USER(&d->request_indices[i], &buf->idx,
sizeof(buf->idx)))
- return -EFAULT;
+ return EFAULT;
if (DRM_COPY_TO_USER(&d->request_sizes[i], &buf->total,
sizeof(buf->total)))
- return -EFAULT;
+ return EFAULT;
d->granted_count++;
}
@@ -1667,7 +1667,7 @@ int radeon_cp_buffers(struct drm_device *dev, void *data, struct drm_file *file_
if (d->send_count != 0) {
DRM_ERROR("Process %d trying to send %d buffers via drmDMA\n",
DRM_CURRENTPID, d->send_count);
- return -EINVAL;
+ return EINVAL;
}
/* We'll send you buffers.
@@ -1675,7 +1675,7 @@ int radeon_cp_buffers(struct drm_device *dev, void *data, struct drm_file *file_
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;
+ return EINVAL;
}
d->granted_count = 0;
@@ -1694,7 +1694,7 @@ int radeon_driver_load(struct drm_device *dev, unsigned long flags)
dev_priv = drm_calloc(1, sizeof(drm_radeon_private_t), DRM_MEM_DRIVER);
if (dev_priv == NULL)
- return -ENOMEM;
+ return ENOMEM;
dev->dev_private = (void *)dev_priv;
dev_priv->flags = flags;