diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/1295-drm-amdkfd-Remove-deprecated-open_graphic_handle-ioc.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.14.71/1295-drm-amdkfd-Remove-deprecated-open_graphic_handle-ioc.patch | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/1295-drm-amdkfd-Remove-deprecated-open_graphic_handle-ioc.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/1295-drm-amdkfd-Remove-deprecated-open_graphic_handle-ioc.patch new file mode 100644 index 00000000..93c6e055 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/1295-drm-amdkfd-Remove-deprecated-open_graphic_handle-ioc.patch @@ -0,0 +1,98 @@ +From 6188bc491081c20339b96ef1950994dcfda89f65 Mon Sep 17 00:00:00 2001 +From: Felix Kuehling <Felix.Kuehling@amd.com> +Date: Fri, 26 May 2017 15:16:43 -0400 +Subject: [PATCH 1295/4131] drm/amdkfd: Remove deprecated open_graphic_handle + ioctl + +It was only implemented for Kaveri and was never upstreamed. There +are no open-source users of this interface. It has been superseded +by the pair of get_dmabuf_info and import_dmabuf, which is +implemented for all supported GPUs. + +Change-Id: Ib93cb0a46103d4f507e9b66df3ecf33821f8975f +Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> +--- + drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 60 -------------------------------- + 1 file changed, 60 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +index fe7de4c..64a4373 100644 +--- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c ++++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +@@ -1511,63 +1511,6 @@ static int kfd_ioctl_unmap_memory_from_gpu(struct file *filep, + return err; + } + +-static int kfd_ioctl_open_graphic_handle(struct file *filep, +- struct kfd_process *p, +- void *data) +-{ +- struct kfd_ioctl_open_graphic_handle_args *args = data; +- struct kfd_dev *dev; +- struct kfd_process_device *pdd; +- void *mem; +- int idr_handle; +- long err; +- +- dev = kfd_device_by_id(args->gpu_id); +- if (!dev) +- return -EINVAL; +- +- if (dev->device_info->asic_family != CHIP_KAVERI) { +- pr_debug("kfd_ioctl_open_graphic_handle only supported on KV\n"); +- return -EINVAL; +- } +- +- down_write(&p->lock); +- pdd = kfd_bind_process_to_device(dev, p); +- up_write(&p->lock); +- if (IS_ERR(pdd)) +- return PTR_ERR(pdd); +- +- err = dev->kfd2kgd->open_graphic_handle(dev->kgd, +- args->va_addr, +- (struct kgd_vm *) pdd->vm, +- args->graphic_device_fd, +- args->graphic_handle, +- (struct kgd_mem **) &mem); +- +- if (err != 0) +- return err; +- +- down_write(&p->lock); +- /*TODO: When open_graphic_handle is implemented, we need to create +- * the corresponding interval tree. We need to know the size of +- * the buffer through open_graphic_handle(). We use 1 for now. +- */ +- idr_handle = kfd_process_device_create_obj_handle(pdd, mem, +- args->va_addr, 1, NULL); +- up_write(&p->lock); +- if (idr_handle < 0) { +- /* FIXME: destroy_process_gpumem doesn't seem to be +- * implemented anywhere +- */ +- dev->kfd2kgd->destroy_process_gpumem(dev->kgd, mem); +- return -EFAULT; +- } +- +- args->handle = MAKE_HANDLE(args->gpu_id, idr_handle); +- +- return 0; +-} +- + static int kfd_ioctl_set_process_dgpu_aperture(struct file *filep, + struct kfd_process *p, void *data) + { +@@ -2084,9 +2027,6 @@ static const struct amdkfd_ioctl_desc amdkfd_ioctls[] = { + AMDKFD_IOCTL_DEF(AMDKFD_IOC_UNMAP_MEMORY_FROM_GPU, + kfd_ioctl_unmap_memory_from_gpu, 0), + +- AMDKFD_IOCTL_DEF(AMDKFD_IOC_OPEN_GRAPHIC_HANDLE, +- kfd_ioctl_open_graphic_handle, 0), +- + AMDKFD_IOCTL_DEF(AMDKFD_IOC_ALLOC_MEMORY_OF_SCRATCH, + kfd_ioctl_alloc_scratch_memory, 0), + +-- +2.7.4 + |