aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2017-01-27 10:31:52 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-09 02:08:26 -0500
commitc9fb422fd93883b65f1bb00e6e9206a5865245fc (patch)
tree42f0e8ebf5dda17c8d900138ee9ea542475f2af2
parent20658b3df8b98cbdc433c824730471160a087afb (diff)
drm/amdgpu/si: fix crash on headless asics
commit 57bcd0a6364cd4eaa362d7ff1777e88ddf501602 upstream. Missing check for crtcs present. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=193341 https://bugs.freedesktop.org/show_bug.cgi?id=99387 Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
index b13c8aaec078..6df924f72f29 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
@@ -227,6 +227,9 @@ static void gmc_v6_0_mc_program(struct amdgpu_device *adev)
227 } 227 }
228 WREG32(HDP_REG_COHERENCY_FLUSH_CNTL, 0); 228 WREG32(HDP_REG_COHERENCY_FLUSH_CNTL, 0);
229 229
230 if (adev->mode_info.num_crtc)
231 amdgpu_display_set_vga_render_state(adev, false);
232
230 gmc_v6_0_mc_stop(adev, &save); 233 gmc_v6_0_mc_stop(adev, &save);
231 234
232 if (gmc_v6_0_wait_for_idle((void *)adev)) { 235 if (gmc_v6_0_wait_for_idle((void *)adev)) {
@@ -256,7 +259,6 @@ static void gmc_v6_0_mc_program(struct amdgpu_device *adev)
256 dev_warn(adev->dev, "Wait for MC idle timedout !\n"); 259 dev_warn(adev->dev, "Wait for MC idle timedout !\n");
257 } 260 }
258 gmc_v6_0_mc_resume(adev, &save); 261 gmc_v6_0_mc_resume(adev, &save);
259 amdgpu_display_set_vga_render_state(adev, false);
260} 262}
261 263
262static int gmc_v6_0_mc_init(struct amdgpu_device *adev) 264static int gmc_v6_0_mc_init(struct amdgpu_device *adev)