diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1188-drm-amdkfd-set-dev-kfd-permissions-to-0666-by-defaul.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1188-drm-amdkfd-set-dev-kfd-permissions-to-0666-by-defaul.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1188-drm-amdkfd-set-dev-kfd-permissions-to-0666-by-defaul.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1188-drm-amdkfd-set-dev-kfd-permissions-to-0666-by-defaul.patch new file mode 100644 index 00000000..41c5010c --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1188-drm-amdkfd-set-dev-kfd-permissions-to-0666-by-defaul.patch @@ -0,0 +1,46 @@ +From 4d94bd2c20faa5285410e44afaa72701ace39097 Mon Sep 17 00:00:00 2001 +From: Andres Rodriguez <andres.rodriguez@amd.com> +Date: Tue, 13 Sep 2016 16:04:22 -0400 +Subject: [PATCH 1188/4131] drm/amdkfd: set /dev/kfd permissions to 0666 by + default + +Set the default permissions of /dev/kfd to be more than just root +accessible 600. + +Change-Id: I282327f27c19b40f2b2f1542ec07c41b917654fd +Signed-off-by: Andres Rodriguez <andres.rodriguez@amd.com> +--- + drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +index c144752..cbc7f69 100644 +--- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c ++++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +@@ -62,6 +62,14 @@ static int kfd_char_dev_major = -1; + static struct class *kfd_class; + struct device *kfd_device; + ++static char *kfd_devnode(struct device *dev, umode_t *mode) ++{ ++ if (mode && dev->devt == MKDEV(kfd_char_dev_major, 0)) ++ *mode = 0666; ++ ++ return NULL; ++} ++ + int kfd_chardev_init(void) + { + int err = 0; +@@ -76,6 +84,8 @@ int kfd_chardev_init(void) + if (IS_ERR(kfd_class)) + goto err_class_create; + ++ kfd_class->devnode = kfd_devnode; ++ + kfd_device = device_create(kfd_class, NULL, + MKDEV(kfd_char_dev_major, 0), + NULL, kfd_dev_name); +-- +2.7.4 + |