diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2017-01-27 10:31:52 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-02-02 11:13:50 -0500 |
commit | 57bcd0a6364cd4eaa362d7ff1777e88ddf501602 (patch) | |
tree | e3157947adf0b224421bf5b6bfc4cf7dd2ae39ed | |
parent | 52b679f60e2a68af88411f12318675a2424a0e14 (diff) |
drm/amdgpu/si: fix crash on headless asics
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>
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 4 |
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 e2b0b1646f99..0635829b18cf 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | |||
@@ -254,6 +254,9 @@ static void gmc_v6_0_mc_program(struct amdgpu_device *adev) | |||
254 | } | 254 | } |
255 | WREG32(mmHDP_REG_COHERENCY_FLUSH_CNTL, 0); | 255 | WREG32(mmHDP_REG_COHERENCY_FLUSH_CNTL, 0); |
256 | 256 | ||
257 | if (adev->mode_info.num_crtc) | ||
258 | amdgpu_display_set_vga_render_state(adev, false); | ||
259 | |||
257 | gmc_v6_0_mc_stop(adev, &save); | 260 | gmc_v6_0_mc_stop(adev, &save); |
258 | 261 | ||
259 | if (gmc_v6_0_wait_for_idle((void *)adev)) { | 262 | if (gmc_v6_0_wait_for_idle((void *)adev)) { |
@@ -283,7 +286,6 @@ static void gmc_v6_0_mc_program(struct amdgpu_device *adev) | |||
283 | dev_warn(adev->dev, "Wait for MC idle timedout !\n"); | 286 | dev_warn(adev->dev, "Wait for MC idle timedout !\n"); |
284 | } | 287 | } |
285 | gmc_v6_0_mc_resume(adev, &save); | 288 | gmc_v6_0_mc_resume(adev, &save); |
286 | amdgpu_display_set_vga_render_state(adev, false); | ||
287 | } | 289 | } |
288 | 290 | ||
289 | static int gmc_v6_0_mc_init(struct amdgpu_device *adev) | 291 | static int gmc_v6_0_mc_init(struct amdgpu_device *adev) |