From 9d2e50de426ac6362d66f9ccb29a0415322e467f Mon Sep 17 00:00:00 2001 From: Kary Jin Date: Mon, 15 Oct 2018 15:57:52 +0800 Subject: gpu: nvgpu: Add reboot handler Add a reboot handler to make sure that nvgpu does not try to busy the GPU if the system is going down. If the system is going down then any number of subsystems nvgpu depends on may already have been deinitialized. Bug 200333709 Bug 200454316 Change-Id: I2ceaf7ca4fb88643310874b5b26937ef44c6e3dd Signed-off-by: Kary Jin Reviewed-on: https://git-master.nvidia.com/r/1927018 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Vinayak Pane Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 7855493d..9ee5f282 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c @@ -424,18 +424,6 @@ done: return err; } -/* - * Check if the device can go busy. Basically if the driver is currently - * in the process of dying then do not let new places make the driver busy. - */ -int gk20a_can_busy(struct gk20a *g) -{ - if (nvgpu_is_enabled(g, NVGPU_DRIVER_IS_DYING)) { - return 0; - } - return 1; -} - int gk20a_wait_for_idle(struct gk20a *g) { int wait_length = 150; /* 3 second overall max wait. */ -- cgit v1.2.2