1 From 3a9d993ee9809c217f4322623a9b78c8d17fdd1f Mon Sep 17 00:00:00 2001
2 From: Alex Deucher <alexander.deucher@amd.com>
3 Date: Wed, 28 Sep 2016 12:43:33 -0400
4 Subject: drm/amdgpu/dce11: disable hpd on local panels
6 From: Alex Deucher <alexander.deucher@amd.com>
8 commit 3a9d993ee9809c217f4322623a9b78c8d17fdd1f upstream.
10 Otherwise we can get a hotplug interrupt storm when
11 we turn the panel off if hpd interrupts were enabled
15 https://bugs.freedesktop.org/show_bug.cgi?id=97471
17 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 23 +++++++++++++----------
22 1 file changed, 13 insertions(+), 10 deletions(-)
24 --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
25 +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
26 @@ -409,16 +409,6 @@ static void dce_v11_0_hpd_init(struct am
27 list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
28 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector);
30 - if (connector->connector_type == DRM_MODE_CONNECTOR_eDP ||
31 - connector->connector_type == DRM_MODE_CONNECTOR_LVDS) {
32 - /* don't try to enable hpd on eDP or LVDS avoid breaking the
33 - * aux dp channel on imac and help (but not completely fix)
34 - * https://bugzilla.redhat.com/show_bug.cgi?id=726143
35 - * also avoid interrupt storms during dpms.
40 switch (amdgpu_connector->hpd.hpd) {
43 @@ -442,6 +432,19 @@ static void dce_v11_0_hpd_init(struct am
47 + if (connector->connector_type == DRM_MODE_CONNECTOR_eDP ||
48 + connector->connector_type == DRM_MODE_CONNECTOR_LVDS) {
49 + /* don't try to enable hpd on eDP or LVDS avoid breaking the
50 + * aux dp channel on imac and help (but not completely fix)
51 + * https://bugzilla.redhat.com/show_bug.cgi?id=726143
52 + * also avoid interrupt storms during dpms.
54 + tmp = RREG32(mmDC_HPD_INT_CONTROL + hpd_offsets[idx]);
55 + tmp = REG_SET_FIELD(tmp, DC_HPD_INT_CONTROL, DC_HPD_INT_EN, 0);
56 + WREG32(mmDC_HPD_INT_CONTROL + hpd_offsets[idx], tmp);
60 tmp = RREG32(mmDC_HPD_CONTROL + hpd_offsets[idx]);
61 tmp = REG_SET_FIELD(tmp, DC_HPD_CONTROL, DC_HPD_EN, 1);
62 WREG32(mmDC_HPD_CONTROL + hpd_offsets[idx], tmp);