From 2219f38727ffa17291e15c1898bd3e65f43d09fd Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Tue, 7 Jun 2016 13:20:05 +0530 Subject: gpu: nvgpu: take power refcount in ISR We sometimes see race conditions where power refcount is zero during ISR or bottom half. If bottom half calls gk20a_busy(), it will lead to boot up of GPU, but it is also possible that we are already trying to poweroff GPU since power refcount is zero Fix this by taking a power refcount with gk20a_busy_noresume() in ISR and then dropping this refcount at the end of bottom half Add new API gk20a_idle_nosuspend() to drop a refcount without initiating suspend Bug 200198908 Bug 1770522 Change-Id: Iec3d4dc8d468f49b71919d2bbc327da48b97bcab Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/1160035 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gk20a.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index b7f3f6f1..c7d12f86 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -1060,6 +1060,7 @@ void gk20a_remove_sysfs(struct device *dev); void gk20a_busy_noresume(struct device *dev); int __must_check gk20a_busy(struct device *dev); +void gk20a_idle_nosuspend(struct device *dev); void gk20a_idle(struct device *dev); void gk20a_disable(struct gk20a *g, u32 units); void gk20a_enable(struct gk20a *g, u32 units); -- cgit v1.2.2