From 71af78d2c22c6519b1ae2cbe3826f05e178d86f6 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 14 Apr 2017 15:40:47 -0700 Subject: 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 Reviewed-on: http://git-master/r/1463545 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h') 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 { unsigned int aggressive_sync_destroy_thresh; bool aggressive_sync_destroy; + bool has_syncpoints; + /* Debugfs knob for forcing syncpt support off in runtime. */ + u32 disable_syncpoints; + u32 emc3d_ratio; #ifdef CONFIG_DEBUG_FS @@ -1497,4 +1501,13 @@ void gk20a_put(struct gk20a *g); int gk20a_railgating_debugfs_init(struct device *dev); #endif +static inline bool gk20a_platform_has_syncpoints(struct gk20a *g) +{ +#ifdef CONFIG_TEGRA_GK20A_NVHOST + return g->has_syncpoints && !g->disable_syncpoints; +#else + return false; +#endif +} + #endif /* GK20A_H */ -- cgit v1.2.2