aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0603-drm-amd-dal-refactor-initial-detection.patch
blob: 89965d98b54477b565a49fca8bc1a0de0f170fc3 (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
42
43
44
45
46
47
48
49
From 4d75ceb23fc5f0a4b1f1be1d09a04997e0ebe2da Mon Sep 17 00:00:00 2001
From: Mykola Lysenko <Mykola.Lysenko@amd.com>
Date: Mon, 7 Dec 2015 19:50:37 +0800
Subject: [PATCH 0603/1110] drm/amd/dal: refactor initial detection

We should not use iteration on connectors when we need
iterate on links

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.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c
index e68598f..f85ce3b 100644
--- a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c
@@ -1025,7 +1025,6 @@ int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
 {
 	struct amdgpu_display_manager *dm = &adev->dm;
 	uint32_t link_index;
-	struct drm_connector *connector;
 	struct amdgpu_connector *aconnector;
 	struct amdgpu_encoder *aencoder;
 	struct amdgpu_crtc *acrtc;
@@ -1087,14 +1086,15 @@ int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
 			DRM_ERROR("KMS: Failed to initialize connector\n");
 			goto fail;
 		}
+
+		dc_link_detect(dc_get_link_at_index(dm->dc, link_index));
+
+		amdgpu_dm_update_connector_after_detect(
+			aconnector);
 	}
 
 	dm->display_indexes_num = link_cnt;
 
-	detect_on_all_dc_links(&adev->dm);
-	list_for_each_entry(connector, &adev->ddev->mode_config.connector_list, head)
-		amdgpu_dm_update_connector_after_detect(to_amdgpu_connector(connector));
-
 	/* Software is initialized. Now we can register interrupt handlers. */
 	switch (adev->asic_type) {
 	case CHIP_CARRIZO:
-- 
2.7.4