drm/radeon: add a bios scratch asic hung helper
Used by all asic families from r600+.
Flag for the vbios and later instances of the driver
that the GPU is hung.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
index 835992d..af9e86d 100644
--- a/drivers/gpu/drm/radeon/ni.c
+++ b/drivers/gpu/drm/radeon/ni.c
@@ -1422,6 +1422,8 @@
if (reset_mask == 0)
return 0;
+ r600_set_bios_scratch_engine_hung(rdev, true);
+
dev_info(rdev->dev, "GPU softreset: 0x%08X\n", reset_mask);
dev_info(rdev->dev, " VM_CONTEXT0_PROTECTION_FAULT_ADDR 0x%08X\n",
@@ -1448,6 +1450,9 @@
udelay(50);
evergreen_mc_resume(rdev, &save);
+
+ r600_set_bios_scratch_engine_hung(rdev, false);
+
return 0;
}