diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/debug_gk20a.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 13 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/platform_gk20a.h | 16 |
5 files changed, 18 insertions, 21 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c index 3fb35e94..ddd94a2d 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | |||
@@ -966,7 +966,7 @@ void gk20a_channel_sync_destroy(struct gk20a_channel_sync *sync) | |||
966 | struct gk20a_channel_sync *gk20a_channel_sync_create(struct channel_gk20a *c) | 966 | struct gk20a_channel_sync *gk20a_channel_sync_create(struct channel_gk20a *c) |
967 | { | 967 | { |
968 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | 968 | #ifdef CONFIG_TEGRA_GK20A_NVHOST |
969 | if (gk20a_platform_has_syncpoints(c->g->dev)) | 969 | if (gk20a_platform_has_syncpoints(c->g)) |
970 | return gk20a_channel_syncpt_create(c); | 970 | return gk20a_channel_syncpt_create(c); |
971 | #endif | 971 | #endif |
972 | return gk20a_channel_semaphore_create(c); | 972 | return gk20a_channel_semaphore_create(c); |
@@ -974,7 +974,7 @@ struct gk20a_channel_sync *gk20a_channel_sync_create(struct channel_gk20a *c) | |||
974 | 974 | ||
975 | bool gk20a_channel_sync_needs_sync_framework(struct channel_gk20a *c) | 975 | bool gk20a_channel_sync_needs_sync_framework(struct channel_gk20a *c) |
976 | { | 976 | { |
977 | if (gk20a_platform_has_syncpoints(c->g->dev)) | 977 | if (gk20a_platform_has_syncpoints(c->g)) |
978 | return false; | 978 | return false; |
979 | return true; | 979 | return true; |
980 | } | 980 | } |
diff --git a/drivers/gpu/nvgpu/gk20a/debug_gk20a.c b/drivers/gpu/nvgpu/gk20a/debug_gk20a.c index d577c625..885f0a83 100644 --- a/drivers/gpu/nvgpu/gk20a/debug_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/debug_gk20a.c | |||
@@ -324,8 +324,8 @@ void gk20a_debug_init(struct device *dev, const char *debugfs_symlink) | |||
324 | debugfs_create_u32("ch_wdt_timeout_ms", S_IRUGO|S_IWUSR, | 324 | debugfs_create_u32("ch_wdt_timeout_ms", S_IRUGO|S_IWUSR, |
325 | platform->debugfs, &platform->ch_wdt_timeout_ms); | 325 | platform->debugfs, &platform->ch_wdt_timeout_ms); |
326 | 326 | ||
327 | debugfs_create_bool("disable_syncpoints", S_IRUGO|S_IWUSR, | 327 | debugfs_create_u32("disable_syncpoints", S_IRUGO|S_IWUSR, |
328 | platform->debugfs, &platform->disable_syncpoints); | 328 | platform->debugfs, &g->disable_syncpoints); |
329 | 329 | ||
330 | /* Legacy debugging API. */ | 330 | /* Legacy debugging API. */ |
331 | debugfs_create_u32("dbg_mask", S_IRUGO|S_IWUSR, | 331 | debugfs_create_u32("dbg_mask", S_IRUGO|S_IWUSR, |
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index b3f4e5fe..9dca86fb 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -455,7 +455,7 @@ int gk20a_init_gpu_characteristics(struct gk20a *g) | |||
455 | if (g->ops.mm.support_sparse && g->ops.mm.support_sparse(g)) | 455 | if (g->ops.mm.support_sparse && g->ops.mm.support_sparse(g)) |
456 | gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_SPARSE_ALLOCS; | 456 | gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_SPARSE_ALLOCS; |
457 | 457 | ||
458 | if (gk20a_platform_has_syncpoints(g->dev)) | 458 | if (gk20a_platform_has_syncpoints(g)) |
459 | gpu->flags |= NVGPU_GPU_FLAGS_HAS_SYNCPOINTS; | 459 | gpu->flags |= NVGPU_GPU_FLAGS_HAS_SYNCPOINTS; |
460 | 460 | ||
461 | gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_USERSPACE_MANAGED_AS; | 461 | gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_USERSPACE_MANAGED_AS; |
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); | |||
1497 | int gk20a_railgating_debugfs_init(struct device *dev); | 1501 | int gk20a_railgating_debugfs_init(struct device *dev); |
1498 | #endif | 1502 | #endif |
1499 | 1503 | ||
1504 | static 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 */ |
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h index 1115a5fb..8c93249a 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h | |||
@@ -49,12 +49,6 @@ struct gk20a_platform { | |||
49 | 49 | ||
50 | /* Should be populated at probe. */ | 50 | /* Should be populated at probe. */ |
51 | bool has_syncpoints; | 51 | bool has_syncpoints; |
52 | /* Debugfs knob for forcing syncpt support off in runtime. */ | ||
53 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,0) | ||
54 | u32 disable_syncpoints; | ||
55 | #else | ||
56 | bool disable_syncpoints; | ||
57 | #endif | ||
58 | 52 | ||
59 | /* channel limit after which to start aggressive sync destroy */ | 53 | /* channel limit after which to start aggressive sync destroy */ |
60 | unsigned int aggressive_sync_destroy_thresh; | 54 | unsigned int aggressive_sync_destroy_thresh; |
@@ -271,16 +265,6 @@ extern struct gk20a_platform vgpu_tegra_platform; | |||
271 | #endif | 265 | #endif |
272 | #endif | 266 | #endif |
273 | 267 | ||
274 | static inline bool gk20a_platform_has_syncpoints(struct device *dev) | ||
275 | { | ||
276 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | ||
277 | struct gk20a_platform *p = dev_get_drvdata(dev); | ||
278 | return p->has_syncpoints && !p->disable_syncpoints; | ||
279 | #else | ||
280 | return false; | ||
281 | #endif | ||
282 | } | ||
283 | |||
284 | int gk20a_tegra_busy(struct device *dev); | 268 | int gk20a_tegra_busy(struct device *dev); |
285 | void gk20a_tegra_idle(struct device *dev); | 269 | void gk20a_tegra_idle(struct device *dev); |
286 | void gk20a_tegra_debug_dump(struct device *pdev); | 270 | void gk20a_tegra_debug_dump(struct device *pdev); |