From 721315298b0d02cedfd186ce3b61da1acd4020b8 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 26 Oct 2017 15:44:43 -0700 Subject: gpu: nvgpu: Make alloc_obj_ctx args Linux specific Use nvgpu_alloc_obj_ctx_args structure specific to Linux code only. Pass the fields of the structure as separate arguments to all common functions. gr_ops_gp10b.h referred to the struct, but it's not used anywhere, so delete the file. JIRA NVGPU-259 Change-Id: Idba78d48de1c30f205a42da2fe47a9f8c03735f1 Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1586563 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/ioctl_channel.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux/ioctl_channel.c') diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c index ee4755c8..7814aea5 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c @@ -923,6 +923,10 @@ long gk20a_channel_ioctl(struct file *filp, case NVGPU_IOCTL_CHANNEL_SET_NVMAP_FD: break; case NVGPU_IOCTL_CHANNEL_ALLOC_OBJ_CTX: + { + struct nvgpu_alloc_obj_ctx_args *args = + (struct nvgpu_alloc_obj_ctx_args *)buf; + err = gk20a_busy(ch->g); if (err) { dev_err(dev, @@ -930,10 +934,10 @@ long gk20a_channel_ioctl(struct file *filp, __func__, cmd); break; } - err = ch->g->ops.gr.alloc_obj_ctx(ch, - (struct nvgpu_alloc_obj_ctx_args *)buf); + err = ch->g->ops.gr.alloc_obj_ctx(ch, args->class_num, args->flags); gk20a_idle(ch->g); break; + } case NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO_EX: { struct nvgpu_alloc_gpfifo_ex_args *alloc_gpfifo_ex_args = -- cgit v1.2.2