]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.4.29/drm-amdgpu-dce11-disable-hpd-on-local-panels.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.4.29 / drm-amdgpu-dce11-disable-hpd-on-local-panels.patch
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
5
6 From: Alex Deucher <alexander.deucher@amd.com>
7
8 commit 3a9d993ee9809c217f4322623a9b78c8d17fdd1f upstream.
9
10 Otherwise we can get a hotplug interrupt storm when
11 we turn the panel off if hpd interrupts were enabled
12 by the bios.
13
14 bug:
15 https://bugs.freedesktop.org/show_bug.cgi?id=97471
16
17 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19
20 ---
21 drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 23 +++++++++++++----------
22 1 file changed, 13 insertions(+), 10 deletions(-)
23
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);
29
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.
36 - */
37 - continue;
38 - }
39 -
40 switch (amdgpu_connector->hpd.hpd) {
41 case AMDGPU_HPD_1:
42 idx = 0;
43 @@ -442,6 +432,19 @@ static void dce_v11_0_hpd_init(struct am
44 continue;
45 }
46
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.
53 + */
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);
57 + continue;
58 + }
59 +
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);