aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0822-drm-amd-dal-refactor-transform-header-for-HW-pseudoc.patch
blob: 225230c8565c60501910408594d456d39470c6ee (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
171
172
173
174
175
176
177
178
From e36522a24e9c8e8bb6e9505b9993077560636804 Mon Sep 17 00:00:00 2001
From: Eric Yang <eric.yang2@amd.com>
Date: Fri, 19 Feb 2016 15:55:51 -0500
Subject: [PATCH 0822/1110] drm/amd/dal: refactor transform header for HW
 pseudocode

Make transform.h self contained, meaning all types used in this
file are defined in the file itself or in dc_hw_types.h, this
way HW team can see everything they need from the HW headers

Signed-off-by: Eric Yang <eric.yang2@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
---
 drivers/gpu/drm/amd/dal/dc/calcs/gamma_calcs.c   |  1 -
 drivers/gpu/drm/amd/dal/dc/calcs/scaler_filter.h |  2 --
 drivers/gpu/drm/amd/dal/dc/dc_hw_types.h         | 10 ++++++++++
 drivers/gpu/drm/amd/dal/dc/dc_types.h            | 14 -------------
 drivers/gpu/drm/amd/dal/dc/inc/core_types.h      |  1 +
 drivers/gpu/drm/amd/dal/dc/inc/transform.h       | 25 +++++++++++++++++++++++-
 drivers/gpu/drm/amd/dal/include/scaler_types.h   | 17 ----------------
 7 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/drivers/gpu/drm/amd/dal/dc/calcs/gamma_calcs.c b/drivers/gpu/drm/amd/dal/dc/calcs/gamma_calcs.c
index 2fc1809..6f0f64a 100644
--- a/drivers/gpu/drm/amd/dal/dc/calcs/gamma_calcs.c
+++ b/drivers/gpu/drm/amd/dal/dc/calcs/gamma_calcs.c
@@ -25,7 +25,6 @@
 
 #include "dm_services.h"
 #include "gamma_calcs.h"
-#include "core_types.h"
 
 struct curve_config {
 	uint32_t offset;
diff --git a/drivers/gpu/drm/amd/dal/dc/calcs/scaler_filter.h b/drivers/gpu/drm/amd/dal/dc/calcs/scaler_filter.h
index 668691d..220b736 100644
--- a/drivers/gpu/drm/amd/dal/dc/calcs/scaler_filter.h
+++ b/drivers/gpu/drm/amd/dal/dc/calcs/scaler_filter.h
@@ -38,8 +38,6 @@ struct scaler_filter_params {
 	} flags;
 };
 
-struct q31_32;
-
 struct scaler_filter {
 	struct scaler_filter_params params;
 	uint32_t src_size;
diff --git a/drivers/gpu/drm/amd/dal/dc/dc_hw_types.h b/drivers/gpu/drm/amd/dal/dc/dc_hw_types.h
index f11a78d..d1d2f57 100644
--- a/drivers/gpu/drm/amd/dal/dc/dc_hw_types.h
+++ b/drivers/gpu/drm/amd/dal/dc/dc_hw_types.h
@@ -373,5 +373,15 @@ enum dc_color_depth {
 	COLOR_DEPTH_COUNT
 };
 
+/* XFM */
+
+/* used in  struct dc_surface */
+struct scaling_taps {
+	uint32_t v_taps;
+	uint32_t h_taps;
+	uint32_t v_taps_c;
+	uint32_t h_taps_c;
+};
+
 #endif /* DC_HW_TYPES_H */
 
diff --git a/drivers/gpu/drm/amd/dal/dc/dc_types.h b/drivers/gpu/drm/amd/dal/dc/dc_types.h
index bcbb911..219fe77 100644
--- a/drivers/gpu/drm/amd/dal/dc/dc_types.h
+++ b/drivers/gpu/drm/amd/dal/dc/dc_types.h
@@ -172,20 +172,6 @@ struct dc_edid_caps {
 	uint8_t lte_340mcsc_scramble;
 };
 
-struct scaling_taps {
-	uint32_t v_taps;
-	uint32_t h_taps;
-	uint32_t v_taps_c;
-	uint32_t h_taps_c;
-};
-
-struct scaling_ratios {
-	struct fixed31_32 horz;
-	struct fixed31_32 vert;
-	struct fixed31_32 horz_c;
-	struct fixed31_32 vert_c;
-};
-
 struct view {
 	uint32_t width;
 	uint32_t height;
diff --git a/drivers/gpu/drm/amd/dal/dc/inc/core_types.h b/drivers/gpu/drm/amd/dal/dc/inc/core_types.h
index d638054..ff34292 100644
--- a/drivers/gpu/drm/amd/dal/dc/inc/core_types.h
+++ b/drivers/gpu/drm/amd/dal/dc/inc/core_types.h
@@ -231,6 +231,7 @@ void core_link_disable_stream(struct pipe_ctx *pipe_ctx);
 
 /********** DAL Core*********************/
 #include "display_clock_interface.h"
+#include "transform.h"
 
 struct resource_pool;
 struct validate_context;
diff --git a/drivers/gpu/drm/amd/dal/dc/inc/transform.h b/drivers/gpu/drm/amd/dal/dc/inc/transform.h
index 47adc1d..87dbff3 100644
--- a/drivers/gpu/drm/amd/dal/dc/inc/transform.h
+++ b/drivers/gpu/drm/amd/dal/dc/inc/transform.h
@@ -28,7 +28,6 @@
 
 #include "include/scaler_types.h"
 #include "calcs/scaler_filter.h"
-#include "grph_object_id.h"
 
 struct bit_depth_reduction_params;
 
@@ -135,6 +134,30 @@ struct xfm_grph_csc_adjustment {
 	enum graphics_gamut_adjust_type gamut_adjust_type;
 };
 
+/*overscan or window*/
+struct overscan_info {
+	uint32_t left;
+	uint32_t right;
+	uint32_t top;
+	uint32_t bottom;
+};
+
+struct scaling_ratios {
+	struct fixed31_32 horz;
+	struct fixed31_32 vert;
+	struct fixed31_32 horz_c;
+	struct fixed31_32 vert_c;
+};
+
+struct scaler_data {
+	struct overscan_info overscan;
+	struct scaling_taps taps;
+	struct rect viewport;
+	struct scaling_ratios ratios;
+
+	enum pixel_format format;
+};
+
 struct transform_funcs {
 	bool (*transform_power_up)(
 		struct transform *xfm);
diff --git a/drivers/gpu/drm/amd/dal/include/scaler_types.h b/drivers/gpu/drm/amd/dal/include/scaler_types.h
index 3947776..0a31277 100644
--- a/drivers/gpu/drm/amd/dal/include/scaler_types.h
+++ b/drivers/gpu/drm/amd/dal/include/scaler_types.h
@@ -28,23 +28,6 @@
 
 #include "dc_types.h"
 
-/*overscan or window*/
-struct overscan_info {
-	uint32_t left;
-	uint32_t right;
-	uint32_t top;
-	uint32_t bottom;
-};
-
-struct scaler_data {
-	struct overscan_info overscan;
-	struct scaling_taps taps;
-	struct rect viewport;
-	struct scaling_ratios ratios;
-
-	enum pixel_format format;
-};
-
 struct init_int_and_frac {
 	uint32_t integer;
 	uint32_t fraction;
-- 
2.7.4