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>
This commit is contained in:
Deepak Nibade
2015-07-21 18:42:41 +05:30
committed by Sachin Nikam
parent 9617dcbf87
commit a969bc98ae

View File

@@ -155,22 +155,11 @@ static int gk20a_channel_syncpt_wait_fd(struct gk20a_channel_sync *s, int fd,
static void gk20a_channel_syncpt_update(void *priv, int nr_completed)
{
struct channel_gk20a *ch = priv;
struct gk20a *g = ch->g;
/* need busy for possible channel deletion */
if (gk20a_busy(ch->g->dev)) {
gk20a_err(dev_from_gk20a(ch->g),
"failed to busy while syncpt update");
/* Last gk20a_idle()s are in channel_update, so we shouldn't
* get here. If we do, the channel is badly broken now */
return;
}
gk20a_channel_update(ch, nr_completed);
/* note: channel_get() is in __gk20a_channel_syncpt_incr() */
gk20a_channel_update(ch, nr_completed);
gk20a_channel_put(ch);
gk20a_idle(g->dev);
}
static int __gk20a_channel_syncpt_incr(struct gk20a_channel_sync *s,