aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2016-09-28 12:44:59 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-09-28 16:13:19 -0400
commit2744b647f49e24d636c8b293325aed674363f0d2 (patch)
tree437099f2c84300cdff8489881652a5f1223614ca
parent324082586cc5918e3230f0b2f326656c653201eb (diff)
drm/amdgpu/dce6: disable hpd on local panels
Otherwise we can get a hotplug interrupt storm when we turn the panel off if hpd interrupts were enabled by the bios. bug: https://bugs.freedesktop.org/show_bug.cgi?id=97471 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/dce_v6_0.c48
1 files changed, 39 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
index eb8f96a61491..fce9256fb066 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
@@ -375,15 +375,6 @@ static void dce_v6_0_hpd_init(struct amdgpu_device *adev)
375 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { 375 list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
376 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); 376 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector);
377 377
378 if (connector->connector_type == DRM_MODE_CONNECTOR_eDP ||
379 connector->connector_type == DRM_MODE_CONNECTOR_LVDS) {
380 /* don't try to enable hpd on eDP or LVDS avoid breaking the
381 * aux dp channel on imac and help (but not completely fix)
382 * https://bugzilla.redhat.com/show_bug.cgi?id=726143
383 * also avoid interrupt storms during dpms.
384 */
385 continue;
386 }
387 switch (amdgpu_connector->hpd.hpd) { 378 switch (amdgpu_connector->hpd.hpd) {
388 case AMDGPU_HPD_1: 379 case AMDGPU_HPD_1:
389 WREG32(DC_HPD1_CONTROL, tmp); 380 WREG32(DC_HPD1_CONTROL, tmp);
@@ -406,6 +397,45 @@ static void dce_v6_0_hpd_init(struct amdgpu_device *adev)
406 default: 397 default:
407 break; 398 break;
408 } 399 }
400
401 if (connector->connector_type == DRM_MODE_CONNECTOR_eDP ||
402 connector->connector_type == DRM_MODE_CONNECTOR_LVDS) {
403 /* don't try to enable hpd on eDP or LVDS avoid breaking the
404 * aux dp channel on imac and help (but not completely fix)
405 * https://bugzilla.redhat.com/show_bug.cgi?id=726143
406 * also avoid interrupt storms during dpms.
407 */
408 u32 dc_hpd_int_cntl_reg, dc_hpd_int_cntl;
409
410 switch (amdgpu_connector->hpd.hpd) {
411 case AMDGPU_HPD_1:
412 dc_hpd_int_cntl_reg = DC_HPD1_INT_CONTROL;
413 break;
414 case AMDGPU_HPD_2:
415 dc_hpd_int_cntl_reg = DC_HPD2_INT_CONTROL;
416 break;
417 case AMDGPU_HPD_3:
418 dc_hpd_int_cntl_reg = DC_HPD3_INT_CONTROL;
419 break;
420 case AMDGPU_HPD_4:
421 dc_hpd_int_cntl_reg = DC_HPD4_INT_CONTROL;
422 break;
423 case AMDGPU_HPD_5:
424 dc_hpd_int_cntl_reg = DC_HPD5_INT_CONTROL;
425 break;
426 case AMDGPU_HPD_6:
427 dc_hpd_int_cntl_reg = DC_HPD6_INT_CONTROL;
428 break;
429 default:
430 continue;
431 }
432
433 dc_hpd_int_cntl = RREG32(dc_hpd_int_cntl_reg);
434 dc_hpd_int_cntl &= ~DC_HPDx_INT_EN;
435 WREG32(dc_hpd_int_cntl_reg, dc_hpd_int_cntl);
436 continue;
437 }
438
409 dce_v6_0_hpd_set_polarity(adev, amdgpu_connector->hpd.hpd); 439 dce_v6_0_hpd_set_polarity(adev, amdgpu_connector->hpd.hpd);
410 amdgpu_irq_get(adev, &adev->hpd_irq, amdgpu_connector->hpd.hpd); 440 amdgpu_irq_get(adev, &adev->hpd_irq, amdgpu_connector->hpd.hpd);
411 } 441 }