diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/gp10b_sysfs.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/gr_gp10b.c | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 3 |
3 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/gp10b_sysfs.h b/drivers/gpu/nvgpu/gp10b/gp10b_sysfs.h index 7c3d3400..786a3bb0 100644 --- a/drivers/gpu/nvgpu/gp10b/gp10b_sysfs.h +++ b/drivers/gpu/nvgpu/gp10b/gp10b_sysfs.h | |||
@@ -16,8 +16,12 @@ | |||
16 | #ifndef _GP10B_SYSFS_H_ | 16 | #ifndef _GP10B_SYSFS_H_ |
17 | #define _GP10B_SYSFS_H_ | 17 | #define _GP10B_SYSFS_H_ |
18 | 18 | ||
19 | #include <linux/version.h> | ||
20 | |||
19 | /*ECC Fuse*/ | 21 | /*ECC Fuse*/ |
22 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0) | ||
20 | #define FUSE_OPT_ECC_EN 0x358 | 23 | #define FUSE_OPT_ECC_EN 0x358 |
24 | #endif | ||
21 | 25 | ||
22 | void gp10b_create_sysfs(struct device *dev); | 26 | void gp10b_create_sysfs(struct device *dev); |
23 | void gp10b_remove_sysfs(struct device *dev); | 27 | void gp10b_remove_sysfs(struct device *dev); |
diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c index 0705d8b6..09c2558c 100644 --- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/clk.h> | 17 | #include <linux/clk.h> |
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/tegra-fuse.h> | 19 | #include <linux/tegra-fuse.h> |
20 | #include <linux/version.h> | ||
20 | 21 | ||
21 | #include <dt-bindings/soc/gm20b-fuse.h> | 22 | #include <dt-bindings/soc/gm20b-fuse.h> |
22 | #include <dt-bindings/soc/gp10b-fuse.h> | 23 | #include <dt-bindings/soc/gp10b-fuse.h> |
@@ -1533,8 +1534,13 @@ static void gr_gp10b_init_cyclestats(struct gk20a *g) | |||
1533 | 1534 | ||
1534 | static void gr_gp10b_set_gpc_tpc_mask(struct gk20a *g, u32 gpc_index) | 1535 | static void gr_gp10b_set_gpc_tpc_mask(struct gk20a *g, u32 gpc_index) |
1535 | { | 1536 | { |
1537 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0) | ||
1536 | tegra_fuse_writel(0x1, FUSE_FUSEBYPASS_0); | 1538 | tegra_fuse_writel(0x1, FUSE_FUSEBYPASS_0); |
1537 | tegra_fuse_writel(0x0, FUSE_WRITE_ACCESS_SW_0); | 1539 | tegra_fuse_writel(0x0, FUSE_WRITE_ACCESS_SW_0); |
1540 | #else | ||
1541 | tegra_fuse_control_write(0x1, FUSE_FUSEBYPASS_0); | ||
1542 | tegra_fuse_control_write(0x0, FUSE_WRITE_ACCESS_SW_0); | ||
1543 | #endif | ||
1538 | 1544 | ||
1539 | if (g->gr.gpc_tpc_mask[gpc_index] == 0x1) | 1545 | if (g->gr.gpc_tpc_mask[gpc_index] == 0x1) |
1540 | tegra_fuse_writel(0x2, FUSE_OPT_GPU_TPC0_DISABLE_0); | 1546 | tegra_fuse_writel(0x2, FUSE_OPT_GPU_TPC0_DISABLE_0); |
diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index 2699dd7a..f0137a70 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | #include <linux/printk.h> | 17 | #include <linux/printk.h> |
18 | #include <linux/version.h> | ||
18 | 19 | ||
19 | #include <linux/types.h> | 20 | #include <linux/types.h> |
20 | 21 | ||
@@ -46,7 +47,9 @@ | |||
46 | #include "gk20a/dbg_gpu_gk20a.h" | 47 | #include "gk20a/dbg_gpu_gk20a.h" |
47 | #include "gk20a/css_gr_gk20a.h" | 48 | #include "gk20a/css_gr_gk20a.h" |
48 | 49 | ||
50 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0) | ||
49 | #define FUSE_OPT_PRIV_SEC_EN_0 0x264 | 51 | #define FUSE_OPT_PRIV_SEC_EN_0 0x264 |
52 | #endif | ||
50 | #define PRIV_SECURITY_ENABLED 0x01 | 53 | #define PRIV_SECURITY_ENABLED 0x01 |
51 | 54 | ||
52 | static struct gpu_ops gp10b_ops = { | 55 | static struct gpu_ops gp10b_ops = { |