diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/driver_common.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/module.c | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/driver_common.c b/drivers/gpu/nvgpu/common/linux/driver_common.c index bd9a4e77..a00880ed 100644 --- a/drivers/gpu/nvgpu/common/linux/driver_common.c +++ b/drivers/gpu/nvgpu/common/linux/driver_common.c | |||
@@ -39,6 +39,7 @@ static void nvgpu_init_vars(struct gk20a *g) | |||
39 | gk20a_init_gr(g); | 39 | gk20a_init_gr(g); |
40 | 40 | ||
41 | init_rwsem(&g->busy_lock); | 41 | init_rwsem(&g->busy_lock); |
42 | init_rwsem(&g->deterministic_busy); | ||
42 | 43 | ||
43 | nvgpu_spinlock_init(&g->mc_enable_lock); | 44 | nvgpu_spinlock_init(&g->mc_enable_lock); |
44 | 45 | ||
diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c index 34a0ded6..cbad3993 100644 --- a/drivers/gpu/nvgpu/common/linux/module.c +++ b/drivers/gpu/nvgpu/common/linux/module.c | |||
@@ -298,6 +298,12 @@ int __gk20a_do_idle(struct device *dev, bool force_reset) | |||
298 | bool is_railgated; | 298 | bool is_railgated; |
299 | int err = 0; | 299 | int err = 0; |
300 | 300 | ||
301 | /* | ||
302 | * Hold back deterministic submits and changes to deterministic | ||
303 | * channels - this must be outside the power busy locks. | ||
304 | */ | ||
305 | gk20a_channel_deterministic_idle(g); | ||
306 | |||
301 | /* acquire busy lock to block other busy() calls */ | 307 | /* acquire busy lock to block other busy() calls */ |
302 | down_write(&g->busy_lock); | 308 | down_write(&g->busy_lock); |
303 | 309 | ||
@@ -403,6 +409,7 @@ fail_drop_usage_count: | |||
403 | fail_timeout: | 409 | fail_timeout: |
404 | nvgpu_mutex_release(&platform->railgate_lock); | 410 | nvgpu_mutex_release(&platform->railgate_lock); |
405 | up_write(&g->busy_lock); | 411 | up_write(&g->busy_lock); |
412 | gk20a_channel_deterministic_unidle(g); | ||
406 | return -EBUSY; | 413 | return -EBUSY; |
407 | } | 414 | } |
408 | 415 | ||
@@ -456,6 +463,8 @@ int __gk20a_do_unidle(struct device *dev) | |||
456 | nvgpu_mutex_release(&platform->railgate_lock); | 463 | nvgpu_mutex_release(&platform->railgate_lock); |
457 | up_write(&g->busy_lock); | 464 | up_write(&g->busy_lock); |
458 | 465 | ||
466 | gk20a_channel_deterministic_unidle(g); | ||
467 | |||
459 | return 0; | 468 | return 0; |
460 | } | 469 | } |
461 | 470 | ||