From a969bc98aeb414444e46a5807617f14410ca416c Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Tue, 21 Jul 2015 18:42:41 +0530 Subject: 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 Reviewed-on: http://git-master/r/778340 (cherry picked from commit 306282aa950201cf1ae91a5cc48d75719b179d19) Reviewed-on: http://git-master/r/779069 Reviewed-by: Sachin Nikam --- drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a') 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, 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; - } - /* note: channel_get() is in __gk20a_channel_syncpt_incr() */ gk20a_channel_update(ch, nr_completed); - gk20a_channel_put(ch); - gk20a_idle(g->dev); + /* note: channel_get() is in __gk20a_channel_syncpt_incr() */ + gk20a_channel_put(ch); } static int __gk20a_channel_syncpt_incr(struct gk20a_channel_sync *s, -- cgit v1.2.2