summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2017-03-15 09:10:43 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-03-23 11:04:23 -0400
commit33f637585ecd617a9f4423f56e2aa6df0691ac64 (patch)
treee6f67da9b18ec64cae039b6af76c6abb27a70323 /drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
parent7505a759542c2d95e5abb42d44b8fb6afda74a87 (diff)
gpu: nvgpu: split nvhost dependency on plat interface
Add CONFIG_TEGRA_GK20A_NVHOST and remove the TEGRA_GRHOST || TEGRA_HOST1X dependency in CONFIG_TEGRA_GK20A to allow using the iGPU without the nvhost driver. Use the new config to guard syncpt-related code. Also make TEGRA_ACR depend on GK20A too so that it aligns properly under gk20a in menuconfig. Bug 1853519 Change-Id: I9e9b0a7915d000aae7930821627b7a01d08d3f5c Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/1321303 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
index 11448094..ae22ee7d 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
@@ -31,11 +31,8 @@
31#include "../drivers/staging/android/sync.h" 31#include "../drivers/staging/android/sync.h"
32#endif 32#endif
33 33
34#ifdef CONFIG_TEGRA_GK20A 34#ifdef CONFIG_TEGRA_GK20A_NVHOST
35#include <linux/nvhost.h> 35#include <linux/nvhost.h>
36#endif
37
38#ifdef CONFIG_TEGRA_GK20A
39 36
40struct gk20a_channel_syncpt { 37struct gk20a_channel_syncpt {
41 struct gk20a_channel_sync ops; 38 struct gk20a_channel_sync ops;
@@ -382,7 +379,7 @@ gk20a_channel_syncpt_create(struct channel_gk20a *c)
382 379
383 return &sp->ops; 380 return &sp->ops;
384} 381}
385#endif /* CONFIG_TEGRA_GK20A */ 382#endif /* CONFIG_TEGRA_GK20A_NVHOST */
386 383
387struct gk20a_channel_semaphore { 384struct gk20a_channel_semaphore {
388 struct gk20a_channel_sync ops; 385 struct gk20a_channel_sync ops;
@@ -972,7 +969,7 @@ void gk20a_channel_sync_destroy(struct gk20a_channel_sync *sync)
972 969
973struct gk20a_channel_sync *gk20a_channel_sync_create(struct channel_gk20a *c) 970struct gk20a_channel_sync *gk20a_channel_sync_create(struct channel_gk20a *c)
974{ 971{
975#ifdef CONFIG_TEGRA_GK20A 972#ifdef CONFIG_TEGRA_GK20A_NVHOST
976 if (gk20a_platform_has_syncpoints(c->g->dev)) 973 if (gk20a_platform_has_syncpoints(c->g->dev))
977 return gk20a_channel_syncpt_create(c); 974 return gk20a_channel_syncpt_create(c);
978#endif 975#endif
@@ -981,9 +978,7 @@ struct gk20a_channel_sync *gk20a_channel_sync_create(struct channel_gk20a *c)
981 978
982bool gk20a_channel_sync_needs_sync_framework(struct channel_gk20a *c) 979bool gk20a_channel_sync_needs_sync_framework(struct channel_gk20a *c)
983{ 980{
984#ifdef CONFIG_TEGRA_GK20A
985 if (gk20a_platform_has_syncpoints(c->g->dev)) 981 if (gk20a_platform_has_syncpoints(c->g->dev))
986 return false; 982 return false;
987#endif
988 return true; 983 return true;
989} 984}