diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/platform_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/platform_gk20a.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h index 6966394f..e71dbf32 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * GK20A Platform (SoC) Interface | 2 | * GK20A Platform (SoC) Interface |
3 | * | 3 | * |
4 | * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/device.h> | 19 | #include <linux/device.h> |
20 | #include <linux/dma-attrs.h> | 20 | #include <linux/dma-attrs.h> |
21 | #include <linux/version.h> | ||
21 | 22 | ||
22 | #define GK20A_CLKS_MAX 4 | 23 | #define GK20A_CLKS_MAX 4 |
23 | 24 | ||
@@ -54,6 +55,12 @@ struct gk20a_platform { | |||
54 | 55 | ||
55 | /* Should be populated at probe. */ | 56 | /* Should be populated at probe. */ |
56 | bool has_syncpoints; | 57 | bool has_syncpoints; |
58 | /* Debugfs knob for forcing syncpt support off in runtime. */ | ||
59 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,0) | ||
60 | u32 disable_syncpoints; | ||
61 | #else | ||
62 | bool disable_syncpoints; | ||
63 | #endif | ||
57 | 64 | ||
58 | /* channel limit after which to start aggressive sync destroy */ | 65 | /* channel limit after which to start aggressive sync destroy */ |
59 | unsigned int aggressive_sync_destroy_thresh; | 66 | unsigned int aggressive_sync_destroy_thresh; |
@@ -265,7 +272,7 @@ extern struct gk20a_platform vgpu_tegra_platform; | |||
265 | static inline bool gk20a_platform_has_syncpoints(struct device *dev) | 272 | static inline bool gk20a_platform_has_syncpoints(struct device *dev) |
266 | { | 273 | { |
267 | struct gk20a_platform *p = dev_get_drvdata(dev); | 274 | struct gk20a_platform *p = dev_get_drvdata(dev); |
268 | return p->has_syncpoints; | 275 | return p->has_syncpoints && !p->disable_syncpoints; |
269 | } | 276 | } |
270 | 277 | ||
271 | int gk20a_tegra_busy(struct device *dev); | 278 | int gk20a_tegra_busy(struct device *dev); |