diff options
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux/nvhost.c')
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/nvhost.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/nvhost.c b/drivers/gpu/nvgpu/os/linux/nvhost.c index ccb830cc..2becae54 100644 --- a/drivers/gpu/nvgpu/os/linux/nvhost.c +++ b/drivers/gpu/nvgpu/os/linux/nvhost.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <nvgpu/gk20a.h> | 22 | #include <nvgpu/gk20a.h> |
23 | #include <nvgpu/nvhost.h> | 23 | #include <nvgpu/nvhost.h> |
24 | #include <nvgpu/enabled.h> | ||
24 | 25 | ||
25 | #include "nvhost_priv.h" | 26 | #include "nvhost_priv.h" |
26 | 27 | ||
@@ -45,9 +46,9 @@ int nvgpu_get_nvhost_dev(struct gk20a *g) | |||
45 | } | 46 | } |
46 | 47 | ||
47 | } else { | 48 | } else { |
48 | if (g->has_syncpoints) { | 49 | if (nvgpu_has_syncpoints(g)) { |
49 | nvgpu_warn(g, "host1x reference not found. assuming no syncpoints support"); | 50 | nvgpu_warn(g, "host1x reference not found. assuming no syncpoints support"); |
50 | g->has_syncpoints = false; | 51 | __nvgpu_set_enabled(g, NVGPU_HAS_SYNCPOINTS, false); |
51 | } | 52 | } |
52 | return 0; | 53 | return 0; |
53 | } | 54 | } |
@@ -263,13 +264,13 @@ int nvgpu_nvhost_syncpt_init(struct gk20a *g) | |||
263 | { | 264 | { |
264 | int err = 0; | 265 | int err = 0; |
265 | 266 | ||
266 | if (!g->has_syncpoints) | 267 | if (!nvgpu_has_syncpoints(g)) |
267 | return -ENOSYS; | 268 | return -ENOSYS; |
268 | 269 | ||
269 | err = nvgpu_get_nvhost_dev(g); | 270 | err = nvgpu_get_nvhost_dev(g); |
270 | if (err) { | 271 | if (err) { |
271 | nvgpu_err(g, "host1x device not available"); | 272 | nvgpu_err(g, "host1x device not available"); |
272 | g->has_syncpoints = false; | 273 | __nvgpu_set_enabled(g, NVGPU_HAS_SYNCPOINTS, false); |
273 | return -ENOSYS; | 274 | return -ENOSYS; |
274 | } | 275 | } |
275 | 276 | ||
@@ -279,7 +280,7 @@ int nvgpu_nvhost_syncpt_init(struct gk20a *g) | |||
279 | &g->syncpt_unit_size); | 280 | &g->syncpt_unit_size); |
280 | if (err) { | 281 | if (err) { |
281 | nvgpu_err(g, "Failed to get syncpt interface"); | 282 | nvgpu_err(g, "Failed to get syncpt interface"); |
282 | g->has_syncpoints = false; | 283 | __nvgpu_set_enabled(g, NVGPU_HAS_SYNCPOINTS, false); |
283 | return -ENOSYS; | 284 | return -ENOSYS; |
284 | } | 285 | } |
285 | 286 | ||