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>
This commit is contained in:
Terje Bergstrom
2017-04-14 15:40:47 -07:00
committed by mobile promotions
parent 388113aa19
commit 71af78d2c2
7 changed files with 20 additions and 21 deletions

View File

@@ -49,12 +49,6 @@ struct gk20a_platform {
/* Should be populated at probe. */
bool has_syncpoints;
/* Debugfs knob for forcing syncpt support off in runtime. */
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,0)
u32 disable_syncpoints;
#else
bool disable_syncpoints;
#endif
/* channel limit after which to start aggressive sync destroy */
unsigned int aggressive_sync_destroy_thresh;
@@ -271,16 +265,6 @@ extern struct gk20a_platform vgpu_tegra_platform;
#endif
#endif
static inline bool gk20a_platform_has_syncpoints(struct device *dev)
{
#ifdef CONFIG_TEGRA_GK20A_NVHOST
struct gk20a_platform *p = dev_get_drvdata(dev);
return p->has_syncpoints && !p->disable_syncpoints;
#else
return false;
#endif
}
int gk20a_tegra_busy(struct device *dev);
void gk20a_tegra_idle(struct device *dev);
void gk20a_tegra_debug_dump(struct device *pdev);