diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/module.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/module.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c index b103fcea..741c86e7 100644 --- a/drivers/gpu/nvgpu/common/linux/module.c +++ b/drivers/gpu/nvgpu/common/linux/module.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/of.h> | 20 | #include <linux/of.h> |
21 | #include <linux/of_device.h> | 21 | #include <linux/of_device.h> |
22 | #include <linux/of_platform.h> | 22 | #include <linux/of_platform.h> |
23 | #include <linux/of_address.h> | ||
23 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
24 | #include <linux/pm_runtime.h> | 25 | #include <linux/pm_runtime.h> |
25 | #include <linux/reset.h> | 26 | #include <linux/reset.h> |
@@ -1107,6 +1108,7 @@ static int gk20a_probe(struct platform_device *dev) | |||
1107 | struct gk20a *gk20a; | 1108 | struct gk20a *gk20a; |
1108 | int err; | 1109 | int err; |
1109 | struct gk20a_platform *platform = NULL; | 1110 | struct gk20a_platform *platform = NULL; |
1111 | struct device_node *np; | ||
1110 | 1112 | ||
1111 | if (dev->dev.of_node) { | 1113 | if (dev->dev.of_node) { |
1112 | const struct of_device_id *match; | 1114 | const struct of_device_id *match; |
@@ -1147,6 +1149,12 @@ static int gk20a_probe(struct platform_device *dev) | |||
1147 | if (err) | 1149 | if (err) |
1148 | goto return_err; | 1150 | goto return_err; |
1149 | 1151 | ||
1152 | np = nvgpu_get_node(gk20a); | ||
1153 | if (of_dma_is_coherent(np)) { | ||
1154 | __nvgpu_set_enabled(gk20a, NVGPU_USE_COHERENT_SYSMEM, true); | ||
1155 | __nvgpu_set_enabled(gk20a, NVGPU_SUPPORT_IO_COHERENCE, true); | ||
1156 | } | ||
1157 | |||
1150 | if (nvgpu_platform_is_simulation(gk20a)) | 1158 | if (nvgpu_platform_is_simulation(gk20a)) |
1151 | __nvgpu_set_enabled(gk20a, NVGPU_IS_FMODEL, true); | 1159 | __nvgpu_set_enabled(gk20a, NVGPU_IS_FMODEL, true); |
1152 | 1160 | ||