From c184b17f9a22b198aeb4885b3ca6482135670dd0 Mon Sep 17 00:00:00 2001 From: Seema Khowala Date: Wed, 19 Apr 2017 10:40:23 -0700 Subject: gpu: nvgpu: don't shutdown gpu if it is not powered up gk20a_pm_shutdown should return if gpu is not powered on Bug 1910649 Change-Id: I6ff52084e2783573e51e655b2b0ffa0f4c818706 Signed-off-by: Seema Khowala Reviewed-on: http://git-master/r/1465789 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/module.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/gpu/nvgpu') diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c index 8747c632..79d6bd5f 100644 --- a/drivers/gpu/nvgpu/common/linux/module.c +++ b/drivers/gpu/nvgpu/common/linux/module.c @@ -655,6 +655,9 @@ static void gk20a_pm_shutdown(struct platform_device *pdev) if (gk20a_gpu_is_virtual(&pdev->dev)) return; + if (!g->power_on) + goto finish; + gk20a_driver_start_unload(g); /* If GPU is already railgated, -- cgit v1.2.2