summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/ioctl_channel.c
diff options
context:
space:
mode:
authorSourab Gupta <sourabg@nvidia.com>2018-04-10 02:35:09 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-04-11 13:16:09 -0400
commit585e33e4082baaf58d3714c42200f3c72bffa218 (patch)
tree0258a738f37e96aab4d11ae8ac3a4d78e3680c4b /drivers/gpu/nvgpu/common/linux/ioctl_channel.c
parentf3d22faef874901808746d957d2f97e6ca07a977 (diff)
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 <sourabg@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1691977 Reviewed-by: Konsta Holtta <kholtta@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> 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.c12
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
617static 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
617static int gk20a_channel_wait_semaphore(struct channel_gk20a *ch, 625static 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)