diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/ioctl_channel.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_channel.c | 12 |
1 files changed, 11 insertions, 1 deletions
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( | |||
614 | alloc_gpfifo_args->flags); | 614 | alloc_gpfifo_args->flags); |
615 | } | 615 | } |
616 | 616 | ||
617 | static void nvgpu_get_fence_args( | ||
618 | struct nvgpu_fence *fence_args_in, | ||
619 | struct nvgpu_channel_fence *fence_args_out) | ||
620 | { | ||
621 | fence_args_out->id = fence_args_in->id; | ||
622 | fence_args_out->value = fence_args_in->value; | ||
623 | } | ||
624 | |||
617 | static int gk20a_channel_wait_semaphore(struct channel_gk20a *ch, | 625 | static int gk20a_channel_wait_semaphore(struct channel_gk20a *ch, |
618 | ulong id, u32 offset, | 626 | ulong id, u32 offset, |
619 | u32 payload, u32 timeout) | 627 | u32 payload, u32 timeout) |
@@ -760,6 +768,7 @@ static int gk20a_ioctl_channel_submit_gpfifo( | |||
760 | struct channel_gk20a *ch, | 768 | struct channel_gk20a *ch, |
761 | struct nvgpu_submit_gpfifo_args *args) | 769 | struct nvgpu_submit_gpfifo_args *args) |
762 | { | 770 | { |
771 | struct nvgpu_channel_fence fence; | ||
763 | struct gk20a_fence *fence_out; | 772 | struct gk20a_fence *fence_out; |
764 | struct fifo_profile_gk20a *profile = NULL; | 773 | struct fifo_profile_gk20a *profile = NULL; |
765 | 774 | ||
@@ -779,8 +788,9 @@ static int gk20a_ioctl_channel_submit_gpfifo( | |||
779 | !capable(CAP_SYS_NICE)) | 788 | !capable(CAP_SYS_NICE)) |
780 | return -EPERM; | 789 | return -EPERM; |
781 | 790 | ||
791 | nvgpu_get_fence_args(&args->fence, &fence); | ||
782 | ret = gk20a_submit_channel_gpfifo(ch, NULL, args, args->num_entries, | 792 | ret = gk20a_submit_channel_gpfifo(ch, NULL, args, args->num_entries, |
783 | args->flags, &args->fence, | 793 | args->flags, &fence, |
784 | &fence_out, false, profile); | 794 | &fence_out, false, profile); |
785 | 795 | ||
786 | if (ret) | 796 | if (ret) |