diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-05-12 06:58:47 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-05-15 11:34:26 -0400 |
commit | 326ed94d7ad0948cb899cbec240b14085e431b40 (patch) | |
tree | c5c6ed35047e5d8aa12dd729c471ab85ff818b29 /drivers | |
parent | 6070d99a502e71b7290a444556370d3956f1263b (diff) |
gpu: nvgpu: skip taking g->busy_lock in gk20a_idle
We use g->busy_lock in gk20a_do_idle() to prevent submitting
more jobs to h/w and to wait for currently running jobs to
finish
But requesting this lock in gk20a_idle() prevents decrementing
runtime counter and hence gk20a_do_idle() can timeout with
below prints
[ 148.904739] gk20a 17000000.gp10b: Timeout detected @
gk20a_do_idle+0x30/0x38
[ 148.912185] gk20a 17000000.gp10b: __gk20a_do_idle: failed to idle -
refcount 4 != 1
Hence skip requesting this lock in gk20a_idle()
Bug 200294536
Change-Id: I060075fdee1b68e1b5fa11baa44a3f5ce4917d94
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1480756
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/module.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c index 708190f2..72719297 100644 --- a/drivers/gpu/nvgpu/common/linux/module.c +++ b/drivers/gpu/nvgpu/common/linux/module.c | |||
@@ -109,12 +109,11 @@ void gk20a_idle(struct gk20a *g) | |||
109 | struct device *dev; | 109 | struct device *dev; |
110 | 110 | ||
111 | atomic_dec(&g->usage_count); | 111 | atomic_dec(&g->usage_count); |
112 | down_read(&g->busy_lock); | ||
113 | 112 | ||
114 | dev = g->dev; | 113 | dev = g->dev; |
115 | 114 | ||
116 | if (!(dev && gk20a_can_busy(g))) | 115 | if (!(dev && gk20a_can_busy(g))) |
117 | goto fail; | 116 | return; |
118 | 117 | ||
119 | if (pm_runtime_enabled(dev)) { | 118 | if (pm_runtime_enabled(dev)) { |
120 | #ifdef CONFIG_PM | 119 | #ifdef CONFIG_PM |
@@ -128,8 +127,6 @@ void gk20a_idle(struct gk20a *g) | |||
128 | } else { | 127 | } else { |
129 | gk20a_scale_notify_idle(dev); | 128 | gk20a_scale_notify_idle(dev); |
130 | } | 129 | } |
131 | fail: | ||
132 | up_read(&g->busy_lock); | ||
133 | } | 130 | } |
134 | 131 | ||
135 | int gk20a_pm_finalize_poweron(struct device *dev) | 132 | int gk20a_pm_finalize_poweron(struct device *dev) |