summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/via_dma.c13
-rw-r--r--shared-core/via_drv.h4
2 files changed, 12 insertions, 5 deletions
diff --git a/shared-core/via_dma.c b/shared-core/via_dma.c
index ce471a25..cfeb53b8 100644
--- a/shared-core/via_dma.c
+++ b/shared-core/via_dma.c
@@ -191,13 +191,20 @@ int via_dma_init(DRM_IOCTL_ARGS)
switch (init.func) {
case VIA_INIT_DMA:
- retcode = via_initialize(dev, dev_priv, &init);
+ if (!capable(CAP_SYS_ADMIN))
+ retcode = DRM_ERR(EPERM);
+ else
+ retcode = via_initialize(dev, dev_priv, &init);
break;
case VIA_CLEANUP_DMA:
- retcode = via_dma_cleanup(dev);
+ if (!capable(CAP_SYS_ADMIN))
+ retcode = DRM_ERR(EPERM);
+ else
+ retcode = via_dma_cleanup(dev);
break;
case VIA_DMA_INITIALIZED:
- retcode = (dev_priv->ring.virtual_start != NULL) ? 0: DRM_ERR( EFAULT );
+ retcode = (dev_priv->ring.virtual_start != NULL) ?
+ 0: DRM_ERR( EFAULT );
break;
default:
retcode = DRM_ERR(EINVAL);
diff --git a/shared-core/via_drv.h b/shared-core/via_drv.h
index 01d36e4b..b2422fcf 100644
--- a/shared-core/via_drv.h
+++ b/shared-core/via_drv.h
@@ -28,11 +28,11 @@
#define DRIVER_NAME "via"
#define DRIVER_DESC "VIA Unichrome"
-#define DRIVER_DATE "20041220"
+#define DRIVER_DATE "20041221"
#define DRIVER_MAJOR 2
#define DRIVER_MINOR 3
-#define DRIVER_PATCHLEVEL 2
+#define DRIVER_PATCHLEVEL 3
typedef struct drm_via_ring_buffer {
drm_map_t map;