From 0334d7e30385187517c01a63a71dc11fa934c102 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Tue, 20 Oct 2015 16:54:22 +0530 Subject: gpu: nvgpu: unrailgate only if pm_domains not enabled Currently we unrailgate the GPU if railgating is not enabled or pm_domains are not enabled But in case if railgating is not enabled and pm_domains are enabled, we explicitly unrailgate GPU in gk20a_pm_init() and then runtime PM unrailgates it again when first user space request arrives - setting unrailgate refcount to 2 Now for gk20a_do_idle(), we need to railgate the GPU in fist call but that does not happen since unrailgate refcount != 1 hence, in case railgating is not enabled, we should unrailgate the GPU from only one place i.e. when first user space request arrives Bug 200142989 Bug 200137963 Bug 1678611 Reviewed-on: http://git-master/r/820321 (cherry picked from commit 452a1ff8da8e3f47caed2371440f9ad150bf8699) Change-Id: Ic9fe2267c9df5629315c30c1404c2b3044c1265a Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/822296 GVS: Gerrit_Virtual_Submit Reviewed-by: Sachin Nikam --- drivers/gpu/nvgpu/gk20a/gk20a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index fd7fdee1..a44ce996 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c @@ -1290,7 +1290,7 @@ static int gk20a_pm_init(struct platform_device *dev) * turn on the rail now. */ if (platform->can_railgate && IS_ENABLED(CONFIG_PM_GENERIC_DOMAINS)) _gk20a_pm_railgate(dev); - else + else if (!IS_ENABLED(CONFIG_PM_GENERIC_DOMAINS)) _gk20a_pm_unrailgate(dev); /* genpd will take care of runtime power management if it is enabled */ -- cgit v1.2.2