aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0546-drm-amd-dal-temporary-fix-in-headless-processing-cod.patch
blob: 165e360c4269d1f8a100106aa1a46b0cb7cf4b2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From c389a8716f3b798cf1b1cb274846bc9966fe1b70 Mon Sep 17 00:00:00 2001
From: Mykola Lysenko <Mykola.Lysenko@amd.com>
Date: Tue, 1 Dec 2015 19:31:57 +0800
Subject: [PATCH 0546/1110] drm/amd/dal: temporary fix in headless processing
 code for MST

We cannot rely in function aconnector_from_drm_crtc_id for crtc_id to
be equal to connector_id. It is not the case anymore. Because of that
there was a segfault:

1. Pageflip atomic commit;
2. No connector provided in state, so aconnector is NULL;
3. Incorrect physical MST connector selected in handle_headless_hotplug,
and set mode is scheduled for it;
4. Segfault because there is no modes exist on this connector.

We need to revisit handle_headless_hotplug logic, and retest them.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
---
 drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c
index 90bb0d2..7990a48 100644
--- a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c
+++ b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c
@@ -556,8 +556,7 @@ struct amdgpu_connector *aconnector_from_drm_crtc_id(
 
 		aconnector = to_amdgpu_connector(connector);
 
-		/* acrtc->crtc_id means display_index */
-		if (aconnector->connector_id != acrtc->crtc_id)
+		if (aconnector->base.state->crtc != &acrtc->base)
 			continue;
 
 		/* Found the connector */
-- 
2.7.4