diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 2b8276e3..a13d54b3 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -1654,8 +1654,11 @@ int __gk20a_do_idle(struct platform_device *pdev) | |||
1654 | ref_cnt = atomic_read(&pdev->dev.power.usage_count); | 1654 | ref_cnt = atomic_read(&pdev->dev.power.usage_count); |
1655 | } while (ref_cnt != 1 && time_before(jiffies, timeout)); | 1655 | } while (ref_cnt != 1 && time_before(jiffies, timeout)); |
1656 | 1656 | ||
1657 | if (ref_cnt != 1) | 1657 | if (ref_cnt != 1) { |
1658 | gk20a_err(&pdev->dev, "failed to idle - refcount %d != 1\n", | ||
1659 | ref_cnt); | ||
1658 | goto fail; | 1660 | goto fail; |
1661 | } | ||
1659 | 1662 | ||
1660 | /* | 1663 | /* |
1661 | * if GPU is now idle, we will have only one ref count | 1664 | * if GPU is now idle, we will have only one ref count |
@@ -1678,10 +1681,12 @@ int __gk20a_do_idle(struct platform_device *pdev) | |||
1678 | is_railgated = platform->is_railgated(pdev); | 1681 | is_railgated = platform->is_railgated(pdev); |
1679 | } while (!is_railgated && time_before(jiffies, timeout)); | 1682 | } while (!is_railgated && time_before(jiffies, timeout)); |
1680 | 1683 | ||
1681 | if (is_railgated) | 1684 | if (is_railgated) { |
1682 | return 0; | 1685 | return 0; |
1683 | else | 1686 | } else { |
1687 | gk20a_err(&pdev->dev, "failed to idle in timeout\n"); | ||
1684 | goto fail_timeout; | 1688 | goto fail_timeout; |
1689 | } | ||
1685 | } else { | 1690 | } else { |
1686 | if (!platform->reset_assert || !platform->reset_deassert) | 1691 | if (!platform->reset_assert || !platform->reset_deassert) |
1687 | goto fail_timeout; | 1692 | goto fail_timeout; |