From a870ff1d294126a3b46db4e0fdc14276035a2840 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Thu, 2 Oct 2014 15:25:53 +0300 Subject: gpu: nvgpu: Remove get and put client routines gk20a_get_client() and gk20a_put_client() routines are effectively dead code. The GPU has been using pm_runtime for reference counting whether the device should be turned on or off, and gk20a_get_client() and gk20a_put_client() have had no positive effect on the behaviour. In worst case these functions trigger some issues as they may trigger code paths that should not be run. There is also a race between get/put and busy/idle. This patch removes the functions and reworks as_gk20a.c to correctly use gk20a_busy()/gk20a_idle() where put/get was required. Additionally, finalize_poweron() is moved to gk20a_busy(), similarly as it was with gk20a_get_client(). If pm_runtime is not in use, the device is only powered on and never off. Currently this affects vgpu power management since it does not use pm_runtime yet. Bug 1562096 Change-Id: I3162655f83457e9caccd9264eed36b5d51e60c52 Signed-off-by: Arto Merilainen Signed-off-by: Konsta Holtta Reviewed-on: http://git-master/r/414998 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Seshendra Gadagottu Tested-by: Seshendra Gadagottu GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gk20a.h | 2 -- 1 file changed, 2 deletions(-) (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 04a4cf66..20afd2bd 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -710,8 +710,6 @@ void gk20a_idle(struct platform_device *pdev); void gk20a_disable(struct gk20a *g, u32 units); void gk20a_enable(struct gk20a *g, u32 units); void gk20a_reset(struct gk20a *g, u32 units); -int gk20a_get_client(struct gk20a *g); -void gk20a_put_client(struct gk20a *g); int __gk20a_do_idle(struct platform_device *pdev); int __gk20a_do_unidle(struct platform_device *pdev); -- cgit v1.2.2