diff options
author | Kary Jin <karyj@nvidia.com> | 2018-10-15 03:57:52 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-10-29 22:08:48 -0400 |
commit | 9d2e50de426ac6362d66f9ccb29a0415322e467f (patch) | |
tree | fd7742b653f232a7e4da5ee8e7cf7338f0b5cddf /drivers/gpu/nvgpu/gk20a | |
parent | e1c52e46ea383dd280f9d65a4e34422fd9f3637a (diff) |
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 <karyj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1927018
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 12 |
1 files changed, 0 insertions, 12 deletions
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: | |||
424 | return err; | 424 | return err; |
425 | } | 425 | } |
426 | 426 | ||
427 | /* | ||
428 | * Check if the device can go busy. Basically if the driver is currently | ||
429 | * in the process of dying then do not let new places make the driver busy. | ||
430 | */ | ||
431 | int gk20a_can_busy(struct gk20a *g) | ||
432 | { | ||
433 | if (nvgpu_is_enabled(g, NVGPU_DRIVER_IS_DYING)) { | ||
434 | return 0; | ||
435 | } | ||
436 | return 1; | ||
437 | } | ||
438 | |||
439 | int gk20a_wait_for_idle(struct gk20a *g) | 427 | int gk20a_wait_for_idle(struct gk20a *g) |
440 | { | 428 | { |
441 | int wait_length = 150; /* 3 second overall max wait. */ | 429 | int wait_length = 150; /* 3 second overall max wait. */ |