blob: 35293344ce7f3a663dccaa1d11ebeefd7576d8f0 (
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
From b79159d92026b3e1a482ee39d265c2bc5552299c Mon Sep 17 00:00:00 2001
From: Anthony Koo <Anthony.Koo@amd.com>
Date: Fri, 25 Jan 2019 11:50:31 -0500
Subject: [PATCH 1222/2940] drm/amd/display: link_rate_set should index into
table
[Why]
Current implementation that maps link_rate_set value to
actual link rate is incorrect.
[How]
Fix this implementation, such that link_rate_set indexes into
the supported_link_rate table.
Change-Id: I5ff7f7e25951c442240698835526de1ff5400b89
Signed-off-by: Anthony Koo <Anthony.Koo@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
---
.../gpu/drm/amd/display/dc/core/dc_link_dp.c | 35 +------------------
1 file changed, 1 insertion(+), 34 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
index 5ee36d6e0512..09d301216076 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
@@ -2540,7 +2540,6 @@ void detect_edp_sink_caps(struct dc_link *link)
uint32_t entry;
uint32_t link_rate_in_khz;
enum dc_link_rate link_rate = LINK_RATE_UNKNOWN;
- uint8_t link_rate_set = 0;
retrieve_link_cap(link);
@@ -2560,39 +2559,7 @@ void detect_edp_sink_caps(struct dc_link *link)
link_rate = linkRateInKHzToLinkRateMultiplier(link_rate_in_khz);
if (link->reported_link_cap.link_rate < link_rate) {
link->reported_link_cap.link_rate = link_rate;
-
- switch (link_rate) {
- case LINK_RATE_LOW:
- link_rate_set = 1;
- break;
- case LINK_RATE_RATE_2:
- link_rate_set = 2;
- break;
- case LINK_RATE_RATE_3:
- link_rate_set = 3;
- break;
- case LINK_RATE_HIGH:
- link_rate_set = 4;
- break;
- case LINK_RATE_RBR2:
- link_rate_set = 5;
- break;
- case LINK_RATE_RATE_6:
- link_rate_set = 6;
- break;
- case LINK_RATE_HIGH2:
- link_rate_set = 7;
- break;
- case LINK_RATE_HIGH3:
- link_rate_set = 8;
- break;
- default:
- link_rate_set = 0;
- break;
- }
-
- if (link->dpcd_caps.link_rate_set < link_rate_set)
- link->dpcd_caps.link_rate_set = link_rate_set;
+ link->dpcd_caps.link_rate_set = entry;
}
}
}
--
2.17.1
|