diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/sched_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/sched_gk20a.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/sched_gk20a.c b/drivers/gpu/nvgpu/gk20a/sched_gk20a.c index 54dbcfd1..20cd1232 100644 --- a/drivers/gpu/nvgpu/gk20a/sched_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/sched_gk20a.c | |||
@@ -520,6 +520,7 @@ static int gk20a_sched_debugfs_show(struct seq_file *s, void *unused) | |||
520 | struct device *dev = s->private; | 520 | struct device *dev = s->private; |
521 | struct gk20a *g = gk20a_get_platform(dev)->g; | 521 | struct gk20a *g = gk20a_get_platform(dev)->g; |
522 | struct gk20a_sched_ctrl *sched = &g->sched_ctrl; | 522 | struct gk20a_sched_ctrl *sched = &g->sched_ctrl; |
523 | bool sched_busy = true; | ||
523 | 524 | ||
524 | int n = sched->bitmap_size / sizeof(u64); | 525 | int n = sched->bitmap_size / sizeof(u64); |
525 | int i; | 526 | int i; |
@@ -529,8 +530,13 @@ static int gk20a_sched_debugfs_show(struct seq_file *s, void *unused) | |||
529 | if (err) | 530 | if (err) |
530 | return err; | 531 | return err; |
531 | 532 | ||
533 | if (mutex_trylock(&sched->busy_lock)) { | ||
534 | sched_busy = false; | ||
535 | mutex_unlock(&sched->busy_lock); | ||
536 | } | ||
537 | |||
532 | seq_printf(s, "control_locked=%d\n", sched->control_locked); | 538 | seq_printf(s, "control_locked=%d\n", sched->control_locked); |
533 | seq_printf(s, "busy=%d\n", mutex_is_locked(&sched->busy_lock)); | 539 | seq_printf(s, "busy=%d\n", sched_busy); |
534 | seq_printf(s, "bitmap_size=%zu\n", sched->bitmap_size); | 540 | seq_printf(s, "bitmap_size=%zu\n", sched->bitmap_size); |
535 | 541 | ||
536 | mutex_lock(&sched->status_lock); | 542 | mutex_lock(&sched->status_lock); |