summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2015-07-21 09:12:41 -0400
committerSachin Nikam <snikam@nvidia.com>2015-08-07 01:20:08 -0400
commita969bc98aeb414444e46a5807617f14410ca416c (patch)
tree21a96d367f1b2037b6fbeaa1050d160b9ae5d1fb /drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
parent9617dcbf875c27434df9082855114278836f2c18 (diff)
gpu: nvgpu: remove gk20a_busy() from channel_syncpt_update()
gk20a_busy() was added to gk20a_channel_syncpt_update() for possible case of channel deletion But API to delete a channel (i.e. gk20a_free_channel()) is already called in paths which ensure gk20a_busy() is called before deleting the channel Hence, remove redundant gk20a_busy()/idle() calls This also fixes a deadlock scenario with VPR resize use case Bug 200128257 Bug 1645760 Bug 200114947 Bug 200124519 Change-Id: I05dc739b3be88af2ba22b0a667e5004d8100bf6f Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/778340 (cherry picked from commit 306282aa950201cf1ae91a5cc48d75719b179d19) Reviewed-on: http://git-master/r/779069 Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
index 7a707fbd..be9f1c70 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
@@ -155,22 +155,11 @@ static int gk20a_channel_syncpt_wait_fd(struct gk20a_channel_sync *s, int fd,
155static void gk20a_channel_syncpt_update(void *priv, int nr_completed) 155static void gk20a_channel_syncpt_update(void *priv, int nr_completed)
156{ 156{
157 struct channel_gk20a *ch = priv; 157 struct channel_gk20a *ch = priv;
158 struct gk20a *g = ch->g;
159
160 /* need busy for possible channel deletion */
161 if (gk20a_busy(ch->g->dev)) {
162 gk20a_err(dev_from_gk20a(ch->g),
163 "failed to busy while syncpt update");
164 /* Last gk20a_idle()s are in channel_update, so we shouldn't
165 * get here. If we do, the channel is badly broken now */
166 return;
167 }
168 158
169 /* note: channel_get() is in __gk20a_channel_syncpt_incr() */
170 gk20a_channel_update(ch, nr_completed); 159 gk20a_channel_update(ch, nr_completed);
171 gk20a_channel_put(ch);
172 160
173 gk20a_idle(g->dev); 161 /* note: channel_get() is in __gk20a_channel_syncpt_incr() */
162 gk20a_channel_put(ch);
174} 163}
175 164
176static int __gk20a_channel_syncpt_incr(struct gk20a_channel_sync *s, 165static int __gk20a_channel_syncpt_incr(struct gk20a_channel_sync *s,