diff options
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 | ||