summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/os/linux/channel.c
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2018-05-17 06:30:11 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-06-20 09:14:31 -0400
commit0ca69a482d15ccf22bacccc4964606969df144f6 (patch)
treef24433fba5d875aaf2e8edc29cac568fc392d929 /drivers/gpu/nvgpu/os/linux/channel.c
parent06ceff1240902c7f4cdb01dcbc9c988fc5fd9495 (diff)
gpu: nvgpu: add submit entry points for kernel and ioctl
gk20a_submit_channel_gpfifo() supports reading the gpfifo entries from either a kernel buffer or an userspace buffer in an ioctl. Add two separate entry points: one for the ioctl and another for any other kernel use. This shortens the function prototypes and simplifies and clarifies the call sites slightly. Jira NVGPU-705 Change-Id: If5141a459261a451f78cc50972f4c94d95ba44d1 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1730479 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux/channel.c')
-rw-r--r--drivers/gpu/nvgpu/os/linux/channel.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/channel.c b/drivers/gpu/nvgpu/os/linux/channel.c
index cc2d525d..a84c5a1c 100644
--- a/drivers/gpu/nvgpu/os/linux/channel.c
+++ b/drivers/gpu/nvgpu/os/linux/channel.c
@@ -752,7 +752,7 @@ out:
752 return 0; 752 return 0;
753} 753}
754 754
755int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, 755static int gk20a_submit_channel_gpfifo(struct channel_gk20a *c,
756 struct nvgpu_gpfifo_entry *gpfifo, 756 struct nvgpu_gpfifo_entry *gpfifo,
757 struct nvgpu_submit_gpfifo_args *args, 757 struct nvgpu_submit_gpfifo_args *args,
758 u32 num_entries, 758 u32 num_entries,
@@ -1019,3 +1019,25 @@ clean_up:
1019 return err; 1019 return err;
1020} 1020}
1021 1021
1022int gk20a_submit_channel_gpfifo_user(struct channel_gk20a *c,
1023 struct nvgpu_submit_gpfifo_args *args,
1024 u32 num_entries,
1025 u32 flags,
1026 struct nvgpu_channel_fence *fence,
1027 struct gk20a_fence **fence_out,
1028 struct fifo_profile_gk20a *profile)
1029{
1030 return gk20a_submit_channel_gpfifo(c, NULL, args, num_entries,
1031 flags, fence, fence_out, profile);
1032}
1033
1034int gk20a_submit_channel_gpfifo_kernel(struct channel_gk20a *c,
1035 struct nvgpu_gpfifo_entry *gpfifo,
1036 u32 num_entries,
1037 u32 flags,
1038 struct nvgpu_channel_fence *fence,
1039 struct gk20a_fence **fence_out)
1040{
1041 return gk20a_submit_channel_gpfifo(c, gpfifo, NULL, num_entries, flags,
1042 fence, fence_out, NULL);
1043}