summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/sync/channel_sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/sync/channel_sync.c')
-rw-r--r--drivers/gpu/nvgpu/common/sync/channel_sync.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/sync/channel_sync.c b/drivers/gpu/nvgpu/common/sync/channel_sync.c
index 116e5701..b40de834 100644
--- a/drivers/gpu/nvgpu/common/sync/channel_sync.c
+++ b/drivers/gpu/nvgpu/common/sync/channel_sync.c
@@ -658,7 +658,7 @@ struct nvgpu_channel_sync *nvgpu_channel_sync_create(struct channel_gk20a *c,
658 bool user_managed) 658 bool user_managed)
659{ 659{
660#ifdef CONFIG_TEGRA_GK20A_NVHOST 660#ifdef CONFIG_TEGRA_GK20A_NVHOST
661 if (gk20a_platform_has_syncpoints(c->g)) 661 if (nvgpu_has_syncpoints(c->g))
662 return channel_sync_syncpt_create(c, user_managed); 662 return channel_sync_syncpt_create(c, user_managed);
663#endif 663#endif
664 return channel_sync_semaphore_create(c, user_managed); 664 return channel_sync_semaphore_create(c, user_managed);
@@ -666,5 +666,15 @@ struct nvgpu_channel_sync *nvgpu_channel_sync_create(struct channel_gk20a *c,
666 666
667bool nvgpu_channel_sync_needs_os_fence_framework(struct gk20a *g) 667bool nvgpu_channel_sync_needs_os_fence_framework(struct gk20a *g)
668{ 668{
669 return !gk20a_platform_has_syncpoints(g); 669 return !nvgpu_has_syncpoints(g);
670}
671
672bool nvgpu_has_syncpoints(struct gk20a *g)
673{
674#ifdef CONFIG_TEGRA_GK20A_NVHOST
675 return nvgpu_is_enabled(g, NVGPU_HAS_SYNCPOINTS) &&
676 !g->disable_syncpoints;
677#else
678 return false;
679#endif
670} 680}