summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/ioctl_channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/ioctl_channel.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/ioctl_channel.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c
index ab6ac9b9..0acaa61d 100644
--- a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c
+++ b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c
@@ -972,11 +972,11 @@ static int nvgpu_ioctl_channel_get_user_syncpoint(struct channel_gk20a *ch,
972 } 972 }
973 973
974 nvgpu_mutex_acquire(&ch->sync_lock); 974 nvgpu_mutex_acquire(&ch->sync_lock);
975 if (ch->sync) { 975 if (ch->user_sync) {
976 nvgpu_mutex_release(&ch->sync_lock); 976 nvgpu_mutex_release(&ch->sync_lock);
977 } else { 977 } else {
978 ch->sync = gk20a_channel_sync_create(ch); 978 ch->user_sync = gk20a_channel_sync_create(ch, true);
979 if (!ch->sync) { 979 if (!ch->user_sync) {
980 nvgpu_mutex_release(&ch->sync_lock); 980 nvgpu_mutex_release(&ch->sync_lock);
981 return -ENOMEM; 981 return -ENOMEM;
982 } 982 }
@@ -989,11 +989,11 @@ static int nvgpu_ioctl_channel_get_user_syncpoint(struct channel_gk20a *ch,
989 } 989 }
990 } 990 }
991 991
992 args->syncpoint_id = ch->sync->syncpt_id(ch->sync); 992 args->syncpoint_id = ch->user_sync->syncpt_id(ch->user_sync);
993 args->syncpoint_max = nvgpu_nvhost_syncpt_read_maxval(g->nvhost_dev, 993 args->syncpoint_max = nvgpu_nvhost_syncpt_read_maxval(g->nvhost_dev,
994 args->syncpoint_id); 994 args->syncpoint_id);
995 if (nvgpu_is_enabled(g, NVGPU_SUPPORT_SYNCPOINT_ADDRESS)) 995 if (nvgpu_is_enabled(g, NVGPU_SUPPORT_SYNCPOINT_ADDRESS))
996 args->gpu_va = ch->sync->syncpt_address(ch->sync); 996 args->gpu_va = ch->user_sync->syncpt_address(ch->user_sync);
997 else 997 else
998 args->gpu_va = 0; 998 args->gpu_va = 0;
999 999