OSDN Git Service

drm: disable GPU authentication
authorChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 9 Feb 2011 02:43:27 +0000 (10:43 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Mon, 25 Jun 2012 13:03:07 +0000 (21:03 +0800)
drivers/gpu/drm/Kconfig
drivers/gpu/drm/drm_fops.c

index b493663..1201480 100644 (file)
@@ -19,6 +19,13 @@ menuconfig DRM
          details.  You should also select and configure AGP
          (/dev/agpgart) support if it is available for your platform.
 
+config NO_GPU_AUTHENTICATION
+       bool "Disable GPU authentication"
+       depends on DRM
+       default n
+       help
+         Choose this option if you want to disable GPU authentication.
+
 config DRM_KMS_HELPER
        tristate
        depends on DRM
index c42e12c..30e7396 100644 (file)
@@ -252,7 +252,11 @@ static int drm_open_helper(struct inode *inode, struct file *filp,
        priv->minor = idr_find(&drm_minors_idr, minor_id);
        priv->ioctl_count = 0;
        /* for compatibility root is always authenticated */
+#ifdef CONFIG_NO_GPU_AUTHENTICATION
+       priv->authenticated = 1;
+#else
        priv->authenticated = capable(CAP_SYS_ADMIN);
+#endif
        priv->lock_count = 0;
 
        INIT_LIST_HEAD(&priv->lhead);