diff options
author | Maarten Lankhorst <maarten.lankhorst@canonical.com> | 2012-06-04 06:00:31 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-07-25 20:28:13 -0400 |
commit | ce806a30470bcd846d148bf39d46de3ad7748228 (patch) | |
tree | b804660246b0ab0c673364298666b0c158252107 /drivers/gpu | |
parent | ac7d181e323a888015e19e2e4d776095a0433787 (diff) |
nouveau: Fix alignment requirements on src and dst addresses
Linear copy works by adding the offset to the buffer address,
which may end up not being 16-byte aligned.
Some tests I've written for prime_pcopy show that the engine
allows this correctly, so the restriction on lowest 4 bits of
address can be lifted safely.
The comments added were by envyas, I think because I used
a newer version.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/nva3_copy.fuc | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nva3_copy.fuc.h | 94 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvc0_copy.fuc.h | 87 |
3 files changed, 175 insertions, 10 deletions
diff --git a/drivers/gpu/drm/nouveau/nva3_copy.fuc b/drivers/gpu/drm/nouveau/nva3_copy.fuc index abc36626fef0..219850d53286 100644 --- a/drivers/gpu/drm/nouveau/nva3_copy.fuc +++ b/drivers/gpu/drm/nouveau/nva3_copy.fuc | |||
@@ -119,9 +119,9 @@ dispatch_dma: | |||
119 | // mthd 0x030c-0x0340, various stuff | 119 | // mthd 0x030c-0x0340, various stuff |
120 | .b16 0xc3 14 | 120 | .b16 0xc3 14 |
121 | .b32 #ctx_src_address_high ~0x000000ff | 121 | .b32 #ctx_src_address_high ~0x000000ff |
122 | .b32 #ctx_src_address_low ~0xfffffff0 | 122 | .b32 #ctx_src_address_low ~0xffffffff |
123 | .b32 #ctx_dst_address_high ~0x000000ff | 123 | .b32 #ctx_dst_address_high ~0x000000ff |
124 | .b32 #ctx_dst_address_low ~0xfffffff0 | 124 | .b32 #ctx_dst_address_low ~0xffffffff |
125 | .b32 #ctx_src_pitch ~0x0007ffff | 125 | .b32 #ctx_src_pitch ~0x0007ffff |
126 | .b32 #ctx_dst_pitch ~0x0007ffff | 126 | .b32 #ctx_dst_pitch ~0x0007ffff |
127 | .b32 #ctx_xcnt ~0x0000ffff | 127 | .b32 #ctx_xcnt ~0x0000ffff |
diff --git a/drivers/gpu/drm/nouveau/nva3_copy.fuc.h b/drivers/gpu/drm/nouveau/nva3_copy.fuc.h index 1f33fbdc00be..37d6de3c9d61 100644 --- a/drivers/gpu/drm/nouveau/nva3_copy.fuc.h +++ b/drivers/gpu/drm/nouveau/nva3_copy.fuc.h | |||
@@ -1,37 +1,72 @@ | |||
1 | uint32_t nva3_pcopy_data[] = { | 1 | u32 nva3_pcopy_data[] = { |
2 | /* 0x0000: ctx_object */ | ||
2 | 0x00000000, | 3 | 0x00000000, |
4 | /* 0x0004: ctx_dma */ | ||
5 | /* 0x0004: ctx_dma_query */ | ||
3 | 0x00000000, | 6 | 0x00000000, |
7 | /* 0x0008: ctx_dma_src */ | ||
4 | 0x00000000, | 8 | 0x00000000, |
9 | /* 0x000c: ctx_dma_dst */ | ||
5 | 0x00000000, | 10 | 0x00000000, |
11 | /* 0x0010: ctx_query_address_high */ | ||
6 | 0x00000000, | 12 | 0x00000000, |
13 | /* 0x0014: ctx_query_address_low */ | ||
7 | 0x00000000, | 14 | 0x00000000, |
15 | /* 0x0018: ctx_query_counter */ | ||
8 | 0x00000000, | 16 | 0x00000000, |
17 | /* 0x001c: ctx_src_address_high */ | ||
9 | 0x00000000, | 18 | 0x00000000, |
19 | /* 0x0020: ctx_src_address_low */ | ||
10 | 0x00000000, | 20 | 0x00000000, |
21 | /* 0x0024: ctx_src_pitch */ | ||
11 | 0x00000000, | 22 | 0x00000000, |
23 | /* 0x0028: ctx_src_tile_mode */ | ||
12 | 0x00000000, | 24 | 0x00000000, |
25 | /* 0x002c: ctx_src_xsize */ | ||
13 | 0x00000000, | 26 | 0x00000000, |
27 | /* 0x0030: ctx_src_ysize */ | ||
14 | 0x00000000, | 28 | 0x00000000, |
29 | /* 0x0034: ctx_src_zsize */ | ||
15 | 0x00000000, | 30 | 0x00000000, |
31 | /* 0x0038: ctx_src_zoff */ | ||
16 | 0x00000000, | 32 | 0x00000000, |
33 | /* 0x003c: ctx_src_xoff */ | ||
17 | 0x00000000, | 34 | 0x00000000, |
35 | /* 0x0040: ctx_src_yoff */ | ||
18 | 0x00000000, | 36 | 0x00000000, |
37 | /* 0x0044: ctx_src_cpp */ | ||
19 | 0x00000000, | 38 | 0x00000000, |
39 | /* 0x0048: ctx_dst_address_high */ | ||
20 | 0x00000000, | 40 | 0x00000000, |
41 | /* 0x004c: ctx_dst_address_low */ | ||
21 | 0x00000000, | 42 | 0x00000000, |
43 | /* 0x0050: ctx_dst_pitch */ | ||
22 | 0x00000000, | 44 | 0x00000000, |
45 | /* 0x0054: ctx_dst_tile_mode */ | ||
23 | 0x00000000, | 46 | 0x00000000, |
47 | /* 0x0058: ctx_dst_xsize */ | ||
24 | 0x00000000, | 48 | 0x00000000, |
49 | /* 0x005c: ctx_dst_ysize */ | ||
25 | 0x00000000, | 50 | 0x00000000, |
51 | /* 0x0060: ctx_dst_zsize */ | ||
26 | 0x00000000, | 52 | 0x00000000, |
53 | /* 0x0064: ctx_dst_zoff */ | ||
27 | 0x00000000, | 54 | 0x00000000, |
55 | /* 0x0068: ctx_dst_xoff */ | ||
28 | 0x00000000, | 56 | 0x00000000, |
57 | /* 0x006c: ctx_dst_yoff */ | ||
29 | 0x00000000, | 58 | 0x00000000, |
59 | /* 0x0070: ctx_dst_cpp */ | ||
30 | 0x00000000, | 60 | 0x00000000, |
61 | /* 0x0074: ctx_format */ | ||
31 | 0x00000000, | 62 | 0x00000000, |
63 | /* 0x0078: ctx_swz_const0 */ | ||
32 | 0x00000000, | 64 | 0x00000000, |
65 | /* 0x007c: ctx_swz_const1 */ | ||
33 | 0x00000000, | 66 | 0x00000000, |
67 | /* 0x0080: ctx_xcnt */ | ||
34 | 0x00000000, | 68 | 0x00000000, |
69 | /* 0x0084: ctx_ycnt */ | ||
35 | 0x00000000, | 70 | 0x00000000, |
36 | 0x00000000, | 71 | 0x00000000, |
37 | 0x00000000, | 72 | 0x00000000, |
@@ -63,6 +98,7 @@ uint32_t nva3_pcopy_data[] = { | |||
63 | 0x00000000, | 98 | 0x00000000, |
64 | 0x00000000, | 99 | 0x00000000, |
65 | 0x00000000, | 100 | 0x00000000, |
101 | /* 0x0100: dispatch_table */ | ||
66 | 0x00010000, | 102 | 0x00010000, |
67 | 0x00000000, | 103 | 0x00000000, |
68 | 0x00000000, | 104 | 0x00000000, |
@@ -73,6 +109,7 @@ uint32_t nva3_pcopy_data[] = { | |||
73 | 0x00010162, | 109 | 0x00010162, |
74 | 0x00000000, | 110 | 0x00000000, |
75 | 0x00030060, | 111 | 0x00030060, |
112 | /* 0x0128: dispatch_dma */ | ||
76 | 0x00010170, | 113 | 0x00010170, |
77 | 0x00000000, | 114 | 0x00000000, |
78 | 0x00010170, | 115 | 0x00010170, |
@@ -118,11 +155,11 @@ uint32_t nva3_pcopy_data[] = { | |||
118 | 0x0000001c, | 155 | 0x0000001c, |
119 | 0xffffff00, | 156 | 0xffffff00, |
120 | 0x00000020, | 157 | 0x00000020, |
121 | 0x0000000f, | 158 | 0x00000000, |
122 | 0x00000048, | 159 | 0x00000048, |
123 | 0xffffff00, | 160 | 0xffffff00, |
124 | 0x0000004c, | 161 | 0x0000004c, |
125 | 0x0000000f, | 162 | 0x00000000, |
126 | 0x00000024, | 163 | 0x00000024, |
127 | 0xfff80000, | 164 | 0xfff80000, |
128 | 0x00000050, | 165 | 0x00000050, |
@@ -146,7 +183,8 @@ uint32_t nva3_pcopy_data[] = { | |||
146 | 0x00000800, | 183 | 0x00000800, |
147 | }; | 184 | }; |
148 | 185 | ||
149 | uint32_t nva3_pcopy_code[] = { | 186 | u32 nva3_pcopy_code[] = { |
187 | /* 0x0000: main */ | ||
150 | 0x04fe04bd, | 188 | 0x04fe04bd, |
151 | 0x3517f000, | 189 | 0x3517f000, |
152 | 0xf10010fe, | 190 | 0xf10010fe, |
@@ -158,23 +196,31 @@ uint32_t nva3_pcopy_code[] = { | |||
158 | 0x17f11031, | 196 | 0x17f11031, |
159 | 0x27f01200, | 197 | 0x27f01200, |
160 | 0x0012d003, | 198 | 0x0012d003, |
199 | /* 0x002f: spin */ | ||
161 | 0xf40031f4, | 200 | 0xf40031f4, |
162 | 0x0ef40028, | 201 | 0x0ef40028, |
202 | /* 0x0035: ih */ | ||
163 | 0x8001cffd, | 203 | 0x8001cffd, |
164 | 0xf40812c4, | 204 | 0xf40812c4, |
165 | 0x21f4060b, | 205 | 0x21f4060b, |
206 | /* 0x0041: ih_no_chsw */ | ||
166 | 0x0412c472, | 207 | 0x0412c472, |
167 | 0xf4060bf4, | 208 | 0xf4060bf4, |
209 | /* 0x004a: ih_no_cmd */ | ||
168 | 0x11c4c321, | 210 | 0x11c4c321, |
169 | 0x4001d00c, | 211 | 0x4001d00c, |
212 | /* 0x0052: swctx */ | ||
170 | 0x47f101f8, | 213 | 0x47f101f8, |
171 | 0x4bfe7700, | 214 | 0x4bfe7700, |
172 | 0x0007fe00, | 215 | 0x0007fe00, |
173 | 0xf00204b9, | 216 | 0xf00204b9, |
174 | 0x01f40643, | 217 | 0x01f40643, |
175 | 0x0604fa09, | 218 | 0x0604fa09, |
219 | /* 0x006b: swctx_load */ | ||
176 | 0xfa060ef4, | 220 | 0xfa060ef4, |
221 | /* 0x006e: swctx_done */ | ||
177 | 0x03f80504, | 222 | 0x03f80504, |
223 | /* 0x0072: chsw */ | ||
178 | 0x27f100f8, | 224 | 0x27f100f8, |
179 | 0x23cf1400, | 225 | 0x23cf1400, |
180 | 0x1e3fc800, | 226 | 0x1e3fc800, |
@@ -183,18 +229,22 @@ uint32_t nva3_pcopy_code[] = { | |||
183 | 0x1e3af052, | 229 | 0x1e3af052, |
184 | 0xf00023d0, | 230 | 0xf00023d0, |
185 | 0x24d00147, | 231 | 0x24d00147, |
232 | /* 0x0093: chsw_no_unload */ | ||
186 | 0xcf00f880, | 233 | 0xcf00f880, |
187 | 0x3dc84023, | 234 | 0x3dc84023, |
188 | 0x220bf41e, | 235 | 0x220bf41e, |
189 | 0xf40131f4, | 236 | 0xf40131f4, |
190 | 0x57f05221, | 237 | 0x57f05221, |
191 | 0x0367f004, | 238 | 0x0367f004, |
239 | /* 0x00a8: chsw_load_ctx_dma */ | ||
192 | 0xa07856bc, | 240 | 0xa07856bc, |
193 | 0xb6018068, | 241 | 0xb6018068, |
194 | 0x87d00884, | 242 | 0x87d00884, |
195 | 0x0162b600, | 243 | 0x0162b600, |
244 | /* 0x00bb: chsw_finish_load */ | ||
196 | 0xf0f018f4, | 245 | 0xf0f018f4, |
197 | 0x23d00237, | 246 | 0x23d00237, |
247 | /* 0x00c3: dispatch */ | ||
198 | 0xf100f880, | 248 | 0xf100f880, |
199 | 0xcf190037, | 249 | 0xcf190037, |
200 | 0x33cf4032, | 250 | 0x33cf4032, |
@@ -202,6 +252,7 @@ uint32_t nva3_pcopy_code[] = { | |||
202 | 0x1024b607, | 252 | 0x1024b607, |
203 | 0x010057f1, | 253 | 0x010057f1, |
204 | 0x74bd64bd, | 254 | 0x74bd64bd, |
255 | /* 0x00dc: dispatch_loop */ | ||
205 | 0x58005658, | 256 | 0x58005658, |
206 | 0x50b60157, | 257 | 0x50b60157, |
207 | 0x0446b804, | 258 | 0x0446b804, |
@@ -211,6 +262,7 @@ uint32_t nva3_pcopy_code[] = { | |||
211 | 0xb60276bb, | 262 | 0xb60276bb, |
212 | 0x57bb0374, | 263 | 0x57bb0374, |
213 | 0xdf0ef400, | 264 | 0xdf0ef400, |
265 | /* 0x0100: dispatch_valid_mthd */ | ||
214 | 0xb60246bb, | 266 | 0xb60246bb, |
215 | 0x45bb0344, | 267 | 0x45bb0344, |
216 | 0x01459800, | 268 | 0x01459800, |
@@ -220,31 +272,41 @@ uint32_t nva3_pcopy_code[] = { | |||
220 | 0xb0014658, | 272 | 0xb0014658, |
221 | 0x1bf40064, | 273 | 0x1bf40064, |
222 | 0x00538009, | 274 | 0x00538009, |
275 | /* 0x0127: dispatch_cmd */ | ||
223 | 0xf4300ef4, | 276 | 0xf4300ef4, |
224 | 0x55f90132, | 277 | 0x55f90132, |
225 | 0xf40c01f4, | 278 | 0xf40c01f4, |
279 | /* 0x0132: dispatch_invalid_bitfield */ | ||
226 | 0x25f0250e, | 280 | 0x25f0250e, |
281 | /* 0x0135: dispatch_illegal_mthd */ | ||
227 | 0x0125f002, | 282 | 0x0125f002, |
283 | /* 0x0138: dispatch_error */ | ||
228 | 0x100047f1, | 284 | 0x100047f1, |
229 | 0xd00042d0, | 285 | 0xd00042d0, |
230 | 0x27f04043, | 286 | 0x27f04043, |
231 | 0x0002d040, | 287 | 0x0002d040, |
288 | /* 0x0148: hostirq_wait */ | ||
232 | 0xf08002cf, | 289 | 0xf08002cf, |
233 | 0x24b04024, | 290 | 0x24b04024, |
234 | 0xf71bf400, | 291 | 0xf71bf400, |
292 | /* 0x0154: dispatch_done */ | ||
235 | 0x1d0027f1, | 293 | 0x1d0027f1, |
236 | 0xd00137f0, | 294 | 0xd00137f0, |
237 | 0x00f80023, | 295 | 0x00f80023, |
296 | /* 0x0160: cmd_nop */ | ||
297 | /* 0x0162: cmd_pm_trigger */ | ||
238 | 0x27f100f8, | 298 | 0x27f100f8, |
239 | 0x34bd2200, | 299 | 0x34bd2200, |
240 | 0xd00233f0, | 300 | 0xd00233f0, |
241 | 0x00f80023, | 301 | 0x00f80023, |
302 | /* 0x0170: cmd_dma */ | ||
242 | 0x012842b7, | 303 | 0x012842b7, |
243 | 0xf00145b6, | 304 | 0xf00145b6, |
244 | 0x43801e39, | 305 | 0x43801e39, |
245 | 0x0040b701, | 306 | 0x0040b701, |
246 | 0x0644b606, | 307 | 0x0644b606, |
247 | 0xf80043d0, | 308 | 0xf80043d0, |
309 | /* 0x0189: cmd_exec_set_format */ | ||
248 | 0xf030f400, | 310 | 0xf030f400, |
249 | 0xb00001b0, | 311 | 0xb00001b0, |
250 | 0x01b00101, | 312 | 0x01b00101, |
@@ -256,20 +318,26 @@ uint32_t nva3_pcopy_code[] = { | |||
256 | 0x70b63847, | 318 | 0x70b63847, |
257 | 0x0232f401, | 319 | 0x0232f401, |
258 | 0x94bd84bd, | 320 | 0x94bd84bd, |
321 | /* 0x01b4: ncomp_loop */ | ||
259 | 0xb60f4ac4, | 322 | 0xb60f4ac4, |
260 | 0xb4bd0445, | 323 | 0xb4bd0445, |
324 | /* 0x01bc: bpc_loop */ | ||
261 | 0xf404a430, | 325 | 0xf404a430, |
262 | 0xa5ff0f18, | 326 | 0xa5ff0f18, |
263 | 0x00cbbbc0, | 327 | 0x00cbbbc0, |
264 | 0xf40231f4, | 328 | 0xf40231f4, |
329 | /* 0x01ce: cmp_c0 */ | ||
265 | 0x1bf4220e, | 330 | 0x1bf4220e, |
266 | 0x10c7f00c, | 331 | 0x10c7f00c, |
267 | 0xf400cbbb, | 332 | 0xf400cbbb, |
333 | /* 0x01da: cmp_c1 */ | ||
268 | 0xa430160e, | 334 | 0xa430160e, |
269 | 0x0c18f406, | 335 | 0x0c18f406, |
270 | 0xbb14c7f0, | 336 | 0xbb14c7f0, |
271 | 0x0ef400cb, | 337 | 0x0ef400cb, |
338 | /* 0x01e9: cmp_zero */ | ||
272 | 0x80c7f107, | 339 | 0x80c7f107, |
340 | /* 0x01ed: bpc_next */ | ||
273 | 0x01c83800, | 341 | 0x01c83800, |
274 | 0xb60180b6, | 342 | 0xb60180b6, |
275 | 0xb5b801b0, | 343 | 0xb5b801b0, |
@@ -280,6 +348,7 @@ uint32_t nva3_pcopy_code[] = { | |||
280 | 0x98110680, | 348 | 0x98110680, |
281 | 0x68fd2008, | 349 | 0x68fd2008, |
282 | 0x0502f400, | 350 | 0x0502f400, |
351 | /* 0x0216: dst_xcnt */ | ||
283 | 0x75fd64bd, | 352 | 0x75fd64bd, |
284 | 0x1c078000, | 353 | 0x1c078000, |
285 | 0xf10078fd, | 354 | 0xf10078fd, |
@@ -304,6 +373,7 @@ uint32_t nva3_pcopy_code[] = { | |||
304 | 0x980056d0, | 373 | 0x980056d0, |
305 | 0x56d01f06, | 374 | 0x56d01f06, |
306 | 0x1030f440, | 375 | 0x1030f440, |
376 | /* 0x0276: cmd_exec_set_surface_tiled */ | ||
307 | 0x579800f8, | 377 | 0x579800f8, |
308 | 0x6879c70a, | 378 | 0x6879c70a, |
309 | 0xb66478c7, | 379 | 0xb66478c7, |
@@ -311,9 +381,11 @@ uint32_t nva3_pcopy_code[] = { | |||
311 | 0x0e76b060, | 381 | 0x0e76b060, |
312 | 0xf0091bf4, | 382 | 0xf0091bf4, |
313 | 0x0ef40477, | 383 | 0x0ef40477, |
384 | /* 0x0291: xtile64 */ | ||
314 | 0x027cf00f, | 385 | 0x027cf00f, |
315 | 0xfd1170b6, | 386 | 0xfd1170b6, |
316 | 0x77f00947, | 387 | 0x77f00947, |
388 | /* 0x029d: xtileok */ | ||
317 | 0x0f5a9806, | 389 | 0x0f5a9806, |
318 | 0xfd115b98, | 390 | 0xfd115b98, |
319 | 0xb7f000ab, | 391 | 0xb7f000ab, |
@@ -371,6 +443,7 @@ uint32_t nva3_pcopy_code[] = { | |||
371 | 0x67d00600, | 443 | 0x67d00600, |
372 | 0x0060b700, | 444 | 0x0060b700, |
373 | 0x0068d004, | 445 | 0x0068d004, |
446 | /* 0x0382: cmd_exec_set_surface_linear */ | ||
374 | 0x6cf000f8, | 447 | 0x6cf000f8, |
375 | 0x0260b702, | 448 | 0x0260b702, |
376 | 0x0864b602, | 449 | 0x0864b602, |
@@ -381,13 +454,16 @@ uint32_t nva3_pcopy_code[] = { | |||
381 | 0xb70067d0, | 454 | 0xb70067d0, |
382 | 0x98040060, | 455 | 0x98040060, |
383 | 0x67d00957, | 456 | 0x67d00957, |
457 | /* 0x03ab: cmd_exec_wait */ | ||
384 | 0xf900f800, | 458 | 0xf900f800, |
385 | 0xf110f900, | 459 | 0xf110f900, |
386 | 0xb6080007, | 460 | 0xb6080007, |
461 | /* 0x03b6: loop */ | ||
387 | 0x01cf0604, | 462 | 0x01cf0604, |
388 | 0x0114f000, | 463 | 0x0114f000, |
389 | 0xfcfa1bf4, | 464 | 0xfcfa1bf4, |
390 | 0xf800fc10, | 465 | 0xf800fc10, |
466 | /* 0x03c5: cmd_exec_query */ | ||
391 | 0x0d34c800, | 467 | 0x0d34c800, |
392 | 0xf5701bf4, | 468 | 0xf5701bf4, |
393 | 0xf103ab21, | 469 | 0xf103ab21, |
@@ -417,6 +493,7 @@ uint32_t nva3_pcopy_code[] = { | |||
417 | 0x47f10153, | 493 | 0x47f10153, |
418 | 0x44b60800, | 494 | 0x44b60800, |
419 | 0x0045d006, | 495 | 0x0045d006, |
496 | /* 0x0438: query_counter */ | ||
420 | 0x03ab21f5, | 497 | 0x03ab21f5, |
421 | 0x080c47f1, | 498 | 0x080c47f1, |
422 | 0x980644b6, | 499 | 0x980644b6, |
@@ -439,11 +516,13 @@ uint32_t nva3_pcopy_code[] = { | |||
439 | 0x47f10153, | 516 | 0x47f10153, |
440 | 0x44b60800, | 517 | 0x44b60800, |
441 | 0x0045d006, | 518 | 0x0045d006, |
519 | /* 0x0492: cmd_exec */ | ||
442 | 0x21f500f8, | 520 | 0x21f500f8, |
443 | 0x3fc803ab, | 521 | 0x3fc803ab, |
444 | 0x0e0bf400, | 522 | 0x0e0bf400, |
445 | 0x018921f5, | 523 | 0x018921f5, |
446 | 0x020047f1, | 524 | 0x020047f1, |
525 | /* 0x04a7: cmd_exec_no_format */ | ||
447 | 0xf11e0ef4, | 526 | 0xf11e0ef4, |
448 | 0xb6081067, | 527 | 0xb6081067, |
449 | 0x77f00664, | 528 | 0x77f00664, |
@@ -451,19 +530,24 @@ uint32_t nva3_pcopy_code[] = { | |||
451 | 0x981c0780, | 530 | 0x981c0780, |
452 | 0x67d02007, | 531 | 0x67d02007, |
453 | 0x4067d000, | 532 | 0x4067d000, |
533 | /* 0x04c2: cmd_exec_init_src_surface */ | ||
454 | 0x32f444bd, | 534 | 0x32f444bd, |
455 | 0xc854bd02, | 535 | 0xc854bd02, |
456 | 0x0bf4043f, | 536 | 0x0bf4043f, |
457 | 0x8221f50a, | 537 | 0x8221f50a, |
458 | 0x0a0ef403, | 538 | 0x0a0ef403, |
539 | /* 0x04d4: src_tiled */ | ||
459 | 0x027621f5, | 540 | 0x027621f5, |
541 | /* 0x04db: cmd_exec_init_dst_surface */ | ||
460 | 0xf40749f0, | 542 | 0xf40749f0, |
461 | 0x57f00231, | 543 | 0x57f00231, |
462 | 0x083fc82c, | 544 | 0x083fc82c, |
463 | 0xf50a0bf4, | 545 | 0xf50a0bf4, |
464 | 0xf4038221, | 546 | 0xf4038221, |
547 | /* 0x04ee: dst_tiled */ | ||
465 | 0x21f50a0e, | 548 | 0x21f50a0e, |
466 | 0x49f00276, | 549 | 0x49f00276, |
550 | /* 0x04f5: cmd_exec_kick */ | ||
467 | 0x0057f108, | 551 | 0x0057f108, |
468 | 0x0654b608, | 552 | 0x0654b608, |
469 | 0xd0210698, | 553 | 0xd0210698, |
@@ -473,6 +557,8 @@ uint32_t nva3_pcopy_code[] = { | |||
473 | 0xc80054d0, | 557 | 0xc80054d0, |
474 | 0x0bf40c3f, | 558 | 0x0bf40c3f, |
475 | 0xc521f507, | 559 | 0xc521f507, |
560 | /* 0x0519: cmd_exec_done */ | ||
561 | /* 0x051b: cmd_wrcache_flush */ | ||
476 | 0xf100f803, | 562 | 0xf100f803, |
477 | 0xbd220027, | 563 | 0xbd220027, |
478 | 0x0133f034, | 564 | 0x0133f034, |
diff --git a/drivers/gpu/drm/nouveau/nvc0_copy.fuc.h b/drivers/gpu/drm/nouveau/nvc0_copy.fuc.h index a8d17458ced1..cd879f31bb38 100644 --- a/drivers/gpu/drm/nouveau/nvc0_copy.fuc.h +++ b/drivers/gpu/drm/nouveau/nvc0_copy.fuc.h | |||
@@ -1,34 +1,65 @@ | |||
1 | uint32_t nvc0_pcopy_data[] = { | 1 | u32 nvc0_pcopy_data[] = { |
2 | /* 0x0000: ctx_object */ | ||
2 | 0x00000000, | 3 | 0x00000000, |
4 | /* 0x0004: ctx_query_address_high */ | ||
3 | 0x00000000, | 5 | 0x00000000, |
6 | /* 0x0008: ctx_query_address_low */ | ||
4 | 0x00000000, | 7 | 0x00000000, |
8 | /* 0x000c: ctx_query_counter */ | ||
5 | 0x00000000, | 9 | 0x00000000, |
10 | /* 0x0010: ctx_src_address_high */ | ||
6 | 0x00000000, | 11 | 0x00000000, |
12 | /* 0x0014: ctx_src_address_low */ | ||
7 | 0x00000000, | 13 | 0x00000000, |
14 | /* 0x0018: ctx_src_pitch */ | ||
8 | 0x00000000, | 15 | 0x00000000, |
16 | /* 0x001c: ctx_src_tile_mode */ | ||
9 | 0x00000000, | 17 | 0x00000000, |
18 | /* 0x0020: ctx_src_xsize */ | ||
10 | 0x00000000, | 19 | 0x00000000, |
20 | /* 0x0024: ctx_src_ysize */ | ||
11 | 0x00000000, | 21 | 0x00000000, |
22 | /* 0x0028: ctx_src_zsize */ | ||
12 | 0x00000000, | 23 | 0x00000000, |
24 | /* 0x002c: ctx_src_zoff */ | ||
13 | 0x00000000, | 25 | 0x00000000, |
26 | /* 0x0030: ctx_src_xoff */ | ||
14 | 0x00000000, | 27 | 0x00000000, |
28 | /* 0x0034: ctx_src_yoff */ | ||
15 | 0x00000000, | 29 | 0x00000000, |
30 | /* 0x0038: ctx_src_cpp */ | ||
16 | 0x00000000, | 31 | 0x00000000, |
32 | /* 0x003c: ctx_dst_address_high */ | ||
17 | 0x00000000, | 33 | 0x00000000, |
34 | /* 0x0040: ctx_dst_address_low */ | ||
18 | 0x00000000, | 35 | 0x00000000, |
36 | /* 0x0044: ctx_dst_pitch */ | ||
19 | 0x00000000, | 37 | 0x00000000, |
38 | /* 0x0048: ctx_dst_tile_mode */ | ||
20 | 0x00000000, | 39 | 0x00000000, |
40 | /* 0x004c: ctx_dst_xsize */ | ||
21 | 0x00000000, | 41 | 0x00000000, |
42 | /* 0x0050: ctx_dst_ysize */ | ||
22 | 0x00000000, | 43 | 0x00000000, |
44 | /* 0x0054: ctx_dst_zsize */ | ||
23 | 0x00000000, | 45 | 0x00000000, |
46 | /* 0x0058: ctx_dst_zoff */ | ||
24 | 0x00000000, | 47 | 0x00000000, |
48 | /* 0x005c: ctx_dst_xoff */ | ||
25 | 0x00000000, | 49 | 0x00000000, |
50 | /* 0x0060: ctx_dst_yoff */ | ||
26 | 0x00000000, | 51 | 0x00000000, |
52 | /* 0x0064: ctx_dst_cpp */ | ||
27 | 0x00000000, | 53 | 0x00000000, |
54 | /* 0x0068: ctx_format */ | ||
28 | 0x00000000, | 55 | 0x00000000, |
56 | /* 0x006c: ctx_swz_const0 */ | ||
29 | 0x00000000, | 57 | 0x00000000, |
58 | /* 0x0070: ctx_swz_const1 */ | ||
30 | 0x00000000, | 59 | 0x00000000, |
60 | /* 0x0074: ctx_xcnt */ | ||
31 | 0x00000000, | 61 | 0x00000000, |
62 | /* 0x0078: ctx_ycnt */ | ||
32 | 0x00000000, | 63 | 0x00000000, |
33 | 0x00000000, | 64 | 0x00000000, |
34 | 0x00000000, | 65 | 0x00000000, |
@@ -63,6 +94,7 @@ uint32_t nvc0_pcopy_data[] = { | |||
63 | 0x00000000, | 94 | 0x00000000, |
64 | 0x00000000, | 95 | 0x00000000, |
65 | 0x00000000, | 96 | 0x00000000, |
97 | /* 0x0100: dispatch_table */ | ||
66 | 0x00010000, | 98 | 0x00010000, |
67 | 0x00000000, | 99 | 0x00000000, |
68 | 0x00000000, | 100 | 0x00000000, |
@@ -111,11 +143,11 @@ uint32_t nvc0_pcopy_data[] = { | |||
111 | 0x00000010, | 143 | 0x00000010, |
112 | 0xffffff00, | 144 | 0xffffff00, |
113 | 0x00000014, | 145 | 0x00000014, |
114 | 0x0000000f, | 146 | 0x00000000, |
115 | 0x0000003c, | 147 | 0x0000003c, |
116 | 0xffffff00, | 148 | 0xffffff00, |
117 | 0x00000040, | 149 | 0x00000040, |
118 | 0x0000000f, | 150 | 0x00000000, |
119 | 0x00000018, | 151 | 0x00000018, |
120 | 0xfff80000, | 152 | 0xfff80000, |
121 | 0x00000044, | 153 | 0x00000044, |
@@ -139,7 +171,8 @@ uint32_t nvc0_pcopy_data[] = { | |||
139 | 0x00000800, | 171 | 0x00000800, |
140 | }; | 172 | }; |
141 | 173 | ||
142 | uint32_t nvc0_pcopy_code[] = { | 174 | u32 nvc0_pcopy_code[] = { |
175 | /* 0x0000: main */ | ||
143 | 0x04fe04bd, | 176 | 0x04fe04bd, |
144 | 0x3517f000, | 177 | 0x3517f000, |
145 | 0xf10010fe, | 178 | 0xf10010fe, |
@@ -151,15 +184,20 @@ uint32_t nvc0_pcopy_code[] = { | |||
151 | 0x17f11031, | 184 | 0x17f11031, |
152 | 0x27f01200, | 185 | 0x27f01200, |
153 | 0x0012d003, | 186 | 0x0012d003, |
187 | /* 0x002f: spin */ | ||
154 | 0xf40031f4, | 188 | 0xf40031f4, |
155 | 0x0ef40028, | 189 | 0x0ef40028, |
190 | /* 0x0035: ih */ | ||
156 | 0x8001cffd, | 191 | 0x8001cffd, |
157 | 0xf40812c4, | 192 | 0xf40812c4, |
158 | 0x21f4060b, | 193 | 0x21f4060b, |
194 | /* 0x0041: ih_no_chsw */ | ||
159 | 0x0412c4ca, | 195 | 0x0412c4ca, |
160 | 0xf5070bf4, | 196 | 0xf5070bf4, |
197 | /* 0x004b: ih_no_cmd */ | ||
161 | 0xc4010221, | 198 | 0xc4010221, |
162 | 0x01d00c11, | 199 | 0x01d00c11, |
200 | /* 0x0053: swctx */ | ||
163 | 0xf101f840, | 201 | 0xf101f840, |
164 | 0xfe770047, | 202 | 0xfe770047, |
165 | 0x47f1004b, | 203 | 0x47f1004b, |
@@ -188,8 +226,11 @@ uint32_t nvc0_pcopy_code[] = { | |||
188 | 0xf00204b9, | 226 | 0xf00204b9, |
189 | 0x01f40643, | 227 | 0x01f40643, |
190 | 0x0604fa09, | 228 | 0x0604fa09, |
229 | /* 0x00c3: swctx_load */ | ||
191 | 0xfa060ef4, | 230 | 0xfa060ef4, |
231 | /* 0x00c6: swctx_done */ | ||
192 | 0x03f80504, | 232 | 0x03f80504, |
233 | /* 0x00ca: chsw */ | ||
193 | 0x27f100f8, | 234 | 0x27f100f8, |
194 | 0x23cf1400, | 235 | 0x23cf1400, |
195 | 0x1e3fc800, | 236 | 0x1e3fc800, |
@@ -198,18 +239,22 @@ uint32_t nvc0_pcopy_code[] = { | |||
198 | 0x1e3af053, | 239 | 0x1e3af053, |
199 | 0xf00023d0, | 240 | 0xf00023d0, |
200 | 0x24d00147, | 241 | 0x24d00147, |
242 | /* 0x00eb: chsw_no_unload */ | ||
201 | 0xcf00f880, | 243 | 0xcf00f880, |
202 | 0x3dc84023, | 244 | 0x3dc84023, |
203 | 0x090bf41e, | 245 | 0x090bf41e, |
204 | 0xf40131f4, | 246 | 0xf40131f4, |
247 | /* 0x00fa: chsw_finish_load */ | ||
205 | 0x37f05321, | 248 | 0x37f05321, |
206 | 0x8023d002, | 249 | 0x8023d002, |
250 | /* 0x0102: dispatch */ | ||
207 | 0x37f100f8, | 251 | 0x37f100f8, |
208 | 0x32cf1900, | 252 | 0x32cf1900, |
209 | 0x0033cf40, | 253 | 0x0033cf40, |
210 | 0x07ff24e4, | 254 | 0x07ff24e4, |
211 | 0xf11024b6, | 255 | 0xf11024b6, |
212 | 0xbd010057, | 256 | 0xbd010057, |
257 | /* 0x011b: dispatch_loop */ | ||
213 | 0x5874bd64, | 258 | 0x5874bd64, |
214 | 0x57580056, | 259 | 0x57580056, |
215 | 0x0450b601, | 260 | 0x0450b601, |
@@ -219,6 +264,7 @@ uint32_t nvc0_pcopy_code[] = { | |||
219 | 0xbb0f08f4, | 264 | 0xbb0f08f4, |
220 | 0x74b60276, | 265 | 0x74b60276, |
221 | 0x0057bb03, | 266 | 0x0057bb03, |
267 | /* 0x013f: dispatch_valid_mthd */ | ||
222 | 0xbbdf0ef4, | 268 | 0xbbdf0ef4, |
223 | 0x44b60246, | 269 | 0x44b60246, |
224 | 0x0045bb03, | 270 | 0x0045bb03, |
@@ -229,24 +275,33 @@ uint32_t nvc0_pcopy_code[] = { | |||
229 | 0x64b00146, | 275 | 0x64b00146, |
230 | 0x091bf400, | 276 | 0x091bf400, |
231 | 0xf4005380, | 277 | 0xf4005380, |
278 | /* 0x0166: dispatch_cmd */ | ||
232 | 0x32f4300e, | 279 | 0x32f4300e, |
233 | 0xf455f901, | 280 | 0xf455f901, |
234 | 0x0ef40c01, | 281 | 0x0ef40c01, |
282 | /* 0x0171: dispatch_invalid_bitfield */ | ||
235 | 0x0225f025, | 283 | 0x0225f025, |
284 | /* 0x0174: dispatch_illegal_mthd */ | ||
285 | /* 0x0177: dispatch_error */ | ||
236 | 0xf10125f0, | 286 | 0xf10125f0, |
237 | 0xd0100047, | 287 | 0xd0100047, |
238 | 0x43d00042, | 288 | 0x43d00042, |
239 | 0x4027f040, | 289 | 0x4027f040, |
290 | /* 0x0187: hostirq_wait */ | ||
240 | 0xcf0002d0, | 291 | 0xcf0002d0, |
241 | 0x24f08002, | 292 | 0x24f08002, |
242 | 0x0024b040, | 293 | 0x0024b040, |
294 | /* 0x0193: dispatch_done */ | ||
243 | 0xf1f71bf4, | 295 | 0xf1f71bf4, |
244 | 0xf01d0027, | 296 | 0xf01d0027, |
245 | 0x23d00137, | 297 | 0x23d00137, |
298 | /* 0x019f: cmd_nop */ | ||
246 | 0xf800f800, | 299 | 0xf800f800, |
300 | /* 0x01a1: cmd_pm_trigger */ | ||
247 | 0x0027f100, | 301 | 0x0027f100, |
248 | 0xf034bd22, | 302 | 0xf034bd22, |
249 | 0x23d00233, | 303 | 0x23d00233, |
304 | /* 0x01af: cmd_exec_set_format */ | ||
250 | 0xf400f800, | 305 | 0xf400f800, |
251 | 0x01b0f030, | 306 | 0x01b0f030, |
252 | 0x0101b000, | 307 | 0x0101b000, |
@@ -258,20 +313,26 @@ uint32_t nvc0_pcopy_code[] = { | |||
258 | 0x3847c701, | 313 | 0x3847c701, |
259 | 0xf40170b6, | 314 | 0xf40170b6, |
260 | 0x84bd0232, | 315 | 0x84bd0232, |
316 | /* 0x01da: ncomp_loop */ | ||
261 | 0x4ac494bd, | 317 | 0x4ac494bd, |
262 | 0x0445b60f, | 318 | 0x0445b60f, |
319 | /* 0x01e2: bpc_loop */ | ||
263 | 0xa430b4bd, | 320 | 0xa430b4bd, |
264 | 0x0f18f404, | 321 | 0x0f18f404, |
265 | 0xbbc0a5ff, | 322 | 0xbbc0a5ff, |
266 | 0x31f400cb, | 323 | 0x31f400cb, |
267 | 0x220ef402, | 324 | 0x220ef402, |
325 | /* 0x01f4: cmp_c0 */ | ||
268 | 0xf00c1bf4, | 326 | 0xf00c1bf4, |
269 | 0xcbbb10c7, | 327 | 0xcbbb10c7, |
270 | 0x160ef400, | 328 | 0x160ef400, |
329 | /* 0x0200: cmp_c1 */ | ||
271 | 0xf406a430, | 330 | 0xf406a430, |
272 | 0xc7f00c18, | 331 | 0xc7f00c18, |
273 | 0x00cbbb14, | 332 | 0x00cbbb14, |
333 | /* 0x020f: cmp_zero */ | ||
274 | 0xf1070ef4, | 334 | 0xf1070ef4, |
335 | /* 0x0213: bpc_next */ | ||
275 | 0x380080c7, | 336 | 0x380080c7, |
276 | 0x80b601c8, | 337 | 0x80b601c8, |
277 | 0x01b0b601, | 338 | 0x01b0b601, |
@@ -283,6 +344,7 @@ uint32_t nvc0_pcopy_code[] = { | |||
283 | 0x1d08980e, | 344 | 0x1d08980e, |
284 | 0xf40068fd, | 345 | 0xf40068fd, |
285 | 0x64bd0502, | 346 | 0x64bd0502, |
347 | /* 0x023c: dst_xcnt */ | ||
286 | 0x800075fd, | 348 | 0x800075fd, |
287 | 0x78fd1907, | 349 | 0x78fd1907, |
288 | 0x1057f100, | 350 | 0x1057f100, |
@@ -307,15 +369,18 @@ uint32_t nvc0_pcopy_code[] = { | |||
307 | 0x1c069800, | 369 | 0x1c069800, |
308 | 0xf44056d0, | 370 | 0xf44056d0, |
309 | 0x00f81030, | 371 | 0x00f81030, |
372 | /* 0x029c: cmd_exec_set_surface_tiled */ | ||
310 | 0xc7075798, | 373 | 0xc7075798, |
311 | 0x78c76879, | 374 | 0x78c76879, |
312 | 0x0380b664, | 375 | 0x0380b664, |
313 | 0xb06077c7, | 376 | 0xb06077c7, |
314 | 0x1bf40e76, | 377 | 0x1bf40e76, |
315 | 0x0477f009, | 378 | 0x0477f009, |
379 | /* 0x02b7: xtile64 */ | ||
316 | 0xf00f0ef4, | 380 | 0xf00f0ef4, |
317 | 0x70b6027c, | 381 | 0x70b6027c, |
318 | 0x0947fd11, | 382 | 0x0947fd11, |
383 | /* 0x02c3: xtileok */ | ||
319 | 0x980677f0, | 384 | 0x980677f0, |
320 | 0x5b980c5a, | 385 | 0x5b980c5a, |
321 | 0x00abfd0e, | 386 | 0x00abfd0e, |
@@ -374,6 +439,7 @@ uint32_t nvc0_pcopy_code[] = { | |||
374 | 0xb70067d0, | 439 | 0xb70067d0, |
375 | 0xd0040060, | 440 | 0xd0040060, |
376 | 0x00f80068, | 441 | 0x00f80068, |
442 | /* 0x03a8: cmd_exec_set_surface_linear */ | ||
377 | 0xb7026cf0, | 443 | 0xb7026cf0, |
378 | 0xb6020260, | 444 | 0xb6020260, |
379 | 0x57980864, | 445 | 0x57980864, |
@@ -384,12 +450,15 @@ uint32_t nvc0_pcopy_code[] = { | |||
384 | 0x0060b700, | 450 | 0x0060b700, |
385 | 0x06579804, | 451 | 0x06579804, |
386 | 0xf80067d0, | 452 | 0xf80067d0, |
453 | /* 0x03d1: cmd_exec_wait */ | ||
387 | 0xf900f900, | 454 | 0xf900f900, |
388 | 0x0007f110, | 455 | 0x0007f110, |
389 | 0x0604b608, | 456 | 0x0604b608, |
457 | /* 0x03dc: loop */ | ||
390 | 0xf00001cf, | 458 | 0xf00001cf, |
391 | 0x1bf40114, | 459 | 0x1bf40114, |
392 | 0xfc10fcfa, | 460 | 0xfc10fcfa, |
461 | /* 0x03eb: cmd_exec_query */ | ||
393 | 0xc800f800, | 462 | 0xc800f800, |
394 | 0x1bf40d34, | 463 | 0x1bf40d34, |
395 | 0xd121f570, | 464 | 0xd121f570, |
@@ -419,6 +488,7 @@ uint32_t nvc0_pcopy_code[] = { | |||
419 | 0x0153f026, | 488 | 0x0153f026, |
420 | 0x080047f1, | 489 | 0x080047f1, |
421 | 0xd00644b6, | 490 | 0xd00644b6, |
491 | /* 0x045e: query_counter */ | ||
422 | 0x21f50045, | 492 | 0x21f50045, |
423 | 0x47f103d1, | 493 | 0x47f103d1, |
424 | 0x44b6080c, | 494 | 0x44b6080c, |
@@ -442,11 +512,13 @@ uint32_t nvc0_pcopy_code[] = { | |||
442 | 0x080047f1, | 512 | 0x080047f1, |
443 | 0xd00644b6, | 513 | 0xd00644b6, |
444 | 0x00f80045, | 514 | 0x00f80045, |
515 | /* 0x04b8: cmd_exec */ | ||
445 | 0x03d121f5, | 516 | 0x03d121f5, |
446 | 0xf4003fc8, | 517 | 0xf4003fc8, |
447 | 0x21f50e0b, | 518 | 0x21f50e0b, |
448 | 0x47f101af, | 519 | 0x47f101af, |
449 | 0x0ef40200, | 520 | 0x0ef40200, |
521 | /* 0x04cd: cmd_exec_no_format */ | ||
450 | 0x1067f11e, | 522 | 0x1067f11e, |
451 | 0x0664b608, | 523 | 0x0664b608, |
452 | 0x800177f0, | 524 | 0x800177f0, |
@@ -454,18 +526,23 @@ uint32_t nvc0_pcopy_code[] = { | |||
454 | 0x1d079819, | 526 | 0x1d079819, |
455 | 0xd00067d0, | 527 | 0xd00067d0, |
456 | 0x44bd4067, | 528 | 0x44bd4067, |
529 | /* 0x04e8: cmd_exec_init_src_surface */ | ||
457 | 0xbd0232f4, | 530 | 0xbd0232f4, |
458 | 0x043fc854, | 531 | 0x043fc854, |
459 | 0xf50a0bf4, | 532 | 0xf50a0bf4, |
460 | 0xf403a821, | 533 | 0xf403a821, |
534 | /* 0x04fa: src_tiled */ | ||
461 | 0x21f50a0e, | 535 | 0x21f50a0e, |
462 | 0x49f0029c, | 536 | 0x49f0029c, |
537 | /* 0x0501: cmd_exec_init_dst_surface */ | ||
463 | 0x0231f407, | 538 | 0x0231f407, |
464 | 0xc82c57f0, | 539 | 0xc82c57f0, |
465 | 0x0bf4083f, | 540 | 0x0bf4083f, |
466 | 0xa821f50a, | 541 | 0xa821f50a, |
467 | 0x0a0ef403, | 542 | 0x0a0ef403, |
543 | /* 0x0514: dst_tiled */ | ||
468 | 0x029c21f5, | 544 | 0x029c21f5, |
545 | /* 0x051b: cmd_exec_kick */ | ||
469 | 0xf10849f0, | 546 | 0xf10849f0, |
470 | 0xb6080057, | 547 | 0xb6080057, |
471 | 0x06980654, | 548 | 0x06980654, |
@@ -475,7 +552,9 @@ uint32_t nvc0_pcopy_code[] = { | |||
475 | 0x54d00546, | 552 | 0x54d00546, |
476 | 0x0c3fc800, | 553 | 0x0c3fc800, |
477 | 0xf5070bf4, | 554 | 0xf5070bf4, |
555 | /* 0x053f: cmd_exec_done */ | ||
478 | 0xf803eb21, | 556 | 0xf803eb21, |
557 | /* 0x0541: cmd_wrcache_flush */ | ||
479 | 0x0027f100, | 558 | 0x0027f100, |
480 | 0xf034bd22, | 559 | 0xf034bd22, |
481 | 0x23d00133, | 560 | 0x23d00133, |