summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2014-12-16 06:53:16 -0500
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:12:35 -0400
commitd4b3b74044d9eff0ce5b34aa98b818cfbf6bfb78 (patch)
tree271ec7b071ee080aec4a3fa89483ec6d70e86126 /drivers/gpu/nvgpu/gk20a/gk20a.c
parent235f3a3bcead5306e88e9beb0a24249f38c23935 (diff)
gpu: nvgpu: add error prints for do_idle() failure
Add error prints in gk20a_do_idle() to narrow down the failure point Bug 200064302 Change-Id: Iffe1151bdc200a79b88e273b3b01523f8e46d130 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/664446 (cherry picked from commit bf1cd9b5551d27cb5cc468795cd147376f48e482) Reviewed-on: http://git-master/r/666218 Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c11
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;