From 3378fbbb49f189038b98a97437511fa463b0693e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konsta=20H=C3=B6ltt=C3=A4?= Date: Tue, 7 Apr 2020 12:23:37 +0300 Subject: [PATCH] gpu: nvgpu: remove old ALLOC_GPFIFO MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO has not been used in years. Delete it. The SUBMIT_BIND (and ALLOC_GPFIFO_EX before it) ioctl shall be used instead. Jira NVGPU-4548 Change-Id: If707c1b131386d3662815518cd3689b596db5330 Signed-off-by: Konsta Hölttä Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2325788 Reviewed-by: automaticguardword Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Deepak Nibade Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/ioctl_channel.c | 36 ---------------------- include/uapi/linux/nvgpu.h | 10 ------ 2 files changed, 46 deletions(-) diff --git a/drivers/gpu/nvgpu/os/linux/ioctl_channel.c b/drivers/gpu/nvgpu/os/linux/ioctl_channel.c index 840c9e1bc..3d98f9994 100644 --- a/drivers/gpu/nvgpu/os/linux/ioctl_channel.c +++ b/drivers/gpu/nvgpu/os/linux/ioctl_channel.c @@ -614,22 +614,6 @@ static void nvgpu_get_gpfifo_ex_args( alloc_gpfifo_ex_args->flags); } -static void nvgpu_get_gpfifo_args( - struct nvgpu_alloc_gpfifo_args *alloc_gpfifo_args, - struct nvgpu_setup_bind_args *setup_bind_args) -{ - /* - * Kernel can insert one extra gpfifo entry before user - * submitted gpfifos and another one after, for internal usage. - * Triple the requested size. - */ - setup_bind_args->num_gpfifo_entries = - alloc_gpfifo_args->num_entries * 3; - setup_bind_args->num_inflight_jobs = 0; - setup_bind_args->flags = nvgpu_setup_bind_user_flags_to_common_flags( - alloc_gpfifo_args->flags); -} - static void nvgpu_get_fence_args( struct nvgpu_fence *fence_args_in, struct nvgpu_channel_fence *fence_args_out) @@ -1235,26 +1219,6 @@ long gk20a_channel_ioctl(struct file *filp, gk20a_idle(ch->g); break; } - case NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO: - { - struct nvgpu_alloc_gpfifo_args *alloc_gpfifo_args = - (struct nvgpu_alloc_gpfifo_args *)buf; - struct nvgpu_setup_bind_args setup_bind_args; - - nvgpu_get_gpfifo_args(alloc_gpfifo_args, &setup_bind_args); - - err = gk20a_busy(ch->g); - if (err) { - dev_err(dev, - "%s: failed to host gk20a for ioctl cmd: 0x%x", - __func__, cmd); - break; - } - - err = nvgpu_channel_setup_bind(ch, &setup_bind_args); - gk20a_idle(ch->g); - break; - } case NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO: err = gk20a_ioctl_channel_submit_gpfifo(ch, (struct nvgpu_submit_gpfifo_args *)buf); diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index d3ffc61dd..0cbfac844 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h @@ -1521,14 +1521,6 @@ struct nvgpu_alloc_obj_ctx_args { __u64 obj_id; /* output, used to free later */ }; -/* Deprecated. Use the SETUP_BIND IOCTL instead. */ -struct nvgpu_alloc_gpfifo_args { - __u32 num_entries; -#define NVGPU_ALLOC_GPFIFO_FLAGS_VPR_ENABLED (1 << 0) -#define NVGPU_ALLOC_GPFIFO_FLAGS_REPLAYABLE_FAULTS_ENABLE (1 << 2) - __u32 flags; -}; - /* Deprecated. Use the SETUP_BIND IOCTL instead. */ struct nvgpu_alloc_gpfifo_ex_args { __u32 num_entries; @@ -1779,8 +1771,6 @@ struct nvgpu_reschedule_runlist_args { _IOR(NVGPU_IOCTL_MAGIC, 12, struct nvgpu_get_param_args) #define NVGPU_IOCTL_CHANNEL_SET_TIMEOUT_EX \ _IOWR(NVGPU_IOCTL_MAGIC, 18, struct nvgpu_set_timeout_ex_args) -#define NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO \ - _IOW(NVGPU_IOCTL_MAGIC, 100, struct nvgpu_alloc_gpfifo_args) #define NVGPU_IOCTL_CHANNEL_WAIT \ _IOWR(NVGPU_IOCTL_MAGIC, 102, struct nvgpu_wait_args) #define NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO \