summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2018-02-28 06:56:36 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-03-01 16:53:28 -0500
commitdf2100018db1dba730937fe76464a8edf8ebf5dc (patch)
tree016ba84823e0752f665e3b67e569b8ef146ccfc6 /drivers/gpu/nvgpu/gk20a/channel_gk20a.c
parentaa1da74a75aca5d85d1a78546fec381423bf5836 (diff)
gpu: nvgpu: allocate separate client managed syncpoint for User
We right now allocate a nvgpu managed syncpoint in c->sync and share that with user space But to avoid conflicts between user space and kernel space increments allocate a separate "client managed" syncpoint for User space in c->user_sync Add new API nvgpu_nvhost_get_syncpt_client_managed() to request a client managed syncpoint from nvhost. Note that nvhost/nvgpu do not keep track of MAX/threshold value of this syncpoint Update gk20a_channel_syncpt_create() to receive a flag to indicate whether a User space syncpoint is required or not Unset NVGPU_SUPPORT_USER_SYNCPOINT for gp10b since we don't want to allocate double syncpoints per channel on that platform For gv11b, once we move to use user space submits, support for c->sync will be dropped so we keep using only one syncpoint per channel Bug 200326065 Jira NVGPU-179 Change-Id: I78d94de4276db1c897ea2a4fe4c2db8b2a179722 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1665828 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@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/gk20a/channel_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index 2f5ea301..2c98797d 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -438,6 +438,10 @@ static void gk20a_free_channel(struct channel_gk20a *ch, bool force)
438 gk20a_channel_sync_destroy(ch->sync); 438 gk20a_channel_sync_destroy(ch->sync);
439 ch->sync = NULL; 439 ch->sync = NULL;
440 } 440 }
441 if (ch->user_sync) {
442 gk20a_channel_sync_destroy(ch->user_sync);
443 ch->user_sync = NULL;
444 }
441 nvgpu_mutex_release(&ch->sync_lock); 445 nvgpu_mutex_release(&ch->sync_lock);
442 446
443 /* 447 /*
@@ -1147,7 +1151,7 @@ int gk20a_channel_alloc_gpfifo(struct channel_gk20a *c,
1147 1151
1148 if (!g->aggressive_sync_destroy_thresh) { 1152 if (!g->aggressive_sync_destroy_thresh) {
1149 nvgpu_mutex_acquire(&c->sync_lock); 1153 nvgpu_mutex_acquire(&c->sync_lock);
1150 c->sync = gk20a_channel_sync_create(c); 1154 c->sync = gk20a_channel_sync_create(c, false);
1151 if (!c->sync) { 1155 if (!c->sync) {
1152 err = -ENOMEM; 1156 err = -ENOMEM;
1153 nvgpu_mutex_release(&c->sync_lock); 1157 nvgpu_mutex_release(&c->sync_lock);