From d4b3b74044d9eff0ce5b34aa98b818cfbf6bfb78 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Tue, 16 Dec 2014 17:23:16 +0530 Subject: 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 Reviewed-on: http://git-master/r/664446 (cherry picked from commit bf1cd9b5551d27cb5cc468795cd147376f48e482) Reviewed-on: http://git-master/r/666218 Reviewed-by: Sachin Nikam --- drivers/gpu/nvgpu/gk20a/gk20a.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c') 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) ref_cnt = atomic_read(&pdev->dev.power.usage_count); } while (ref_cnt != 1 && time_before(jiffies, timeout)); - if (ref_cnt != 1) + if (ref_cnt != 1) { + gk20a_err(&pdev->dev, "failed to idle - refcount %d != 1\n", + ref_cnt); goto fail; + } /* * if GPU is now idle, we will have only one ref count @@ -1678,10 +1681,12 @@ int __gk20a_do_idle(struct platform_device *pdev) is_railgated = platform->is_railgated(pdev); } while (!is_railgated && time_before(jiffies, timeout)); - if (is_railgated) + if (is_railgated) { return 0; - else + } else { + gk20a_err(&pdev->dev, "failed to idle in timeout\n"); goto fail_timeout; + } } else { if (!platform->reset_assert || !platform->reset_deassert) goto fail_timeout; -- cgit v1.2.2