From 0ca69a482d15ccf22bacccc4964606969df144f6 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Thu, 17 May 2018 13:30:11 +0300 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1730479 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/channel.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/os/linux/channel.c') 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: return 0; } -int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, +static int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, struct nvgpu_gpfifo_entry *gpfifo, struct nvgpu_submit_gpfifo_args *args, u32 num_entries, @@ -1019,3 +1019,25 @@ clean_up: return err; } +int gk20a_submit_channel_gpfifo_user(struct channel_gk20a *c, + struct nvgpu_submit_gpfifo_args *args, + u32 num_entries, + u32 flags, + struct nvgpu_channel_fence *fence, + struct gk20a_fence **fence_out, + struct fifo_profile_gk20a *profile) +{ + return gk20a_submit_channel_gpfifo(c, NULL, args, num_entries, + flags, fence, fence_out, profile); +} + +int gk20a_submit_channel_gpfifo_kernel(struct channel_gk20a *c, + struct nvgpu_gpfifo_entry *gpfifo, + u32 num_entries, + u32 flags, + struct nvgpu_channel_fence *fence, + struct gk20a_fence **fence_out) +{ + return gk20a_submit_channel_gpfifo(c, gpfifo, NULL, num_entries, flags, + fence, fence_out, NULL); +} -- cgit v1.2.2