]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
Merge branch 'linux-4.12' of git://github.com/skeggsb/linux into drm-next
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_atomfirmware.c
index d735cd1807b34dcf00bb61d91bd30ea70c4635b3..4bdda56fcceea36b8229d74ac3b76fe706919a77 100644 (file)
@@ -88,6 +88,19 @@ void amdgpu_atomfirmware_scratch_regs_restore(struct amdgpu_device *adev)
                WREG32(adev->bios_scratch_reg_offset + i, adev->bios_scratch[i]);
 }
 
+void amdgpu_atomfirmware_scratch_regs_engine_hung(struct amdgpu_device *adev,
+                                                 bool hung)
+{
+       u32 tmp = RREG32(adev->bios_scratch_reg_offset + 3);
+
+       if (hung)
+               tmp |= ATOM_S3_ASIC_GUI_ENGINE_HUNG;
+       else
+               tmp &= ~ATOM_S3_ASIC_GUI_ENGINE_HUNG;
+
+       WREG32(adev->bios_scratch_reg_offset + 3, tmp);
+}
+
 int amdgpu_atomfirmware_allocate_fb_scratch(struct amdgpu_device *adev)
 {
        struct atom_context *ctx = adev->mode_info.atom_context;
This page took 0.034189 seconds and 4 git commands to generate.