Tighten permissions on some buffer manager ioctls.
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>
Thu, 25 Oct 2007 08:29:15 +0000 (10:29 +0200)
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>
Thu, 25 Oct 2007 08:29:15 +0000 (10:29 +0200)
Set bo init minor to 0.
Add the version function to header.

libdrm/xf86mm.h
linux-core/drm_drv.c
shared-core/drm.h

index b09234407002483e3a7e774c2d06b09e81a398b9..49ae2c046e110962b9ca860c8186b87c7d405416 100644 (file)
@@ -179,6 +179,9 @@ extern int drmBOSetStatus(int fd, drmBO *buf,
                          unsigned int hint, 
                          unsigned int desired_tile_stride,
                          unsigned int tile_info);
+extern int drmBOVersion(int fd, unsigned int *major,
+                       unsigned int *minor,
+                       unsigned int *patchlevel);
 
 
 #endif
index 330566bb47f357685c1ef7cba5a0721e9d9186ba..fe2b12006be14d6092017a9b8c5835d94b3508d9 100644 (file)
@@ -123,10 +123,14 @@ static struct drm_ioctl_desc drm_ioctls[] = {
        DRM_IOCTL_DEF(DRM_IOCTL_UPDATE_DRAW, drm_update_drawable_info, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
 
 
-       DRM_IOCTL_DEF(DRM_IOCTL_MM_INIT, drm_mm_init_ioctl, DRM_AUTH),
-       DRM_IOCTL_DEF(DRM_IOCTL_MM_TAKEDOWN, drm_mm_takedown_ioctl, DRM_AUTH),
-       DRM_IOCTL_DEF(DRM_IOCTL_MM_LOCK, drm_mm_lock_ioctl, DRM_AUTH),
-       DRM_IOCTL_DEF(DRM_IOCTL_MM_UNLOCK, drm_mm_unlock_ioctl, DRM_AUTH),
+       DRM_IOCTL_DEF(DRM_IOCTL_MM_INIT, drm_mm_init_ioctl, 
+                     DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
+       DRM_IOCTL_DEF(DRM_IOCTL_MM_TAKEDOWN, drm_mm_takedown_ioctl, 
+                     DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
+       DRM_IOCTL_DEF(DRM_IOCTL_MM_LOCK, drm_mm_lock_ioctl, 
+                     DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
+       DRM_IOCTL_DEF(DRM_IOCTL_MM_UNLOCK, drm_mm_unlock_ioctl, 
+                     DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
 
        DRM_IOCTL_DEF(DRM_IOCTL_FENCE_CREATE, drm_fence_create_ioctl, DRM_AUTH),
        DRM_IOCTL_DEF(DRM_IOCTL_FENCE_REFERENCE, drm_fence_reference_ioctl, DRM_AUTH),
index a48f347e5b8be321eaa1ea86ee68b87f9e4721e1..ae88ce61de7adcfffefcb244aa63b974d4232e4a 100644 (file)
@@ -759,7 +759,7 @@ struct drm_fence_arg {
 
 #define DRM_BO_INIT_MAGIC 0xfe769812
 #define DRM_BO_INIT_MAJOR 1
-#define DRM_BO_INIT_MINOR 1
+#define DRM_BO_INIT_MINOR 0
 #define DRM_BO_INIT_PATCH 0