summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.h
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-04-14 18:40:47 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-26 12:14:26 -0400
commit71af78d2c22c6519b1ae2cbe3826f05e178d86f6 (patch)
treed5b1b51c9fe318caebea65b872153d2da977e278 /drivers/gpu/nvgpu/gk20a/gk20a.h
parent388113aa19c202edd261e49f8c169f0b31ade784 (diff)
gpu: nvgpu: Move has_syncpts to gk20a
Copy has_syncpts to struct gk20a at probe time, and access it from gk20a instead of platform_gk20a. JIRA NVGPU-16 Change-Id: I50329e3a5141a62e6e9828e97ea0747abc1ce1ee Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1463545 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index 0d1ae9d7..616c25ee 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -999,6 +999,10 @@ struct gk20a {
999 unsigned int aggressive_sync_destroy_thresh; 999 unsigned int aggressive_sync_destroy_thresh;
1000 bool aggressive_sync_destroy; 1000 bool aggressive_sync_destroy;
1001 1001
1002 bool has_syncpoints;
1003 /* Debugfs knob for forcing syncpt support off in runtime. */
1004 u32 disable_syncpoints;
1005
1002 u32 emc3d_ratio; 1006 u32 emc3d_ratio;
1003 1007
1004#ifdef CONFIG_DEBUG_FS 1008#ifdef CONFIG_DEBUG_FS
@@ -1497,4 +1501,13 @@ void gk20a_put(struct gk20a *g);
1497int gk20a_railgating_debugfs_init(struct device *dev); 1501int gk20a_railgating_debugfs_init(struct device *dev);
1498#endif 1502#endif
1499 1503
1504static inline bool gk20a_platform_has_syncpoints(struct gk20a *g)
1505{
1506#ifdef CONFIG_TEGRA_GK20A_NVHOST
1507 return g->has_syncpoints && !g->disable_syncpoints;
1508#else
1509 return false;
1510#endif
1511}
1512
1500#endif /* GK20A_H */ 1513#endif /* GK20A_H */