From fcb2f71be8b30b612a642b8512f7cfe2dea9d5fc Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Sat, 3 Dec 2011 19:15:24 +0200 Subject: video: tegra: host: Fix race in suspend/resume Implement proper mutex locking for nvhost_module_suspend(). At the same time the ordering of suspend is changed to first suspend clients and then host1x. This simplifies the power management code, and makes nvhost_resume() a no-op. Bug 906607 Change-Id: I60048773944369f73094140fb16682638966c731 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/68084 Reviewed-by: Simone Willett Tested-by: Simone Willett --- drivers/video/tegra/host/nvhost_acm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/video/tegra/host/nvhost_acm.h') diff --git a/drivers/video/tegra/host/nvhost_acm.h b/drivers/video/tegra/host/nvhost_acm.h index 06ef09ddf929..ce15c9916cd5 100644 --- a/drivers/video/tegra/host/nvhost_acm.h +++ b/drivers/video/tegra/host/nvhost_acm.h @@ -71,7 +71,7 @@ struct nvhost_module { struct clk *clk[NVHOST_MODULE_MAX_CLOCKS]; struct mutex lock; int powerstate; - atomic_t refcount; + int refcount; wait_queue_head_t idle; struct nvhost_module *parent; const struct nvhost_moduledesc *desc; -- cgit v1.2.3