From 585e33e4082baaf58d3714c42200f3c72bffa218 Mon Sep 17 00:00:00 2001 From: Sourab Gupta Date: Tue, 10 Apr 2018 12:05:09 +0530 Subject: gpu: nvgpu: remove usage of nvgpu_fence Remove the usage of nvgpu_fence splattered across nvgpu, and replace with a struct defined in common code. The usage is still inside Linux, but this helps the subsequent unification efforts, e.g. to unify the submit path. VQRM-3465 Change-Id: Ic3737450123dfc5e1c40ca5b6b8d8f6b3070aa0d Signed-off-by: Sourab Gupta Reviewed-on: https://git-master.nvidia.com/r/1691977 Reviewed-by: Konsta Holtta GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/ioctl_channel.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (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 9b5a850a..c75c9244 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c @@ -614,6 +614,14 @@ static void nvgpu_get_gpfifo_args( alloc_gpfifo_args->flags); } +static void nvgpu_get_fence_args( + struct nvgpu_fence *fence_args_in, + struct nvgpu_channel_fence *fence_args_out) +{ + fence_args_out->id = fence_args_in->id; + fence_args_out->value = fence_args_in->value; +} + static int gk20a_channel_wait_semaphore(struct channel_gk20a *ch, ulong id, u32 offset, u32 payload, u32 timeout) @@ -760,6 +768,7 @@ static int gk20a_ioctl_channel_submit_gpfifo( struct channel_gk20a *ch, struct nvgpu_submit_gpfifo_args *args) { + struct nvgpu_channel_fence fence; struct gk20a_fence *fence_out; struct fifo_profile_gk20a *profile = NULL; @@ -779,8 +788,9 @@ static int gk20a_ioctl_channel_submit_gpfifo( !capable(CAP_SYS_NICE)) return -EPERM; + nvgpu_get_fence_args(&args->fence, &fence); ret = gk20a_submit_channel_gpfifo(ch, NULL, args, args->num_entries, - args->flags, &args->fence, + args->flags, &fence, &fence_out, false, profile); if (ret) -- cgit v1.2.2