aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0154-drm-amd-display-remove-calculate_adjustments-in-conv.patch
blob: 34c4ff8190051f8675cacc473fb2dcf313367642 (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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
From 642c10e31a206fab429971f6dbf358ce0f1ac850 Mon Sep 17 00:00:00 2001
From: Tony Cheng <tony.cheng@amd.com>
Date: Sat, 14 Jan 2017 20:56:08 -0500
Subject: [PATCH 0154/4131] drm/amd/display: remove calculate_adjustments in
 conversion.h

- these are moved to color module

Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/display/dc/basics/conversion.c | 118 ---------------------
 drivers/gpu/drm/amd/display/dc/basics/conversion.h |  10 --
 2 files changed, 128 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/basics/conversion.c b/drivers/gpu/drm/amd/display/dc/basics/conversion.c
index 5682fea..a2e22ae 100644
--- a/drivers/gpu/drm/amd/display/dc/basics/conversion.c
+++ b/drivers/gpu/drm/amd/display/dc/basics/conversion.c
@@ -103,124 +103,6 @@ void convert_float_matrix(
 	}
 }
 
-static void calculate_adjustments_common(
-	const struct fixed31_32 *ideal_matrix,
-	const struct dc_csc_adjustments *adjustments,
-	struct fixed31_32 *matrix)
-{
-	const struct fixed31_32 sin_hue =
-		dal_fixed31_32_sin(adjustments->hue);
-	const struct fixed31_32 cos_hue =
-		dal_fixed31_32_cos(adjustments->hue);
-
-	const struct fixed31_32 multiplier =
-		dal_fixed31_32_mul(
-			adjustments->contrast,
-			adjustments->saturation);
-
-	matrix[0] = dal_fixed31_32_mul(
-		ideal_matrix[0],
-		adjustments->contrast);
-
-	matrix[1] = dal_fixed31_32_mul(
-		ideal_matrix[1],
-		adjustments->contrast);
-
-	matrix[2] = dal_fixed31_32_mul(
-		ideal_matrix[2],
-		adjustments->contrast);
-
-	matrix[4] = dal_fixed31_32_mul(
-		multiplier,
-		dal_fixed31_32_add(
-			dal_fixed31_32_mul(
-				ideal_matrix[8],
-				sin_hue),
-			dal_fixed31_32_mul(
-				ideal_matrix[4],
-				cos_hue)));
-
-	matrix[5] = dal_fixed31_32_mul(
-		multiplier,
-		dal_fixed31_32_add(
-			dal_fixed31_32_mul(
-				ideal_matrix[9],
-				sin_hue),
-			dal_fixed31_32_mul(
-				ideal_matrix[5],
-				cos_hue)));
-
-	matrix[6] = dal_fixed31_32_mul(
-		multiplier,
-		dal_fixed31_32_add(
-			dal_fixed31_32_mul(
-				ideal_matrix[10],
-				sin_hue),
-			dal_fixed31_32_mul(
-				ideal_matrix[6],
-				cos_hue)));
-
-	matrix[7] = ideal_matrix[7];
-
-	matrix[8] = dal_fixed31_32_mul(
-		multiplier,
-		dal_fixed31_32_sub(
-			dal_fixed31_32_mul(
-				ideal_matrix[8],
-				cos_hue),
-			dal_fixed31_32_mul(
-				ideal_matrix[4],
-				sin_hue)));
-
-	matrix[9] = dal_fixed31_32_mul(
-		multiplier,
-		dal_fixed31_32_sub(
-			dal_fixed31_32_mul(
-				ideal_matrix[9],
-				cos_hue),
-			dal_fixed31_32_mul(
-				ideal_matrix[5],
-				sin_hue)));
-
-	matrix[10] = dal_fixed31_32_mul(
-		multiplier,
-		dal_fixed31_32_sub(
-			dal_fixed31_32_mul(
-				ideal_matrix[10],
-				cos_hue),
-			dal_fixed31_32_mul(
-				ideal_matrix[6],
-				sin_hue)));
-
-	matrix[11] = ideal_matrix[11];
-}
-
-void calculate_adjustments(
-	const struct fixed31_32 *ideal_matrix,
-	const struct dc_csc_adjustments *adjustments,
-	struct fixed31_32 *matrix)
-{
-	calculate_adjustments_common(ideal_matrix, adjustments, matrix);
-
-	matrix[3] = dal_fixed31_32_add(
-		ideal_matrix[3],
-		dal_fixed31_32_mul(
-			adjustments->brightness,
-			dal_fixed31_32_from_fraction(86, 100)));
-}
-
-void calculate_adjustments_y_only(
-	const struct fixed31_32 *ideal_matrix,
-	const struct dc_csc_adjustments *adjustments,
-	struct fixed31_32 *matrix)
-{
-	calculate_adjustments_common(ideal_matrix, adjustments, matrix);
-
-	matrix[3] = dal_fixed31_32_add(
-		ideal_matrix[3],
-		adjustments->brightness);
-}
-
 unsigned int log_2(unsigned int num)
 {
 	unsigned int result = 0;
diff --git a/drivers/gpu/drm/amd/display/dc/basics/conversion.h b/drivers/gpu/drm/amd/display/dc/basics/conversion.h
index b7fe431..189325f 100644
--- a/drivers/gpu/drm/amd/display/dc/basics/conversion.h
+++ b/drivers/gpu/drm/amd/display/dc/basics/conversion.h
@@ -38,16 +38,6 @@ void convert_float_matrix(
 	struct fixed31_32 *flt,
 	uint32_t buffer_size);
 
-void calculate_adjustments(
-	const struct fixed31_32 *ideal_matrix,
-	const struct dc_csc_adjustments *adjustments,
-	struct fixed31_32 *matrix);
-
-void calculate_adjustments_y_only(
-	const struct fixed31_32 *ideal_matrix,
-	const struct dc_csc_adjustments *adjustments,
-	struct fixed31_32 *matrix);
-
 unsigned int log_2(unsigned int num);
 
 #endif
-- 
2.7.4