diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-04-14 18:12:57 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-05-14 03:05:12 -0400 |
commit | 7acc993cdbcc202854f188e7f53646f387573a09 (patch) | |
tree | 61d213424ed8985973fa7ee3e4580c7b1b95bd3b /drivers/gpu/nvgpu/gk20a/gk20a.c | |
parent | ab22d66386e3a23e0dfe897bca25e01623f6d61c (diff) |
gpu: nvgpu: Move can_railgate & railgate_delay to gk20a
Copy can_railgate and railgate_delay to struct gk20a at probe time,
and access them from gk20a instead of platform_gk20a.
JIRA NVGPU-16
Change-Id: I63d4f4aff7eb17a167775fd7982a1b548bbca3a5
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1463543
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 7f110821..ea03ba98 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -397,15 +397,13 @@ void gk20a_driver_start_unload(struct gk20a *g) | |||
397 | int gk20a_wait_for_idle(struct device *dev) | 397 | int gk20a_wait_for_idle(struct device *dev) |
398 | { | 398 | { |
399 | struct gk20a *g = get_gk20a(dev); | 399 | struct gk20a *g = get_gk20a(dev); |
400 | struct gk20a_platform *platform; | ||
401 | int wait_length = 150; /* 3 second overall max wait. */ | 400 | int wait_length = 150; /* 3 second overall max wait. */ |
402 | int target_usage_count = 0; | 401 | int target_usage_count = 0; |
403 | 402 | ||
404 | if (!g) | 403 | if (!g) |
405 | return -ENODEV; | 404 | return -ENODEV; |
406 | 405 | ||
407 | platform = dev_get_drvdata(dev); | 406 | if (g->user_railgate_disabled) |
408 | if (platform->user_railgate_disabled) | ||
409 | target_usage_count = 1; | 407 | target_usage_count = 1; |
410 | 408 | ||
411 | while ((atomic_read(&g->usage_count) != target_usage_count) | 409 | while ((atomic_read(&g->usage_count) != target_usage_count) |
@@ -467,7 +465,7 @@ int gk20a_init_gpu_characteristics(struct gk20a *g) | |||
467 | * that depends on job tracking. (Here, fast means strictly no | 465 | * that depends on job tracking. (Here, fast means strictly no |
468 | * metadata, just the gpfifo contents are copied and gp_put updated). | 466 | * metadata, just the gpfifo contents are copied and gp_put updated). |
469 | */ | 467 | */ |
470 | if (!platform->can_railgate) | 468 | if (!g->can_railgate) |
471 | gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_DETERMINISTIC_SUBMIT_NO_JOBTRACKING; | 469 | gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_DETERMINISTIC_SUBMIT_NO_JOBTRACKING; |
472 | 470 | ||
473 | /* | 471 | /* |
@@ -476,7 +474,7 @@ int gk20a_init_gpu_characteristics(struct gk20a *g) | |||
476 | * provided that the user doesn't request anything that depends on | 474 | * provided that the user doesn't request anything that depends on |
477 | * deferred cleanup. | 475 | * deferred cleanup. |
478 | */ | 476 | */ |
479 | if (!platform->can_railgate | 477 | if (!g->can_railgate |
480 | && !gk20a_channel_sync_needs_sync_framework(g)) | 478 | && !gk20a_channel_sync_needs_sync_framework(g)) |
481 | gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_DETERMINISTIC_SUBMIT_FULL; | 479 | gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_DETERMINISTIC_SUBMIT_FULL; |
482 | 480 | ||