From 328552ddcc83032e31be262997a19cfddd586212 Mon Sep 17 00:00:00 2001 From: Chih-Wei Huang Date: Wed, 9 Feb 2011 10:43:27 +0800 Subject: [PATCH] drm: disable GPU authentication --- drivers/gpu/drm/Kconfig | 7 +++++++ drivers/gpu/drm/drm_fops.c | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index b493663c7ba7..12014803c7a3 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -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 diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c index c42e12cc2ddb..30e73960a99b 100644 --- a/drivers/gpu/drm/drm_fops.c +++ b/drivers/gpu/drm/drm_fops.c @@ -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); -- 2.11.0