aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0839-drm-amd-dal-Address-HW-team-feedback-on-ipp.patch
blob: a08205aaa25fa1a8ec0d0a964ee7a4529a89cd43 (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
179
180
181
182
From d2ffd84492fe27eb17aa683a57296d7d804bbe64 Mon Sep 17 00:00:00 2001
From: Eric Yang <eric.yang2@amd.com>
Date: Mon, 22 Feb 2016 12:18:24 -0500
Subject: [PATCH 0839/1110] drm/amd/dal: Address HW team feedback on ipp

Signed-off-by: Eric Yang <eric.yang2@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
---
 .../gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c    |  4 ++--
 drivers/gpu/drm/amd/dal/dc/core/dc_target.c        |  4 ++--
 drivers/gpu/drm/amd/dal/dc/dc_hw_types.h           |  4 ++--
 drivers/gpu/drm/amd/dal/dc/dce110/dce110_ipp.h     |  2 +-
 .../gpu/drm/amd/dal/dc/dce110/dce110_ipp_cursor.c  |  8 +++-----
 .../gpu/drm/amd/dal/dc/dce110/dce110_mem_input.h   | 23 ++++++++++++++++++++++
 drivers/gpu/drm/amd/dal/dc/inc/ipp.h               |  2 +-
 drivers/gpu/drm/amd/dal/dc/inc/mem_input.h         | 18 -----------------
 8 files changed, 34 insertions(+), 31 deletions(-)

diff --git a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c
index f469017..ec02029 100644
--- a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c
+++ b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c
@@ -304,8 +304,8 @@ static int dm_crtc_cursor_move(struct drm_crtc *crtc,
 	position.y = y;
 
 	position.hot_spot_enable = true;
-	position.x_origin = xorigin;
-	position.y_origin = yorigin;
+	position.x_hotspot = xorigin;
+	position.y_hotspot = yorigin;
 
 	if (!dc_target_set_cursor_position(
 				amdgpu_crtc->target,
diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc_target.c b/drivers/gpu/drm/amd/dal/dc/core/dc_target.c
index ac917e5..87275b8 100644
--- a/drivers/gpu/drm/amd/dal/dc/core/dc_target.c
+++ b/drivers/gpu/drm/amd/dal/dc/core/dc_target.c
@@ -500,8 +500,8 @@ bool dc_target_set_cursor_position(
 			 * plane so we only need to set it on first pipe we
 			 * find. May need to make this code dce specific later.
 			 */
-			if (ipp->funcs->ipp_cursor_set_position(ipp, position))
-				return true;
+			ipp->funcs->ipp_cursor_set_position(ipp, position);
+			return true;
 		}
 	}
 
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 ea8028c..273c544 100644
--- a/drivers/gpu/drm/amd/dal/dc/dc_hw_types.h
+++ b/drivers/gpu/drm/amd/dal/dc/dc_hw_types.h
@@ -256,8 +256,8 @@ struct dc_cursor_position {
 	uint32_t x;
 	uint32_t y;
 
-	uint32_t x_origin;
-	uint32_t y_origin;
+	uint32_t x_hotspot;
+	uint32_t y_hotspot;
 
 	/*
 	 * This parameter indicates whether HW cursor should be enabled
diff --git a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_ipp.h b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_ipp.h
index dde138c..13b9100 100644
--- a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_ipp.h
+++ b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_ipp.h
@@ -53,7 +53,7 @@ bool dce110_ipp_construct(
 void dce110_ipp_destroy(struct input_pixel_processor **ipp);
 
 /* CURSOR RELATED */
-bool dce110_ipp_cursor_set_position(
+void dce110_ipp_cursor_set_position(
 	struct input_pixel_processor *ipp,
 	const struct dc_cursor_position *position);
 
diff --git a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_ipp_cursor.c b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_ipp_cursor.c
index ef91f2d..eaa1f05 100644
--- a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_ipp_cursor.c
+++ b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_ipp_cursor.c
@@ -71,7 +71,7 @@ static void program_address(
 	PHYSICAL_ADDRESS_LOC address);
 
 
-bool dce110_ipp_cursor_set_position(
+void dce110_ipp_cursor_set_position(
 	struct input_pixel_processor *ipp,
 	const struct dc_cursor_position *position)
 {
@@ -89,13 +89,11 @@ bool dce110_ipp_cursor_set_position(
 	if (position->hot_spot_enable)
 		program_hotspot(
 				ipp110,
-				position->x_origin,
-				position->y_origin);
+				position->x_hotspot,
+				position->y_hotspot);
 
 	/* unlock cursor registers */
 	lock(ipp110, false);
-
-	return true;
 }
 
 bool dce110_ipp_cursor_set_attributes(
diff --git a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_mem_input.h b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_mem_input.h
index a0db7aa..81b78fd 100644
--- a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_mem_input.h
+++ b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_mem_input.h
@@ -36,6 +36,29 @@ struct dce110_mem_input_reg_offsets {
 	uint32_t pipe;
 };
 
+
+enum stutter_mode_type {
+/*	TODO: Clean up these enums, right now only one is being used
+ *	STUTTER_MODE_LEGACY = 0X00000001,
+ *	STUTTER_MODE_ENHANCED = 0X00000002,
+ *	STUTTER_MODE_FID_NBP_STATE = 0X00000004,
+ *	STUTTER_MODE_WATERMARK_NBP_STATE = 0X00000008,
+ *	STUTTER_MODE_SINGLE_DISPLAY_MODEL = 0X00000010,
+ *	STUTTER_MODE_MIXED_DISPLAY_MODEL = 0X00000020,
+ *	STUTTER_MODE_DUAL_DMIF_BUFFER = 0X00000040,
+ */
+	STUTTER_MODE_NO_DMIF_BUFFER_ALLOCATION = 0X00000080,
+/*
+ *	STUTTER_MODE_NO_ADVANCED_REQUEST = 0X00000100,
+ *	STUTTER_MODE_NO_LB_RESET = 0X00000200,
+ *	STUTTER_MODE_DISABLED = 0X00000400,
+ *	STUTTER_MODE_AGGRESSIVE_MARKS = 0X00000800,
+ *	STUTTER_MODE_URGENCY = 0X00001000,
+ *	STUTTER_MODE_QUAD_DMIF_BUFFER = 0X00002000,
+ *	STUTTER_MODE_NOT_USED = 0X00008000
+ */
+};
+
 struct dce110_mem_input {
 	struct mem_input base;
 	struct dce110_mem_input_reg_offsets offsets;
diff --git a/drivers/gpu/drm/amd/dal/dc/inc/ipp.h b/drivers/gpu/drm/amd/dal/dc/inc/ipp.h
index 9081820..505bf72 100644
--- a/drivers/gpu/drm/amd/dal/dc/inc/ipp.h
+++ b/drivers/gpu/drm/amd/dal/dc/inc/ipp.h
@@ -88,7 +88,7 @@ enum ipp_output_format {
 struct ipp_funcs {
 
 	/*** cursor ***/
-	bool (*ipp_cursor_set_position)(
+	void (*ipp_cursor_set_position)(
 		struct input_pixel_processor *ipp,
 		const struct dc_cursor_position *position);
 
diff --git a/drivers/gpu/drm/amd/dal/dc/inc/mem_input.h b/drivers/gpu/drm/amd/dal/dc/inc/mem_input.h
index 9cd9905..8339d61 100644
--- a/drivers/gpu/drm/amd/dal/dc/inc/mem_input.h
+++ b/drivers/gpu/drm/amd/dal/dc/inc/mem_input.h
@@ -66,22 +66,4 @@ struct mem_input_funcs {
 		enum dc_rotation_angle rotation);
 };
 
-enum stutter_mode_type {
-	STUTTER_MODE_LEGACY = 0X00000001,
-	STUTTER_MODE_ENHANCED = 0X00000002,
-	STUTTER_MODE_FID_NBP_STATE = 0X00000004,
-	STUTTER_MODE_WATERMARK_NBP_STATE = 0X00000008,
-	STUTTER_MODE_SINGLE_DISPLAY_MODEL = 0X00000010,
-	STUTTER_MODE_MIXED_DISPLAY_MODEL = 0X00000020,
-	STUTTER_MODE_DUAL_DMIF_BUFFER = 0X00000040,
-	STUTTER_MODE_NO_DMIF_BUFFER_ALLOCATION = 0X00000080,
-	STUTTER_MODE_NO_ADVANCED_REQUEST = 0X00000100,
-	STUTTER_MODE_NO_LB_RESET = 0X00000200,
-	STUTTER_MODE_DISABLED = 0X00000400,
-	STUTTER_MODE_AGGRESSIVE_MARKS = 0X00000800,
-	STUTTER_MODE_URGENCY = 0X00001000,
-	STUTTER_MODE_QUAD_DMIF_BUFFER = 0X00002000,
-	STUTTER_MODE_NOT_USED = 0X00008000
-};
-
 #endif
-- 
2.7.4