From 88ca9b50f6a1f62986dad4c72f023a5f757b967f Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Mon, 19 May 2014 09:17:05 +0300 Subject: gpu: nvgpu: Balance usage count on resume fail If PM runtime resume fails, pm_runtime_get_sync() still increments the usage count. Balance the usage count by decrementing it on fail. Bug 200003289 Change-Id: I127d2697ff2601d4884a4ecfdec8ad50894bf7d0 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/411285 (cherry picked from commit 736846ff999bb9d1ca3340fc02ab49f8c65c4145) Reviewed-on: http://git-master/r/411473 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/gk20a/gk20a.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index f04e9187..2e406474 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c @@ -1514,6 +1514,8 @@ int gk20a_busy(struct platform_device *pdev) #ifdef CONFIG_PM_RUNTIME ret = pm_runtime_get_sync(&pdev->dev); + if (ret < 0) + pm_runtime_put_noidle(&pdev->dev); #endif gk20a_scale_notify_busy(pdev); -- cgit v1.2.2