diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-06-26 05:02:01 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-06-26 05:02:01 +0000 |
commit | ea4e652cc3312f8f6141c3a07ef618d8b1637463 (patch) | |
tree | 31d0d1cc1fe5bb7f84b0d5a7d36a4fe34f1f5bc3 | |
parent | 8b446b8ecedd684e8c2d6b26cdbebadfa2d7ced7 (diff) |
drm/amdkfd: Use correct major in devcgroup check
From Lorenz Brun
48d3b36959153cc427964c519b5430024fd61e10 in linux 5.7.y/5.7.6
99c7b309472787026ce52fd2bc5d00630567a872 in mainline linux
-rw-r--r-- | sys/dev/pci/drm/amd/amdkfd/kfd_priv.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/amdkfd/kfd_priv.h b/sys/dev/pci/drm/amd/amdkfd/kfd_priv.h index ffbeaec08a0..ac401477e3c 100644 --- a/sys/dev/pci/drm/amd/amdkfd/kfd_priv.h +++ b/sys/dev/pci/drm/amd/amdkfd/kfd_priv.h @@ -40,6 +40,7 @@ #include <drm/drm_file.h> #include <drm/drm_drv.h> #include <drm/drm_device.h> +#include <drm/drm_ioctl.h> #include <kgd_kfd_interface.h> #include <linux/swap.h> @@ -1053,7 +1054,7 @@ static inline int kfd_devcgroup_check_permission(struct kfd_dev *kfd) #if defined(CONFIG_CGROUP_DEVICE) || defined(CONFIG_CGROUP_BPF) struct drm_device *ddev = kfd->ddev; - return devcgroup_check_permission(DEVCG_DEV_CHAR, ddev->driver->major, + return devcgroup_check_permission(DEVCG_DEV_CHAR, DRM_MAJOR, ddev->render->index, DEVCG_ACC_WRITE | DEVCG_ACC_READ); #else |