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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
From 304ee59a3a95dfaa7a50208c372fadc91e756fd3 Mon Sep 17 00:00:00 2001
From: Eric Yang <eric.yang2@amd.com>
Date: Tue, 29 Mar 2016 17:38:15 -0400
Subject: [PATCH 0989/1110] drm/amd/dal: don't get edid on mst disconnect
Change check condition in dm_dp_mst_hotplug such that only
on plug in case we get edid from the port for the connector.
Also, following the previous change that moved sink creation
out of fill_mode ioctl, this change moves freeing the edid
block from fill_mode ioctl to dm_dp_destroy_mst_connector.
No visible change in behaviour usecase wise.
Signed-off-by: Eric Yang <eric.yang2@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
.../gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_mst_types.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_mst_types.c
index c00c4d1..d73b246 100644
--- a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_mst_types.c
+++ b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_mst_types.c
@@ -127,11 +127,6 @@ dm_dp_mst_detect(struct drm_connector *connector, bool force)
&master->mst_mgr,
aconnector->port);
- if (status == connector_status_disconnected && aconnector->edid) {
- kfree(aconnector->edid);
- aconnector->edid = NULL;
- }
-
/*
* we do not want to make this connector connected until we have edid on
* it
@@ -375,6 +370,14 @@ static void dm_dp_destroy_mst_connector(
dc_link_remove_remote_sink(aconnector->dc_link, aconnector->dc_sink);
aconnector->dc_sink = NULL;
}
+ if (aconnector->edid) {
+ kfree(aconnector->edid);
+ aconnector->edid = NULL;
+ }
+
+ drm_mode_connector_update_edid_property(
+ &aconnector->base,
+ NULL);
}
static void dm_dp_mst_hotplug(struct drm_dp_mst_topology_mgr *mgr)
@@ -390,7 +393,11 @@ static void dm_dp_mst_hotplug(struct drm_dp_mst_topology_mgr *mgr)
drm_modeset_lock_all(dev);
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
aconnector = to_amdgpu_connector(connector);
- if (aconnector->mst_port && !aconnector->dc_sink) {
+ if (aconnector->port && !aconnector->dc_sink) {
+ /*
+ * This is plug in case, where port has been created but
+ * sink hasn't been created yet
+ */
if (!aconnector->edid) {
edid = drm_dp_mst_get_edid(connector, &aconnector->mst_port->mst_mgr, aconnector->port);
--
2.7.4
|