summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/ioctl_channel.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-10-26 18:44:43 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-10-29 14:02:32 -0400
commit721315298b0d02cedfd186ce3b61da1acd4020b8 (patch)
tree225df4a90d73c379a1ddfa60683edb3521f63739 /drivers/gpu/nvgpu/common/linux/ioctl_channel.c
parent4d2d890c01b94d10ad55643a4c2c159a98419efe (diff)
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 <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1586563 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/ioctl_channel.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/ioctl_channel.c8
1 files changed, 6 insertions, 2 deletions
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,
923 case NVGPU_IOCTL_CHANNEL_SET_NVMAP_FD: 923 case NVGPU_IOCTL_CHANNEL_SET_NVMAP_FD:
924 break; 924 break;
925 case NVGPU_IOCTL_CHANNEL_ALLOC_OBJ_CTX: 925 case NVGPU_IOCTL_CHANNEL_ALLOC_OBJ_CTX:
926 {
927 struct nvgpu_alloc_obj_ctx_args *args =
928 (struct nvgpu_alloc_obj_ctx_args *)buf;
929
926 err = gk20a_busy(ch->g); 930 err = gk20a_busy(ch->g);
927 if (err) { 931 if (err) {
928 dev_err(dev, 932 dev_err(dev,
@@ -930,10 +934,10 @@ long gk20a_channel_ioctl(struct file *filp,
930 __func__, cmd); 934 __func__, cmd);
931 break; 935 break;
932 } 936 }
933 err = ch->g->ops.gr.alloc_obj_ctx(ch, 937 err = ch->g->ops.gr.alloc_obj_ctx(ch, args->class_num, args->flags);
934 (struct nvgpu_alloc_obj_ctx_args *)buf);
935 gk20a_idle(ch->g); 938 gk20a_idle(ch->g);
936 break; 939 break;
940 }
937 case NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO_EX: 941 case NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO_EX:
938 { 942 {
939 struct nvgpu_alloc_gpfifo_ex_args *alloc_gpfifo_ex_args = 943 struct nvgpu_alloc_gpfifo_ex_args *alloc_gpfifo_ex_args =