gpu: nvgpu: Reboot when GPU disappears

Reboot the GPU when it disappears instead of just printing a warning
message.

Bug 1805082
Bug 1816516
Bug 1807277

Change-Id: Ifd23c7e6876d5ea86032a82b7181e31d54e877b5
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1260898
(cherry picked from commit 4fdc48c4e6dddf4299a49f387ac90404dd38950f)
Reviewed-on: http://git-master/r/1261917
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Alex Waterman
2016-11-28 13:01:25 -08:00
committed by mobile promotions
parent 9e46d3731e
commit 508ec183db

View File

@@ -39,7 +39,7 @@
#include <linux/kthread.h>
#include <linux/platform/tegra/common.h>
#include <linux/reset.h>
#include <linux/reboot.h>
#include <linux/sched.h>
#include <linux/version.h>
@@ -266,8 +266,11 @@ void __nvgpu_check_gpu_state(struct gk20a *g)
{
u32 boot_0 = readl(g->regs + mc_boot_0_r());
if (boot_0 == 0xffffffff)
if (boot_0 == 0xffffffff) {
pr_err("nvgpu: GPU has disappeared from bus!!\n");
pr_err("nvgpu: Rebooting system!!\n");
kernel_restart(NULL);
}
}
static inline void sim_writel(struct gk20a *g, u32 r, u32 v)