aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpc.fuc52
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc114
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc.h404
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc141
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc.h505
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/fuc/hub.fuc37
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc79
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc.h869
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc125
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc.h851
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c48
11 files changed, 1152 insertions, 2073 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpc.fuc b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpc.fuc
index 3d7599d5cca6..97f775b02451 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpc.fuc
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpc.fuc
@@ -29,23 +29,26 @@
29 */ 29 */
30 30
31#ifdef INCLUDE_DATA 31#ifdef INCLUDE_DATA
32gpc_mmio_list_head: .b32 #mmio_list_base
33gpc_mmio_list_tail:
34tpc_mmio_list_head: .b32 #mmio_list_base
35tpc_mmio_list_tail:
36unk_mmio_list_head: .b32 #mmio_list_base
37unk_mmio_list_tail: .b32 #mmio_list_base
38
32gpc_id: .b32 0 39gpc_id: .b32 0
33gpc_mmio_list_head: .b32 0
34gpc_mmio_list_tail: .b32 0
35 40
36tpc_count: .b32 0 41tpc_count: .b32 0
37tpc_mask: .b32 0 42tpc_mask: .b32 0
38tpc_mmio_list_head: .b32 0
39tpc_mmio_list_tail: .b32 0
40 43
41#ifdef NVGK 44#ifdef NVGK
42unk_count: .b32 1 45unk_count: .b32 1
43unk_mask: .b32 1 46unk_mask: .b32 1
44unk_mmio_list_head: .b32 #nve4_unk_mmio_head
45unk_mmio_list_tail: .b32 #nve4_unk_mmio_tail
46#endif 47#endif
47 48
48cmd_queue: queue_init 49cmd_queue: queue_init
50
51mmio_list_base:
49#endif 52#endif
50 53
51#ifdef INCLUDE_CODE 54#ifdef INCLUDE_CODE
@@ -68,7 +71,6 @@ error:
68// fall through to main loop after completion. 71// fall through to main loop after completion.
69// 72//
70// Input: 73// Input:
71// CC_SCRATCH[0]: chipset (PMC_BOOT_0 read returns 0x0bad0bad... sigh)
72// CC_SCRATCH[1]: context base 74// CC_SCRATCH[1]: context base
73// 75//
74// Output: 76// Output:
@@ -113,23 +115,7 @@ init:
113 iord $r2 I[$r1 + 0x000] // MYINDEX 115 iord $r2 I[$r1 + 0x000] // MYINDEX
114 st b32 D[$r0 + #gpc_id] $r2 116 st b32 D[$r0 + #gpc_id] $r2
115 117
116 // find context data for this chipset
117 mov $r2 0x800
118 shl b32 $r2 6
119 iord $r2 I[$r2 + 0x000] // CC_SCRATCH[0]
120 mov $r1 #chipsets - 12
121 init_find_chipset:
122 add b32 $r1 12
123 ld b32 $r3 D[$r1 + 0x00]
124 cmpu b32 $r3 $r2
125 bra e #init_context
126 cmpu b32 $r3 0
127 bra ne #init_find_chipset
128 // unknown chipset
129 ret
130
131 // initialise context base, and size tracking 118 // initialise context base, and size tracking
132 init_context:
133 mov $r2 0x800 119 mov $r2 0x800
134 shl b32 $r2 6 120 shl b32 $r2 6
135 iord $r2 I[$r2 + 0x100] // CC_SCRATCH[1], initial base 121 iord $r2 I[$r2 + 0x100] // CC_SCRATCH[1], initial base
@@ -143,24 +129,16 @@ init:
143 iowr I[$r4 + 0x000] $r5 // MMCTX_SAVE_SWBASE 129 iowr I[$r4 + 0x000] $r5 // MMCTX_SAVE_SWBASE
144 iowr I[$r4 + 0x100] $r5 // MMCTX_LOAD_SWBASE 130 iowr I[$r4 + 0x100] $r5 // MMCTX_LOAD_SWBASE
145 131
146 // calculate GPC mmio context size, store the chipset-specific 132 // calculate GPC mmio context size
147 // mmio list pointers somewhere we can get at them later without 133 ld b32 $r14 D[$r0 + #gpc_mmio_list_head]
148 // re-parsing the chipset list 134 ld b32 $r15 D[$r0 + #gpc_mmio_list_tail]
149 clear b32 $r14
150 clear b32 $r15
151 ld b16 $r14 D[$r1 + 4]
152 ld b16 $r15 D[$r1 + 6]
153 st b16 D[$r0 + #gpc_mmio_list_head] $r14
154 st b16 D[$r0 + #gpc_mmio_list_tail] $r15
155 call #mmctx_size 135 call #mmctx_size
156 add b32 $r2 $r15 136 add b32 $r2 $r15
157 add b32 $r3 $r15 137 add b32 $r3 $r15
158 138
159 // calculate per-TPC mmio context size, store the list pointers 139 // calculate per-TPC mmio context size
160 ld b16 $r14 D[$r1 + 8] 140 ld b32 $r14 D[$r0 + #tpc_mmio_list_head]
161 ld b16 $r15 D[$r1 + 10] 141 ld b32 $r15 D[$r0 + #tpc_mmio_list_tail]
162 st b16 D[$r0 + #tpc_mmio_list_head] $r14
163 st b16 D[$r0 + #tpc_mmio_list_tail] $r15
164 call #mmctx_size 142 call #mmctx_size
165 ld b32 $r14 D[$r0 + #tpc_count] 143 ld b32 $r14 D[$r0 + #tpc_count]
166 mulu $r14 $r15 144 mulu $r14 $r15
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc
index c2d9e59bb58f..dcacfb5f6ff7 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc
@@ -29,120 +29,6 @@
29#define INCLUDE_DATA 29#define INCLUDE_DATA
30#include "com.fuc" 30#include "com.fuc"
31#include "gpc.fuc" 31#include "gpc.fuc"
32
33chipsets:
34.b8 0xc0 0 0 0
35.b16 #nvc0_gpc_mmio_head
36.b16 #nvc0_gpc_mmio_tail
37.b16 #nvc0_tpc_mmio_head
38.b16 #nvc0_tpc_mmio_tail
39.b8 0xc1 0 0 0
40.b16 #nvc0_gpc_mmio_head
41.b16 #nvc1_gpc_mmio_tail
42.b16 #nvc0_tpc_mmio_head
43.b16 #nvc1_tpc_mmio_tail
44.b8 0xc3 0 0 0
45.b16 #nvc0_gpc_mmio_head
46.b16 #nvc0_gpc_mmio_tail
47.b16 #nvc0_tpc_mmio_head
48.b16 #nvc3_tpc_mmio_tail
49.b8 0xc4 0 0 0
50.b16 #nvc0_gpc_mmio_head
51.b16 #nvc0_gpc_mmio_tail
52.b16 #nvc0_tpc_mmio_head
53.b16 #nvc3_tpc_mmio_tail
54.b8 0xc8 0 0 0
55.b16 #nvc0_gpc_mmio_head
56.b16 #nvc0_gpc_mmio_tail
57.b16 #nvc0_tpc_mmio_head
58.b16 #nvc0_tpc_mmio_tail
59.b8 0xce 0 0 0
60.b16 #nvc0_gpc_mmio_head
61.b16 #nvc0_gpc_mmio_tail
62.b16 #nvc0_tpc_mmio_head
63.b16 #nvc3_tpc_mmio_tail
64.b8 0xcf 0 0 0
65.b16 #nvc0_gpc_mmio_head
66.b16 #nvc0_gpc_mmio_tail
67.b16 #nvc0_tpc_mmio_head
68.b16 #nvc3_tpc_mmio_tail
69.b8 0xd9 0 0 0
70.b16 #nvd9_gpc_mmio_head
71.b16 #nvc1_gpc_mmio_tail
72.b16 #nvc0_tpc_mmio_head
73.b16 #nvd9_tpc_mmio_tail
74.b8 0xd7 0 0 0
75.b16 #nvd9_gpc_mmio_head
76.b16 #nvc1_gpc_mmio_tail
77.b16 #nvc0_tpc_mmio_head
78.b16 #nvd9_tpc_mmio_tail
79.b8 0 0 0 0
80
81// GPC mmio lists
82nvc0_gpc_mmio_head:
83mmctx_data(0x000408, 1)
84nvd9_gpc_mmio_head:
85mmctx_data(0x000380, 1)
86mmctx_data(0x000400, 2);
87mmctx_data(0x00040c, 3);
88mmctx_data(0x000450, 9)
89mmctx_data(0x000600, 1)
90mmctx_data(0x000684, 1)
91mmctx_data(0x000700, 5)
92mmctx_data(0x000800, 1)
93mmctx_data(0x000808, 3)
94mmctx_data(0x000828, 1)
95mmctx_data(0x000830, 1)
96mmctx_data(0x0008d8, 1)
97mmctx_data(0x0008e0, 1)
98mmctx_data(0x0008e8, 6)
99mmctx_data(0x00091c, 1)
100mmctx_data(0x000924, 3)
101mmctx_data(0x000b00, 1)
102mmctx_data(0x000b08, 6)
103mmctx_data(0x000bb8, 1)
104mmctx_data(0x000c08, 1)
105mmctx_data(0x000c10, 8)
106mmctx_data(0x000c80, 1)
107mmctx_data(0x000c8c, 1)
108mmctx_data(0x001000, 3)
109mmctx_data(0x001014, 1)
110nvc0_gpc_mmio_tail:
111mmctx_data(0x000c6c, 1);
112nvc1_gpc_mmio_tail:
113
114// TPC mmio lists
115nvc0_tpc_mmio_head:
116mmctx_data(0x000018, 1)
117mmctx_data(0x00003c, 1)
118mmctx_data(0x000048, 1)
119mmctx_data(0x000064, 1)
120mmctx_data(0x000088, 1)
121mmctx_data(0x000200, 6)
122mmctx_data(0x000300, 6)
123mmctx_data(0x0003d0, 1)
124mmctx_data(0x0003e0, 2)
125mmctx_data(0x000400, 3)
126mmctx_data(0x000420, 1)
127mmctx_data(0x0004b0, 1)
128mmctx_data(0x0004e8, 1)
129mmctx_data(0x0004f4, 1)
130mmctx_data(0x000520, 2)
131mmctx_data(0x000604, 4)
132mmctx_data(0x000644, 20)
133mmctx_data(0x000698, 1)
134mmctx_data(0x000750, 2)
135nvc0_tpc_mmio_tail:
136mmctx_data(0x00021c, 2)
137mmctx_data(0x0002c4, 1)
138mmctx_data(0x000730, 8)
139mmctx_data(0x000758, 1)
140nvc3_tpc_mmio_tail:
141mmctx_data(0x000544, 1)
142nvc1_tpc_mmio_tail:
143mmctx_data(0x000424, 2);
144mmctx_data(0x0006e0, 1);
145nvd9_tpc_mmio_tail:
146#undef INCLUDE_DATA 32#undef INCLUDE_DATA
147 33
148.section #nvc0_grgpc_code 34.section #nvc0_grgpc_code
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc.h b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc.h
index 2744ed7d86a9..50675f30d24d 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc.h
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc.h
@@ -1,17 +1,19 @@
1uint32_t nvc0_grgpc_data[] = { 1uint32_t nvc0_grgpc_data[] = {
2/* 0x0000: gpc_id */ 2/* 0x0000: gpc_mmio_list_head */
3 0x00000000, 3 0x00000064,
4/* 0x0004: gpc_mmio_list_head */ 4/* 0x0004: gpc_mmio_list_tail */
5 0x00000000, 5/* 0x0004: tpc_mmio_list_head */
6/* 0x0008: gpc_mmio_list_tail */ 6 0x00000064,
7 0x00000000, 7/* 0x0008: tpc_mmio_list_tail */
8/* 0x000c: tpc_count */ 8/* 0x0008: unk_mmio_list_head */
9 0x00000000, 9 0x00000064,
10/* 0x0010: tpc_mask */ 10/* 0x000c: unk_mmio_list_tail */
11 0x00000064,
12/* 0x0010: gpc_id */
11 0x00000000, 13 0x00000000,
12/* 0x0014: tpc_mmio_list_head */ 14/* 0x0014: tpc_count */
13 0x00000000, 15 0x00000000,
14/* 0x0018: tpc_mmio_list_tail */ 16/* 0x0018: tpc_mask */
15 0x00000000, 17 0x00000000,
16/* 0x001c: cmd_queue */ 18/* 0x001c: cmd_queue */
17 0x00000000, 19 0x00000000,
@@ -32,96 +34,6 @@ uint32_t nvc0_grgpc_data[] = {
32 0x00000000, 34 0x00000000,
33 0x00000000, 35 0x00000000,
34 0x00000000, 36 0x00000000,
35/* 0x0064: chipsets */
36 0x000000c0,
37 0x013c00d4,
38 0x018c0140,
39 0x000000c1,
40 0x014000d4,
41 0x01a00140,
42 0x000000c3,
43 0x013c00d4,
44 0x019c0140,
45 0x000000c4,
46 0x013c00d4,
47 0x019c0140,
48 0x000000c8,
49 0x013c00d4,
50 0x018c0140,
51 0x000000ce,
52 0x013c00d4,
53 0x019c0140,
54 0x000000cf,
55 0x013c00d4,
56 0x019c0140,
57 0x000000d9,
58 0x014000d8,
59 0x01a80140,
60 0x000000d7,
61 0x014000d8,
62 0x01a80140,
63 0x00000000,
64/* 0x00d4: nvc0_gpc_mmio_head */
65 0x00000408,
66/* 0x00d8: nvd9_gpc_mmio_head */
67 0x00000380,
68 0x04000400,
69 0x0800040c,
70 0x20000450,
71 0x00000600,
72 0x00000684,
73 0x10000700,
74 0x00000800,
75 0x08000808,
76 0x00000828,
77 0x00000830,
78 0x000008d8,
79 0x000008e0,
80 0x140008e8,
81 0x0000091c,
82 0x08000924,
83 0x00000b00,
84 0x14000b08,
85 0x00000bb8,
86 0x00000c08,
87 0x1c000c10,
88 0x00000c80,
89 0x00000c8c,
90 0x08001000,
91 0x00001014,
92/* 0x013c: nvc0_gpc_mmio_tail */
93 0x00000c6c,
94/* 0x0140: nvc1_gpc_mmio_tail */
95/* 0x0140: nvc0_tpc_mmio_head */
96 0x00000018,
97 0x0000003c,
98 0x00000048,
99 0x00000064,
100 0x00000088,
101 0x14000200,
102 0x14000300,
103 0x000003d0,
104 0x040003e0,
105 0x08000400,
106 0x00000420,
107 0x000004b0,
108 0x000004e8,
109 0x000004f4,
110 0x04000520,
111 0x0c000604,
112 0x4c000644,
113 0x00000698,
114 0x04000750,
115/* 0x018c: nvc0_tpc_mmio_tail */
116 0x0400021c,
117 0x000002c4,
118 0x1c000730,
119 0x00000758,
120/* 0x019c: nvc3_tpc_mmio_tail */
121 0x00000544,
122/* 0x01a0: nvc1_tpc_mmio_tail */
123 0x04000424,
124 0x000006e0,
125}; 37};
126 38
127uint32_t nvc0_grgpc_code[] = { 39uint32_t nvc0_grgpc_code[] = {
@@ -355,7 +267,7 @@ uint32_t nvc0_grgpc_code[] = {
355 0xf10004fe, 267 0xf10004fe,
356 0xf0120017, 268 0xf0120017,
357 0x12d00227, 269 0x12d00227,
358 0x3e17f100, 270 0x0d17f100,
359 0x0010fe04, 271 0x0010fe04,
360 0x040017f1, 272 0x040017f1,
361 0xf0c010d0, 273 0xf0c010d0,
@@ -367,154 +279,152 @@ uint32_t nvc0_grgpc_code[] = {
367 0x1f24f001, 279 0x1f24f001,
368 0xb60432bb, 280 0xb60432bb,
369 0x02800132, 281 0x02800132,
370 0x04038003, 282 0x06038005,
371 0x040010b7, 283 0x040010b7,
372 0x800012cf, 284 0x800012cf,
373 0x27f10002, 285 0x27f10402,
374 0x24b60800, 286 0x24b60800,
375 0x0022cf06, 287 0x4022cf06,
376/* 0x035f: init_find_chipset */ 288 0x47f134bd,
377 0xb65817f0, 289 0x44b60700,
378 0x13980c10, 290 0x08259506,
379 0x0432b800, 291 0xd00045d0,
380 0xb00b0bf4, 292 0x0e984045,
381 0x1bf40034, 293 0x010f9800,
382/* 0x0373: init_context */ 294 0x013d21f5,
383 0xf100f8f1, 295 0xbb002fbb,
384 0xb6080027, 296 0x0e98003f,
385 0x22cf0624, 297 0x020f9801,
386 0xf134bd40, 298 0x013d21f5,
387 0xb6070047, 299 0xfd050e98,
388 0x25950644, 300 0x2ebb00ef,
389 0x0045d008, 301 0x003ebb00,
390 0xbd4045d0, 302 0x130040b7,
391 0x58f4bde4, 303 0xd00235b6,
392 0x1f58021e, 304 0x25b60043,
393 0x020e4003, 305 0x0635b608,
394 0xf5040f40, 306 0xb60120b6,
395 0xbb013d21, 307 0x24b60130,
396 0x3fbb002f, 308 0x0834b608,
397 0x041e5800, 309 0xf5022fb9,
398 0x40051f58, 310 0xbb026321,
399 0x0f400a0e, 311 0x17f1003f,
400 0x3d21f50c, 312 0x14b60800,
401 0x030e9801, 313 0x4013d006,
402 0xbb00effd, 314 0x080010b7,
403 0x3ebb002e, 315 0x29f024bd,
404 0x0040b700, 316 0x0012d01f,
405 0x0235b613, 317/* 0x03d0: main */
406 0xb60043d0, 318 0xf40031f4,
407 0x35b60825, 319 0xd7f00028,
408 0x0120b606, 320 0x3921f41c,
409 0xb60130b6, 321 0xb0f401f4,
410 0x34b60824, 322 0x18f404e4,
411 0x022fb908, 323 0x0181fe1e,
412 0x026321f5, 324 0xbd0627f0,
413 0xf1003fbb, 325 0x0412fd20,
414 0xb6080017, 326 0xfd01e4b6,
415 0x13d00614, 327 0x18fe051e,
416 0x0010b740, 328 0x9221f500,
417 0xf024bd08, 329 0xd30ef404,
418 0x12d01f29, 330/* 0x0400: main_not_ctx_xfer */
419/* 0x0401: main */ 331 0xf010ef94,
420 0x0031f400, 332 0x21f501f5,
421 0xf00028f4, 333 0x0ef402ec,
422 0x21f41cd7, 334/* 0x040d: ih */
423 0xf401f439, 335 0xfe80f9c6,
424 0xf404e4b0, 336 0x80f90188,
425 0x81fe1e18, 337 0xa0f990f9,
426 0x0627f001, 338 0xd0f9b0f9,
427 0x12fd20bd, 339 0xf0f9e0f9,
428 0x01e4b604, 340 0xc4800acf,
429 0xfe051efd, 341 0x0bf404ab,
430 0x21f50018, 342 0x00b7f11d,
431 0x0ef404c3, 343 0x1cd7f019,
432/* 0x0431: main_not_ctx_xfer */ 344 0xcf40becf,
433 0x10ef94d3, 345 0x21f400bf,
434 0xf501f5f0, 346 0x00b0b704,
435 0xf402ec21, 347 0x01e7f004,
436/* 0x043e: ih */ 348/* 0x0443: ih_no_fifo */
437 0x80f9c60e, 349 0xd000bed0,
438 0xf90188fe, 350 0xf0fc400a,
439 0xf990f980, 351 0xd0fce0fc,
440 0xf9b0f9a0, 352 0xa0fcb0fc,
441 0xf9e0f9d0, 353 0x80fc90fc,
442 0x800acff0, 354 0xfc0088fe,
443 0xf404abc4, 355 0x0032f480,
444 0xb7f11d0b, 356/* 0x045e: hub_barrier_done */
445 0xd7f01900, 357 0xf7f001f8,
446 0x40becf1c, 358 0x040e9801,
447 0xf400bfcf, 359 0xf104febb,
448 0xb0b70421, 360 0xf09418e7,
449 0xe7f00400, 361 0x21f440e3,
450 0x00bed001, 362/* 0x0473: ctx_redswitch */
451/* 0x0474: ih_no_fifo */ 363 0xf100f88d,
452 0xfc400ad0, 364 0xb60614e7,
453 0xfce0fcf0, 365 0xf7f006e4,
454 0xfcb0fcd0, 366 0x00efd020,
455 0xfc90fca0, 367/* 0x0483: ctx_redswitch_delay */
456 0x0088fe80, 368 0xb608f7f0,
457 0x32f480fc, 369 0x1bf401f2,
458/* 0x048f: hub_barrier_done */ 370 0x20f7f1fd,
459 0xf001f800, 371 0x00efd00a,
460 0x0e9801f7, 372/* 0x0492: ctx_xfer */
461 0x04febb00, 373 0x17f100f8,
462 0x9418e7f1, 374 0x14b60a04,
463 0xf440e3f0, 375 0x001fd006,
464 0x00f88d21, 376 0xf50711f4,
465/* 0x04a4: ctx_redswitch */ 377/* 0x04a3: ctx_xfer_not_load */
466 0x0614e7f1, 378 0xf1047321,
467 0xf006e4b6, 379 0xf04afc17,
468 0xefd020f7, 380 0x27f00213,
469 0x08f7f000, 381 0x0012d00c,
470/* 0x04b4: ctx_redswitch_delay */ 382 0x020721f5,
471 0xf401f2b6, 383 0x47fc27f1,
472 0xf7f1fd1b, 384 0xd00223f0,
473 0xefd00a20, 385 0x2cf00020,
474/* 0x04c3: ctx_xfer */ 386 0x0320b601,
475 0xf100f800, 387 0xf00012d0,
476 0xb60a0417, 388 0xa5f001ac,
477 0x1fd00614, 389 0x00b7f002,
478 0x0711f400, 390 0x9850b3f0,
479 0x04a421f5, 391 0xc4b6040c,
480/* 0x04d4: ctx_xfer_not_load */ 392 0x00bcbb0f,
481 0x4afc17f1, 393 0x98000c98,
482 0xf00213f0, 394 0xe7f0010d,
483 0x12d00c27, 395 0x5c21f500,
484 0x0721f500, 396 0x01acf001,
485 0xfc27f102, 397 0x4000b7f1,
486 0x0223f047, 398 0x9850b3f0,
487 0xf00020d0, 399 0xc4b6040c,
488 0x20b6012c, 400 0x00bcbb0f,
489 0x0012d003, 401 0x98010c98,
490 0xf001acf0, 402 0x0f98020d,
491 0xb7f002a5, 403 0x00e7f106,
492 0x50b3f000, 404 0x5c21f508,
493 0xb6000c98, 405 0x0721f501,
494 0xbcbb0fc4, 406 0x0601f402,
495 0x010c9800, 407/* 0x0517: ctx_xfer_post */
496 0xf0020d98, 408 0xf11412f4,
497 0x21f500e7, 409 0xf04afc17,
498 0xacf0015c, 410 0x27f00213,
499 0x00b7f101, 411 0x0012d00d,
500 0x50b3f040, 412 0x020721f5,
501 0xb6000c98, 413/* 0x0528: ctx_xfer_done */
502 0xbcbb0fc4, 414 0x045e21f5,
503 0x050c9800, 415 0x000000f8,
504 0x98060d98, 416 0x00000000,
505 0xe7f1040f, 417 0x00000000,
506 0x21f50800, 418 0x00000000,
507 0x21f5015c, 419 0x00000000,
508 0x01f40207, 420 0x00000000,
509 0x1412f406, 421 0x00000000,
510/* 0x0548: ctx_xfer_post */ 422 0x00000000,
511 0x4afc17f1, 423 0x00000000,
512 0xf00213f0, 424 0x00000000,
513 0x12d00d27, 425 0x00000000,
514 0x0721f500, 426 0x00000000,
515/* 0x0559: ctx_xfer_done */ 427 0x00000000,
516 0x8f21f502,
517 0x0000f804,
518 0x00000000, 428 0x00000000,
519 0x00000000, 429 0x00000000,
520 0x00000000, 430 0x00000000,
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc
index 056f0d374897..b2169be2d82f 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc
@@ -29,147 +29,6 @@
29#define INCLUDE_DATA 29#define INCLUDE_DATA
30#include "com.fuc" 30#include "com.fuc"
31#include "gpc.fuc" 31#include "gpc.fuc"
32
33chipsets:
34.b8 0xe4 0 0 0
35.b16 #nve4_gpc_mmio_head
36.b16 #nve4_gpc_mmio_tail
37.b16 #nve4_tpc_mmio_head
38.b16 #nve4_tpc_mmio_tail
39.b8 0xe7 0 0 0
40.b16 #nve4_gpc_mmio_head
41.b16 #nve4_gpc_mmio_tail
42.b16 #nve4_tpc_mmio_head
43.b16 #nve4_tpc_mmio_tail
44.b8 0xe6 0 0 0
45.b16 #nve4_gpc_mmio_head
46.b16 #nve4_gpc_mmio_tail
47.b16 #nve4_tpc_mmio_head
48.b16 #nve4_tpc_mmio_tail
49.b8 0xf0 0 0 0
50.b16 #nvf0_gpc_mmio_head
51.b16 #nvf0_gpc_mmio_tail
52.b16 #nvf0_tpc_mmio_head
53.b16 #nvf0_tpc_mmio_tail
54.b8 0 0 0 0
55
56// GPC mmio lists
57nve4_gpc_mmio_head:
58mmctx_data(0x000380, 1)
59mmctx_data(0x000400, 2)
60mmctx_data(0x00040c, 3)
61mmctx_data(0x000450, 9)
62mmctx_data(0x000600, 1)
63mmctx_data(0x000684, 1)
64mmctx_data(0x000700, 5)
65mmctx_data(0x000800, 1)
66mmctx_data(0x000808, 3)
67mmctx_data(0x000828, 1)
68mmctx_data(0x000830, 1)
69mmctx_data(0x0008d8, 1)
70mmctx_data(0x0008e0, 1)
71mmctx_data(0x0008e8, 6)
72mmctx_data(0x00091c, 1)
73mmctx_data(0x000924, 3)
74mmctx_data(0x000b00, 1)
75mmctx_data(0x000b08, 6)
76mmctx_data(0x000bb8, 1)
77mmctx_data(0x000c08, 1)
78mmctx_data(0x000c10, 8)
79mmctx_data(0x000c40, 1)
80mmctx_data(0x000c6c, 1)
81mmctx_data(0x000c80, 1)
82mmctx_data(0x000c8c, 1)
83mmctx_data(0x001000, 3)
84mmctx_data(0x001014, 1)
85nve4_gpc_mmio_tail:
86
87nvf0_gpc_mmio_head:
88mmctx_data(0x000380, 1)
89mmctx_data(0x000400, 2)
90mmctx_data(0x00040c, 3)
91mmctx_data(0x000450, 9)
92mmctx_data(0x000600, 1)
93mmctx_data(0x000684, 1)
94mmctx_data(0x000700, 5)
95mmctx_data(0x000800, 1)
96mmctx_data(0x000808, 3)
97mmctx_data(0x000828, 1)
98mmctx_data(0x000830, 1)
99mmctx_data(0x0008d8, 1)
100mmctx_data(0x0008e0, 1)
101mmctx_data(0x0008e8, 6)
102mmctx_data(0x00091c, 1)
103mmctx_data(0x000924, 3)
104mmctx_data(0x000b00, 1)
105mmctx_data(0x000b08, 6)
106mmctx_data(0x000bb8, 1)
107mmctx_data(0x000c08, 1)
108mmctx_data(0x000c10, 8)
109mmctx_data(0x000c40, 1)
110mmctx_data(0x000c6c, 1)
111mmctx_data(0x000c80, 1)
112mmctx_data(0x000c8c, 1)
113mmctx_data(0x000d24, 1)
114mmctx_data(0x001000, 3)
115mmctx_data(0x001014, 1)
116nvf0_gpc_mmio_tail:
117
118// TPC mmio lists
119nve4_tpc_mmio_head:
120mmctx_data(0x000048, 1)
121mmctx_data(0x000064, 1)
122mmctx_data(0x000088, 1)
123mmctx_data(0x000200, 6)
124mmctx_data(0x00021c, 2)
125mmctx_data(0x000230, 1)
126mmctx_data(0x0002c4, 1)
127mmctx_data(0x000400, 3)
128mmctx_data(0x000420, 3)
129mmctx_data(0x0004e8, 1)
130mmctx_data(0x0004f4, 1)
131mmctx_data(0x000604, 4)
132mmctx_data(0x000644, 22)
133mmctx_data(0x0006ac, 2)
134mmctx_data(0x0006c8, 1)
135mmctx_data(0x000730, 8)
136mmctx_data(0x000758, 1)
137mmctx_data(0x000770, 1)
138mmctx_data(0x000778, 2)
139nve4_tpc_mmio_tail:
140
141nvf0_tpc_mmio_head:
142mmctx_data(0x000048, 1)
143mmctx_data(0x000064, 1)
144mmctx_data(0x000088, 1)
145mmctx_data(0x000200, 6)
146mmctx_data(0x00021c, 2)
147mmctx_data(0x000230, 1)
148mmctx_data(0x0002c4, 1)
149mmctx_data(0x000400, 3)
150mmctx_data(0x000420, 3)
151mmctx_data(0x0004e8, 1)
152mmctx_data(0x0004f4, 1)
153mmctx_data(0x000604, 4)
154mmctx_data(0x000644, 22)
155mmctx_data(0x0006ac, 2)
156mmctx_data(0x0006b8, 1)
157mmctx_data(0x0006c8, 1)
158mmctx_data(0x000730, 8)
159mmctx_data(0x000758, 1)
160mmctx_data(0x000770, 1)
161mmctx_data(0x000778, 2)
162nvf0_tpc_mmio_tail:
163
164// UNK mmio lists
165nve4_unk_mmio_head:
166mmctx_data(0x000024, 1)
167mmctx_data(0x0000c0, 2)
168mmctx_data(0x0000e4, 1)
169mmctx_data(0x000100, 6)
170mmctx_data(0x0001d0, 1)
171mmctx_data(0x0001e0, 2)
172nve4_unk_mmio_tail:
173#undef INCLUDE_DATA 32#undef INCLUDE_DATA
174 33
175.section #nve0_grgpc_code 34.section #nve0_grgpc_code
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc.h b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc.h
index 08c0f4731681..dc26c2822e9f 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc.h
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc.h
@@ -1,168 +1,43 @@
1uint32_t nve0_grgpc_data[] = { 1uint32_t nve0_grgpc_data[] = {
2/* 0x0000: gpc_id */ 2/* 0x0000: gpc_mmio_list_head */
3 0x0000006c,
4/* 0x0004: gpc_mmio_list_tail */
5/* 0x0004: tpc_mmio_list_head */
6 0x0000006c,
7/* 0x0008: tpc_mmio_list_tail */
8/* 0x0008: unk_mmio_list_head */
9 0x0000006c,
10/* 0x000c: unk_mmio_list_tail */
11 0x0000006c,
12/* 0x0010: gpc_id */
13 0x00000000,
14/* 0x0014: tpc_count */
15 0x00000000,
16/* 0x0018: tpc_mask */
17 0x00000000,
18/* 0x001c: unk_count */
19 0x00000001,
20/* 0x0020: unk_mask */
21 0x00000001,
22/* 0x0024: cmd_queue */
23 0x00000000,
24 0x00000000,
25 0x00000000,
26 0x00000000,
27 0x00000000,
28 0x00000000,
29 0x00000000,
30 0x00000000,
31 0x00000000,
32 0x00000000,
33 0x00000000,
3 0x00000000, 34 0x00000000,
4/* 0x0004: gpc_mmio_list_head */
5 0x00000000, 35 0x00000000,
6/* 0x0008: gpc_mmio_list_tail */
7 0x00000000, 36 0x00000000,
8/* 0x000c: tpc_count */
9 0x00000000, 37 0x00000000,
10/* 0x0010: tpc_mask */
11 0x00000000, 38 0x00000000,
12/* 0x0014: tpc_mmio_list_head */
13 0x00000000, 39 0x00000000,
14/* 0x0018: tpc_mmio_list_tail */
15 0x00000000, 40 0x00000000,
16/* 0x001c: unk_count */
17 0x00000001,
18/* 0x0020: unk_mask */
19 0x00000001,
20/* 0x0024: unk_mmio_list_head */
21 0x00000220,
22/* 0x0028: unk_mmio_list_tail */
23 0x00000238,
24/* 0x002c: cmd_queue */
25 0x00000000,
26 0x00000000,
27 0x00000000,
28 0x00000000,
29 0x00000000,
30 0x00000000,
31 0x00000000,
32 0x00000000,
33 0x00000000,
34 0x00000000,
35 0x00000000,
36 0x00000000,
37 0x00000000,
38 0x00000000,
39 0x00000000,
40 0x00000000,
41 0x00000000,
42 0x00000000,
43/* 0x0074: chipsets */
44 0x000000e4,
45 0x011400a8,
46 0x01d00184,
47 0x000000e7,
48 0x011400a8,
49 0x01d00184,
50 0x000000e6,
51 0x011400a8,
52 0x01d00184,
53 0x000000f0,
54 0x01840114,
55 0x022001d0,
56 0x00000000,
57/* 0x00a8: nve4_gpc_mmio_head */
58 0x00000380,
59 0x04000400,
60 0x0800040c,
61 0x20000450,
62 0x00000600,
63 0x00000684,
64 0x10000700,
65 0x00000800,
66 0x08000808,
67 0x00000828,
68 0x00000830,
69 0x000008d8,
70 0x000008e0,
71 0x140008e8,
72 0x0000091c,
73 0x08000924,
74 0x00000b00,
75 0x14000b08,
76 0x00000bb8,
77 0x00000c08,
78 0x1c000c10,
79 0x00000c40,
80 0x00000c6c,
81 0x00000c80,
82 0x00000c8c,
83 0x08001000,
84 0x00001014,
85/* 0x0114: nve4_gpc_mmio_tail */
86/* 0x0114: nvf0_gpc_mmio_head */
87 0x00000380,
88 0x04000400,
89 0x0800040c,
90 0x20000450,
91 0x00000600,
92 0x00000684,
93 0x10000700,
94 0x00000800,
95 0x08000808,
96 0x00000828,
97 0x00000830,
98 0x000008d8,
99 0x000008e0,
100 0x140008e8,
101 0x0000091c,
102 0x08000924,
103 0x00000b00,
104 0x14000b08,
105 0x00000bb8,
106 0x00000c08,
107 0x1c000c10,
108 0x00000c40,
109 0x00000c6c,
110 0x00000c80,
111 0x00000c8c,
112 0x00000d24,
113 0x08001000,
114 0x00001014,
115/* 0x0184: nvf0_gpc_mmio_tail */
116/* 0x0184: nve4_tpc_mmio_head */
117 0x00000048,
118 0x00000064,
119 0x00000088,
120 0x14000200,
121 0x0400021c,
122 0x00000230,
123 0x000002c4,
124 0x08000400,
125 0x08000420,
126 0x000004e8,
127 0x000004f4,
128 0x0c000604,
129 0x54000644,
130 0x040006ac,
131 0x000006c8,
132 0x1c000730,
133 0x00000758,
134 0x00000770,
135 0x04000778,
136/* 0x01d0: nve4_tpc_mmio_tail */
137/* 0x01d0: nvf0_tpc_mmio_head */
138 0x00000048,
139 0x00000064,
140 0x00000088,
141 0x14000200,
142 0x0400021c,
143 0x00000230,
144 0x000002c4,
145 0x08000400,
146 0x08000420,
147 0x000004e8,
148 0x000004f4,
149 0x0c000604,
150 0x54000644,
151 0x040006ac,
152 0x000006b8,
153 0x000006c8,
154 0x1c000730,
155 0x00000758,
156 0x00000770,
157 0x04000778,
158/* 0x0220: nvf0_tpc_mmio_tail */
159/* 0x0220: nve4_unk_mmio_head */
160 0x00000024,
161 0x040000c0,
162 0x000000e4,
163 0x14000100,
164 0x000001d0,
165 0x040001e0,
166}; 41};
167 42
168uint32_t nve0_grgpc_code[] = { 43uint32_t nve0_grgpc_code[] = {
@@ -396,7 +271,7 @@ uint32_t nve0_grgpc_code[] = {
396 0xf10004fe, 271 0xf10004fe,
397 0xf0120017, 272 0xf0120017,
398 0x12d00227, 273 0x12d00227,
399 0x5417f100, 274 0x2317f100,
400 0x0010fe04, 275 0x0010fe04,
401 0x040017f1, 276 0x040017f1,
402 0xf0c010d0, 277 0xf0c010d0,
@@ -408,169 +283,167 @@ uint32_t nve0_grgpc_code[] = {
408 0x1f24f001, 283 0x1f24f001,
409 0xb60432bb, 284 0xb60432bb,
410 0x02800132, 285 0x02800132,
411 0x04038003, 286 0x06038005,
412 0x040010b7, 287 0x040010b7,
413 0x800012cf, 288 0x800012cf,
414 0x27f10002, 289 0x27f10402,
415 0x24b60800, 290 0x24b60800,
416 0x0022cf06, 291 0x4022cf06,
417/* 0x035f: init_find_chipset */ 292 0x47f134bd,
418 0xb66817f0, 293 0x44b60700,
419 0x13980c10, 294 0x08259506,
420 0x0432b800, 295 0xd00045d0,
421 0xb00b0bf4, 296 0x0e984045,
422 0x1bf40034, 297 0x010f9800,
423/* 0x0373: init_context */ 298 0x013d21f5,
424 0xf100f8f1, 299 0xbb002fbb,
425 0xb6080027, 300 0x0e98003f,
426 0x22cf0624, 301 0x020f9801,
427 0xf134bd40, 302 0x013d21f5,
428 0xb6070047, 303 0xfd050e98,
429 0x25950644, 304 0x2ebb00ef,
430 0x0045d008, 305 0x003ebb00,
431 0xbd4045d0, 306 0x98020e98,
432 0x58f4bde4, 307 0x21f5030f,
433 0x1f58021e, 308 0x0e98013d,
434 0x020e4003, 309 0x00effd07,
435 0xf5040f40, 310 0xbb002ebb,
436 0xbb013d21, 311 0x40b7003e,
437 0x3fbb002f, 312 0x35b61300,
438 0x041e5800, 313 0x0043d002,
439 0x40051f58, 314 0xb60825b6,
440 0x0f400a0e, 315 0x20b60635,
441 0x3d21f50c, 316 0x0130b601,
442 0x030e9801, 317 0xb60824b6,
443 0xbb00effd, 318 0x2fb90834,
444 0x3ebb002e, 319 0x6321f502,
445 0x090e9800, 320 0x003fbb02,
446 0xf50a0f98, 321 0x080017f1,
447 0x98013d21, 322 0xd00614b6,
448 0xeffd070e, 323 0x10b74013,
449 0x002ebb00, 324 0x24bd0800,
450 0xb7003ebb, 325 0xd01f29f0,
451 0xb6130040, 326/* 0x03e6: main */
452 0x43d00235, 327 0x31f40012,
453 0x0825b600, 328 0x0028f400,
454 0xb60635b6, 329 0xf424d7f0,
455 0x30b60120, 330 0x01f43921,
456 0x0824b601, 331 0x04e4b0f4,
457 0xb90834b6, 332 0xfe1e18f4,
458 0x21f5022f, 333 0x27f00181,
459 0x3fbb0263, 334 0xfd20bd06,
460 0x0017f100, 335 0xe4b60412,
461 0x0614b608, 336 0x051efd01,
462 0xb74013d0, 337 0xf50018fe,
463 0xbd080010, 338 0xf404a821,
464 0x1f29f024, 339/* 0x0416: main_not_ctx_xfer */
465/* 0x0417: main */ 340 0xef94d30e,
466 0xf40012d0, 341 0x01f5f010,
467 0x28f40031, 342 0x02ec21f5,
468 0x2cd7f000, 343/* 0x0423: ih */
469 0xf43921f4, 344 0xf9c60ef4,
470 0xe4b0f401, 345 0x0188fe80,
471 0x1e18f404, 346 0x90f980f9,
472 0xf00181fe, 347 0xb0f9a0f9,
473 0x20bd0627, 348 0xe0f9d0f9,
474 0xb60412fd, 349 0x0acff0f9,
475 0x1efd01e4, 350 0x04abc480,
476 0x0018fe05, 351 0xf11d0bf4,
477 0x04d921f5, 352 0xf01900b7,
478/* 0x0447: main_not_ctx_xfer */ 353 0xbecf24d7,
479 0x94d30ef4, 354 0x00bfcf40,
480 0xf5f010ef, 355 0xb70421f4,
481 0xec21f501, 356 0xf00400b0,
482 0xc60ef402, 357 0xbed001e7,
483/* 0x0454: ih */ 358/* 0x0459: ih_no_fifo */
484 0x88fe80f9, 359 0x400ad000,
485 0xf980f901, 360 0xe0fcf0fc,
486 0xf9a0f990, 361 0xb0fcd0fc,
487 0xf9d0f9b0, 362 0x90fca0fc,
488 0xcff0f9e0, 363 0x88fe80fc,
489 0xabc4800a, 364 0xf480fc00,
490 0x1d0bf404, 365 0x01f80032,
491 0x1900b7f1, 366/* 0x0474: hub_barrier_done */
492 0xcf2cd7f0, 367 0x9801f7f0,
493 0xbfcf40be, 368 0xfebb040e,
494 0x0421f400, 369 0x18e7f104,
495 0x0400b0b7, 370 0x40e3f094,
496 0xd001e7f0, 371 0xf88d21f4,
497/* 0x048a: ih_no_fifo */ 372/* 0x0489: ctx_redswitch */
498 0x0ad000be, 373 0x14e7f100,
499 0xfcf0fc40, 374 0x06e4b606,
500 0xfcd0fce0, 375 0xd020f7f0,
501 0xfca0fcb0, 376 0xf7f000ef,
502 0xfe80fc90, 377/* 0x0499: ctx_redswitch_delay */
503 0x80fc0088, 378 0x01f2b608,
504 0xf80032f4, 379 0xf1fd1bf4,
505/* 0x04a5: hub_barrier_done */ 380 0xd00a20f7,
506 0x01f7f001, 381 0x00f800ef,
507 0xbb000e98, 382/* 0x04a8: ctx_xfer */
508 0xe7f104fe, 383 0x0a0417f1,
509 0xe3f09418, 384 0xd00614b6,
510 0x8d21f440, 385 0x11f4001f,
511/* 0x04ba: ctx_redswitch */ 386 0x8921f507,
512 0xe7f100f8, 387/* 0x04b9: ctx_xfer_not_load */
513 0xe4b60614, 388 0xfc17f104,
514 0x20f7f006,
515 0xf000efd0,
516/* 0x04ca: ctx_redswitch_delay */
517 0xf2b608f7,
518 0xfd1bf401,
519 0x0a20f7f1,
520 0xf800efd0,
521/* 0x04d9: ctx_xfer */
522 0x0417f100,
523 0x0614b60a,
524 0xf4001fd0,
525 0x21f50711,
526/* 0x04ea: ctx_xfer_not_load */
527 0x17f104ba,
528 0x13f04afc,
529 0x0c27f002,
530 0xf50012d0,
531 0xf1020721,
532 0xf047fc27,
533 0x20d00223,
534 0x012cf000,
535 0xd00320b6,
536 0xacf00012,
537 0x02a5f001,
538 0xf000b7f0,
539 0x0c9850b3,
540 0x0fc4b600,
541 0x9800bcbb,
542 0x0d98010c,
543 0x00e7f002,
544 0x015c21f5,
545 0xf101acf0,
546 0xf04000b7,
547 0x0c9850b3,
548 0x0fc4b600,
549 0x9800bcbb,
550 0x0d98050c,
551 0x040f9806,
552 0x0800e7f1,
553 0x015c21f5,
554 0xf001acf0,
555 0xb7f104a5,
556 0xb3f03000,
557 0x000c9850,
558 0xbb0fc4b6,
559 0x0c9800bc,
560 0x0a0d9809,
561 0xf1080f98,
562 0xf50200e7,
563 0xf5015c21,
564 0xf4020721,
565 0x12f40601,
566/* 0x0585: ctx_xfer_post */
567 0xfc17f114,
568 0x0213f04a, 389 0x0213f04a,
569 0xd00d27f0, 390 0xd00c27f0,
570 0x21f50012, 391 0x21f50012,
571/* 0x0596: ctx_xfer_done */ 392 0x27f10207,
572 0x21f50207, 393 0x23f047fc,
573 0x00f804a5, 394 0x0020d002,
395 0xb6012cf0,
396 0x12d00320,
397 0x01acf000,
398 0xf002a5f0,
399 0xb3f000b7,
400 0x040c9850,
401 0xbb0fc4b6,
402 0x0c9800bc,
403 0x010d9800,
404 0xf500e7f0,
405 0xf0015c21,
406 0xb7f101ac,
407 0xb3f04000,
408 0x040c9850,
409 0xbb0fc4b6,
410 0x0c9800bc,
411 0x020d9801,
412 0xf1060f98,
413 0xf50800e7,
414 0xf0015c21,
415 0xa5f001ac,
416 0x00b7f104,
417 0x50b3f030,
418 0xb6040c98,
419 0xbcbb0fc4,
420 0x020c9800,
421 0x98030d98,
422 0xe7f1080f,
423 0x21f50200,
424 0x21f5015c,
425 0x01f40207,
426 0x1412f406,
427/* 0x0554: ctx_xfer_post */
428 0x4afc17f1,
429 0xf00213f0,
430 0x12d00d27,
431 0x0721f500,
432/* 0x0565: ctx_xfer_done */
433 0x7421f502,
434 0x0000f804,
435 0x00000000,
436 0x00000000,
437 0x00000000,
438 0x00000000,
439 0x00000000,
440 0x00000000,
441 0x00000000,
442 0x00000000,
443 0x00000000,
444 0x00000000,
445 0x00000000,
446 0x00000000,
574 0x00000000, 447 0x00000000,
575 0x00000000, 448 0x00000000,
576 0x00000000, 449 0x00000000,
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hub.fuc b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hub.fuc
index 5c68bf6d69aa..2592a825e1a5 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hub.fuc
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hub.fuc
@@ -24,11 +24,12 @@
24 */ 24 */
25 25
26#ifdef INCLUDE_DATA 26#ifdef INCLUDE_DATA
27hub_mmio_list_head: .b32 #hub_mmio_list_base
28hub_mmio_list_tail: .b32 #hub_mmio_list_next
29
27gpc_count: .b32 0 30gpc_count: .b32 0
28rop_count: .b32 0 31rop_count: .b32 0
29cmd_queue: queue_init 32cmd_queue: queue_init
30hub_mmio_list_head: .b32 0
31hub_mmio_list_tail: .b32 0
32 33
33ctx_current: .b32 0 34ctx_current: .b32 0
34 35
@@ -40,6 +41,9 @@ chan_mmio_address: .b32 0
40.align 256 41.align 256
41xfer_data: .skip 256 42xfer_data: .skip 256
42 43
44hub_mmio_list_base:
45.b32 0x0417e91c // 0x17e91c, 2
46hub_mmio_list_next:
43#endif 47#endif
44 48
45#ifdef INCLUDE_CODE 49#ifdef INCLUDE_CODE
@@ -62,9 +66,6 @@ error:
62// HUB fuc initialisation, executed by triggering ucode start, will 66// HUB fuc initialisation, executed by triggering ucode start, will
63// fall through to main loop after completion. 67// fall through to main loop after completion.
64// 68//
65// Input:
66// CC_SCRATCH[0]: chipset (PMC_BOOT_0 read returns 0x0bad0bad... sigh)
67//
68// Output: 69// Output:
69// CC_SCRATCH[0]: 70// CC_SCRATCH[0]:
70// 31:31: set to signal completion 71// 31:31: set to signal completion
@@ -141,31 +142,12 @@ init:
141 iowr I[$r2 + 0x000] $r1 142 iowr I[$r2 + 0x000] $r1
142 iowr I[$r2 + 0x100] $r1 143 iowr I[$r2 + 0x100] $r1
143 144
144 // find context data for this chipset
145 mov $r2 0x800
146 shl b32 $r2 6
147 iord $r2 I[$r2 + 0x000] // CC_SCRATCH[0]
148 mov $r15 #chipsets - 8
149 init_find_chipset:
150 add b32 $r15 8
151 ld b32 $r3 D[$r15 + 0x00]
152 cmpu b32 $r3 $r2
153 bra e #init_context
154 cmpu b32 $r3 0
155 bra ne #init_find_chipset
156 // unknown chipset
157 ret
158
159 // context size calculation, reserve first 256 bytes for use by fuc 145 // context size calculation, reserve first 256 bytes for use by fuc
160 init_context:
161 mov $r1 256 146 mov $r1 256
162 147
163 // calculate size of mmio context data 148 // calculate size of mmio context data
164 ld b16 $r14 D[$r15 + 4] 149 ld b32 $r14 D[$r0 + #hub_mmio_list_head]
165 ld b16 $r15 D[$r15 + 6] 150 ld b32 $r15 D[$r0 + #hub_mmio_list_tail]
166 sethi $r14 0
167 st b32 D[$r0 + #hub_mmio_list_head] $r14
168 st b32 D[$r0 + #hub_mmio_list_tail] $r15
169 call #mmctx_size 151 call #mmctx_size
170 152
171 // set mmctx base addresses now so we don't have to do it later, 153 // set mmctx base addresses now so we don't have to do it later,
@@ -204,9 +186,6 @@ init:
204 add b32 $r14 $r4 0x804 186 add b32 $r14 $r4 0x804
205 mov b32 $r15 $r1 187 mov b32 $r15 $r1
206 call #nv_wr32 // CC_SCRATCH[1] = ctx offset 188 call #nv_wr32 // CC_SCRATCH[1] = ctx offset
207 add b32 $r14 $r4 0x800
208 mov b32 $r15 $r2
209 call #nv_wr32 // CC_SCRATCH[0] = chipset
210 add b32 $r14 $r4 0x10c 189 add b32 $r14 $r4 0x10c
211 clear b32 $r15 190 clear b32 $r15
212 call #nv_wr32 191 call #nv_wr32
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc
index f144f665b807..164d5b953c68 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc
@@ -29,85 +29,6 @@
29#define INCLUDE_DATA 29#define INCLUDE_DATA
30#include "com.fuc" 30#include "com.fuc"
31#include "hub.fuc" 31#include "hub.fuc"
32
33chipsets:
34.b8 0xc0 0 0 0
35.b16 #nvc0_hub_mmio_head
36.b16 #nvc0_hub_mmio_tail
37.b8 0xc1 0 0 0
38.b16 #nvc0_hub_mmio_head
39.b16 #nvc1_hub_mmio_tail
40.b8 0xc3 0 0 0
41.b16 #nvc0_hub_mmio_head
42.b16 #nvc0_hub_mmio_tail
43.b8 0xc4 0 0 0
44.b16 #nvc0_hub_mmio_head
45.b16 #nvc0_hub_mmio_tail
46.b8 0xc8 0 0 0
47.b16 #nvc0_hub_mmio_head
48.b16 #nvc0_hub_mmio_tail
49.b8 0xce 0 0 0
50.b16 #nvc0_hub_mmio_head
51.b16 #nvc0_hub_mmio_tail
52.b8 0xcf 0 0 0
53.b16 #nvc0_hub_mmio_head
54.b16 #nvc0_hub_mmio_tail
55.b8 0xd9 0 0 0
56.b16 #nvd9_hub_mmio_head
57.b16 #nvd9_hub_mmio_tail
58.b8 0xd7 0 0 0
59.b16 #nvd9_hub_mmio_head
60.b16 #nvd9_hub_mmio_tail
61.b8 0 0 0 0
62
63nvc0_hub_mmio_head:
64mmctx_data(0x40402c, 1)
65mmctx_data(0x404174, 1)
66nvd9_hub_mmio_head:
67mmctx_data(0x17e91c, 2)
68mmctx_data(0x400204, 2)
69mmctx_data(0x404004, 10)
70mmctx_data(0x404044, 1)
71mmctx_data(0x404094, 14)
72mmctx_data(0x4040d0, 7)
73mmctx_data(0x4040f8, 1)
74mmctx_data(0x404130, 3)
75mmctx_data(0x404150, 3)
76mmctx_data(0x404164, 2)
77mmctx_data(0x404178, 2)
78mmctx_data(0x404200, 8)
79mmctx_data(0x404404, 14)
80mmctx_data(0x404460, 4)
81mmctx_data(0x404480, 1)
82mmctx_data(0x404498, 1)
83mmctx_data(0x404604, 4)
84mmctx_data(0x404618, 32)
85mmctx_data(0x404698, 21)
86mmctx_data(0x4046f0, 2)
87mmctx_data(0x404700, 22)
88mmctx_data(0x405800, 1)
89mmctx_data(0x405830, 3)
90mmctx_data(0x405854, 1)
91mmctx_data(0x405870, 4)
92mmctx_data(0x405a00, 2)
93mmctx_data(0x405a18, 1)
94mmctx_data(0x406020, 1)
95mmctx_data(0x406028, 4)
96mmctx_data(0x4064a8, 2)
97mmctx_data(0x4064b4, 2)
98mmctx_data(0x407804, 1)
99mmctx_data(0x40780c, 6)
100mmctx_data(0x4078bc, 1)
101mmctx_data(0x408000, 7)
102mmctx_data(0x408064, 1)
103mmctx_data(0x408800, 3)
104mmctx_data(0x408900, 3)
105mmctx_data(0x408980, 1)
106nvc0_hub_mmio_tail:
107mmctx_data(0x4064c0, 2)
108nvc1_hub_mmio_tail:
109mmctx_data(0x4064bc, 3)
110nvd9_hub_mmio_tail:
111#undef INCLUDE_DATA 32#undef INCLUDE_DATA
112 33
113.section #nvc0_grhub_code 34.section #nvc0_grhub_code
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc.h b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc.h
index d1bf23001830..647452362527 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc.h
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc.h
@@ -1,9 +1,13 @@
1uint32_t nvc0_grhub_data[] = { 1uint32_t nvc0_grhub_data[] = {
2/* 0x0000: gpc_count */ 2/* 0x0000: hub_mmio_list_head */
3 0x00000300,
4/* 0x0004: hub_mmio_list_tail */
5 0x00000304,
6/* 0x0008: gpc_count */
3 0x00000000, 7 0x00000000,
4/* 0x0004: rop_count */ 8/* 0x000c: rop_count */
5 0x00000000, 9 0x00000000,
6/* 0x0008: cmd_queue */ 10/* 0x0010: cmd_queue */
7 0x00000000, 11 0x00000000,
8 0x00000000, 12 0x00000000,
9 0x00000000, 13 0x00000000,
@@ -22,10 +26,6 @@ uint32_t nvc0_grhub_data[] = {
22 0x00000000, 26 0x00000000,
23 0x00000000, 27 0x00000000,
24 0x00000000, 28 0x00000000,
25/* 0x0050: hub_mmio_list_head */
26 0x00000000,
27/* 0x0054: hub_mmio_list_tail */
28 0x00000000,
29/* 0x0058: ctx_current */ 29/* 0x0058: ctx_current */
30 0x00000000, 30 0x00000000,
31 0x00000000, 31 0x00000000,
@@ -201,73 +201,8 @@ uint32_t nvc0_grhub_data[] = {
201 0x00000000, 201 0x00000000,
202 0x00000000, 202 0x00000000,
203 0x00000000, 203 0x00000000,
204/* 0x0300: chipsets */ 204/* 0x0300: hub_mmio_list_base */
205 0x000000c0,
206 0x03f0034c,
207 0x000000c1,
208 0x03f4034c,
209 0x000000c3,
210 0x03f0034c,
211 0x000000c4,
212 0x03f0034c,
213 0x000000c8,
214 0x03f0034c,
215 0x000000ce,
216 0x03f0034c,
217 0x000000cf,
218 0x03f0034c,
219 0x000000d9,
220 0x03f80354,
221 0x000000d7,
222 0x03f80354,
223 0x00000000,
224/* 0x034c: nvc0_hub_mmio_head */
225 0x0040402c,
226 0x00404174,
227/* 0x0354: nvd9_hub_mmio_head */
228 0x0417e91c, 205 0x0417e91c,
229 0x04400204,
230 0x24404004,
231 0x00404044,
232 0x34404094,
233 0x184040d0,
234 0x004040f8,
235 0x08404130,
236 0x08404150,
237 0x04404164,
238 0x04404178,
239 0x1c404200,
240 0x34404404,
241 0x0c404460,
242 0x00404480,
243 0x00404498,
244 0x0c404604,
245 0x7c404618,
246 0x50404698,
247 0x044046f0,
248 0x54404700,
249 0x00405800,
250 0x08405830,
251 0x00405854,
252 0x0c405870,
253 0x04405a00,
254 0x00405a18,
255 0x00406020,
256 0x0c406028,
257 0x044064a8,
258 0x044064b4,
259 0x00407804,
260 0x1440780c,
261 0x004078bc,
262 0x18408000,
263 0x00408064,
264 0x08408800,
265 0x08408900,
266 0x00408980,
267/* 0x03f0: nvc0_hub_mmio_tail */
268 0x044064c0,
269/* 0x03f4: nvc1_hub_mmio_tail */
270 0x084064bc,
271}; 206};
272 207
273uint32_t nvc0_grhub_code[] = { 208uint32_t nvc0_grhub_code[] = {
@@ -503,7 +438,7 @@ uint32_t nvc0_grhub_code[] = {
503 0x0017f100, 438 0x0017f100,
504 0x0227f012, 439 0x0227f012,
505 0xf10012d0, 440 0xf10012d0,
506 0xfe05ba17, 441 0xfe058517,
507 0x17f10010, 442 0x17f10010,
508 0x10d00400, 443 0x10d00400,
509 0x0437f1c0, 444 0x0437f1c0,
@@ -527,462 +462,396 @@ uint32_t nvc0_grhub_code[] = {
527 0x9604e7f1, 462 0x9604e7f1,
528 0xf440e3f0, 463 0xf440e3f0,
529 0xf1c76821, 464 0xf1c76821,
530 0x01018090, 465 0x03018090,
531 0x801ff4f0, 466 0x801ff4f0,
532 0x17f0000f, 467 0x17f0020f,
533 0x041fbb01, 468 0x041fbb01,
534 0xf10112b6, 469 0xf10112b6,
535 0xb6040c27, 470 0xb6040c27,
536 0x21d00624, 471 0x21d00624,
537 0x4021d000, 472 0x4021d000,
538 0x080027f1, 473 0x010017f1,
539 0xcf0624b6, 474 0x98000e98,
540 0xf7f10022, 475 0x21f5010f,
541/* 0x03aa: init_find_chipset */ 476 0x37f1013d,
542 0xf0b602f8, 477 0x34b60700,
543 0x00f39808, 478 0x08149506,
544 0xf40432b8, 479 0xd00034d0,
545 0x34b00b0b, 480 0x30b74034,
546 0xf11bf400, 481 0x1fbb1300,
547/* 0x03be: init_context */ 482 0x02f5b600,
548 0x17f100f8, 483 0xb6003fd0,
549 0xfe580100, 484 0x10b60815,
550 0x03ff5802, 485 0x0814b601,
551 0x8000e3f0, 486 0xf5021fb9,
552 0x0f80140e, 487 0xbb026321,
553 0x3d21f515, 488 0x0398001f,
554 0x0037f101, 489 0x0047f102,
555 0x0634b607, 490 0x5043f020,
556 0xd0081495, 491/* 0x03e4: init_gpc */
557 0x34d00034, 492 0x08044ea0,
558 0x0030b740, 493 0xf4021fb9,
559 0x001fbb13, 494 0x4ea08d21,
560 0xd002f5b6, 495 0xf4bd010c,
561 0x15b6003f,
562 0x0110b608,
563 0xb90814b6,
564 0x21f5021f,
565 0x1fbb0263,
566 0x00039800,
567 0x200047f1,
568/* 0x040f: init_gpc */
569 0xa05043f0,
570 0xb908044e,
571 0x21f4021f,
572 0x004ea08d,
573 0x022fb908,
574 0xa08d21f4,
575 0xbd010c4e,
576 0x8d21f4f4,
577 0x01044ea0,
578 0xa08d21f4, 496 0xa08d21f4,
579 0xf001004e, 497 0xf401044e,
580 0x21f402f7, 498 0x4ea08d21,
581 0x004ea08d, 499 0xf7f00100,
582/* 0x0441: init_gpc_wait */ 500 0x8d21f402,
501 0x08004ea0,
502/* 0x040c: init_gpc_wait */
503 0xc86821f4,
504 0x0bf41fff,
505 0x044ea0fa,
583 0x6821f408, 506 0x6821f408,
584 0xf41fffc8, 507 0xb7001fbb,
585 0x4ea0fa0b, 508 0xb6800040,
586 0x21f40804, 509 0x1bf40132,
587 0x001fbb68, 510 0x0027f1be,
588 0x800040b7, 511 0x0624b608,
589 0xf40132b6, 512 0xb74021d0,
590 0x27f1b41b, 513 0xbd080020,
591 0x24b60800, 514 0x1f19f014,
592 0x4021d006, 515/* 0x043f: main */
593 0x080020b7, 516 0xf40021d0,
594 0x19f014bd, 517 0x28f40031,
595 0x0021d01f, 518 0x10d7f000,
596/* 0x0474: main */ 519 0xf43921f4,
597 0xf40031f4, 520 0xe4b1f401,
598 0xd7f00028, 521 0x1bf54001,
599 0x3921f408, 522 0x87f100d1,
600 0xb1f401f4, 523 0x84b6083c,
601 0xf54001e4, 524 0xf094bd06,
602 0xf100d11b, 525 0x89d00499,
526 0x0017f100,
527 0x0614b60b,
528 0xcf4012cf,
529 0x13c80011,
530 0x7e0bf41f,
531 0xf41f23c8,
532 0x20f95a0b,
533 0xf10212b9,
603 0xb6083c87, 534 0xb6083c87,
604 0x94bd0684, 535 0x94bd0684,
605 0xd00499f0, 536 0xd00799f0,
606 0x17f10089, 537 0x32f40089,
607 0x14b60b00, 538 0x0231f401,
608 0x4012cf06, 539 0x07f521f5,
609 0xc80011cf, 540 0x085c87f1,
610 0x0bf41f13,
611 0x1f23c87e,
612 0xf95a0bf4,
613 0x0212b920,
614 0x083c87f1,
615 0xbd0684b6, 541 0xbd0684b6,
616 0x0799f094, 542 0x0799f094,
617 0xf40089d0, 543 0xfc0089d0,
618 0x31f40132, 544 0x3c87f120,
619 0x2a21f502,
620 0x5c87f108,
621 0x0684b608, 545 0x0684b608,
622 0x99f094bd, 546 0x99f094bd,
623 0x0089d007, 547 0x0089d006,
624 0x87f120fc, 548 0xf50131f4,
625 0x84b6083c, 549 0xf107f521,
626 0xf094bd06, 550 0xb6085c87,
627 0x89d00699, 551 0x94bd0684,
628 0x0131f400, 552 0xd00699f0,
629 0x082a21f5, 553 0x0ef40089,
554/* 0x04d5: chsw_prev_no_next */
555 0xb920f931,
556 0x32f40212,
557 0x0232f401,
558 0x07f521f5,
559 0x17f120fc,
560 0x14b60b00,
561 0x0012d006,
562/* 0x04f3: chsw_no_prev */
563 0xc8130ef4,
564 0x0bf41f23,
565 0x0131f40d,
566 0xf50232f4,
567/* 0x0503: chsw_done */
568 0xf107f521,
569 0xb60b0c17,
570 0x27f00614,
571 0x0012d001,
630 0x085c87f1, 572 0x085c87f1,
631 0xbd0684b6, 573 0xbd0684b6,
632 0x0699f094, 574 0x0499f094,
633 0xf40089d0, 575 0xf50089d0,
634/* 0x050a: chsw_prev_no_next */ 576/* 0x0523: main_not_ctx_switch */
635 0x20f9310e, 577 0xb0ff200e,
636 0xf40212b9, 578 0x1bf401e4,
637 0x32f40132, 579 0x02f2b90d,
638 0x2a21f502, 580 0x078121f5,
639 0xf120fc08, 581/* 0x0533: main_not_ctx_chan */
640 0xb60b0017, 582 0xb0420ef4,
641 0x12d00614, 583 0x1bf402e4,
642 0x130ef400, 584 0x3c87f12e,
643/* 0x0528: chsw_no_prev */
644 0xf41f23c8,
645 0x31f40d0b,
646 0x0232f401,
647 0x082a21f5,
648/* 0x0538: chsw_done */
649 0x0b0c17f1,
650 0xf00614b6,
651 0x12d00127,
652 0x5c87f100,
653 0x0684b608, 585 0x0684b608,
654 0x99f094bd, 586 0x99f094bd,
655 0x0089d004, 587 0x0089d007,
656 0xff200ef5, 588 0xf40132f4,
657/* 0x0558: main_not_ctx_switch */ 589 0x21f50232,
658 0xf401e4b0, 590 0x87f107f5,
659 0xf2b90d1b, 591 0x84b6085c,
660 0xb621f502,
661 0x420ef407,
662/* 0x0568: main_not_ctx_chan */
663 0xf402e4b0,
664 0x87f12e1b,
665 0x84b6083c,
666 0xf094bd06, 592 0xf094bd06,
667 0x89d00799, 593 0x89d00799,
668 0x0132f400, 594 0x110ef400,
669 0xf50232f4, 595/* 0x0564: main_not_ctx_save */
670 0xf1082a21, 596 0xf010ef94,
671 0xb6085c87, 597 0x21f501f5,
672 0x94bd0684, 598 0x0ef502ec,
673 0xd00799f0, 599/* 0x0572: main_done */
674 0x0ef40089, 600 0x17f1fed1,
675/* 0x0599: main_not_ctx_save */ 601 0x14b60820,
676 0x10ef9411, 602 0xf024bd06,
677 0xf501f5f0, 603 0x12d01f29,
678 0xf502ec21, 604 0xbe0ef500,
679/* 0x05a7: main_done */ 605/* 0x0585: ih */
680 0xf1fed10e, 606 0xfe80f9fe,
681 0xb6082017, 607 0x80f90188,
682 0x24bd0614, 608 0xa0f990f9,
683 0xd01f29f0, 609 0xd0f9b0f9,
684 0x0ef50012, 610 0xf0f9e0f9,
685/* 0x05ba: ih */ 611 0xc4800acf,
686 0x80f9febe, 612 0x0bf404ab,
687 0xf90188fe, 613 0x00b7f11d,
688 0xf990f980, 614 0x10d7f019,
689 0xf9b0f9a0, 615 0xcf40becf,
690 0xf9e0f9d0, 616 0x21f400bf,
691 0x800acff0, 617 0x00b0b704,
692 0xf404abc4, 618 0x01e7f004,
693 0xb7f11d0b, 619/* 0x05bb: ih_no_fifo */
694 0xd7f01900, 620 0xe400bed0,
695 0x40becf08, 621 0xf40100ab,
696 0xf400bfcf, 622 0xd7f00d0b,
697 0xb0b70421, 623 0x01e7f110,
698 0xe7f00400, 624 0x0421f440,
699 0x00bed001, 625/* 0x05cc: ih_no_ctxsw */
700/* 0x05f0: ih_no_fifo */ 626 0x0104b7f1,
701 0x0100abe4, 627 0xabffb0bd,
702 0xf00d0bf4, 628 0x0d0bf4b4,
703 0xe7f108d7, 629 0x0c1ca7f1,
704 0x21f44001, 630 0xd006a4b6,
705/* 0x0601: ih_no_ctxsw */ 631/* 0x05e2: ih_no_other */
706 0x04b7f104, 632 0x0ad000ab,
707 0xffb0bd01, 633 0xfcf0fc40,
708 0x0bf4b4ab, 634 0xfcd0fce0,
709 0x1ca7f10d, 635 0xfca0fcb0,
710 0x06a4b60c, 636 0xfe80fc90,
711/* 0x0617: ih_no_other */ 637 0x80fc0088,
712 0xd000abd0, 638 0xf80032f4,
713 0xf0fc400a, 639/* 0x05fd: ctx_4160s */
714 0xd0fce0fc, 640 0x60e7f101,
715 0xa0fcb0fc, 641 0x40e3f041,
716 0x80fc90fc, 642 0xf401f7f0,
717 0xfc0088fe, 643/* 0x060a: ctx_4160s_wait */
718 0x0032f480, 644 0x21f48d21,
719/* 0x0632: ctx_4160s */ 645 0x04ffc868,
720 0xe7f101f8, 646 0xf8fa0bf4,
721 0xe3f04160, 647/* 0x0615: ctx_4160c */
722 0x01f7f040, 648 0x60e7f100,
723/* 0x063f: ctx_4160s_wait */ 649 0x40e3f041,
724 0xf48d21f4, 650 0x21f4f4bd,
725 0xffc86821, 651/* 0x0623: ctx_4170s */
726 0xfa0bf404,
727/* 0x064a: ctx_4160c */
728 0xe7f100f8,
729 0xe3f04160,
730 0xf4f4bd40,
731 0x00f88d21,
732/* 0x0658: ctx_4170s */
733 0x4170e7f1,
734 0xf040e3f0,
735 0x21f410f5,
736/* 0x0667: ctx_4170w */
737 0xf100f88d, 652 0xf100f88d,
738 0xf04170e7, 653 0xf04170e7,
739 0x21f440e3, 654 0xf5f040e3,
740 0x10f4f068, 655 0x8d21f410,
741 0xf8f31bf4, 656/* 0x0632: ctx_4170w */
742/* 0x0679: ctx_redswitch */ 657 0xe7f100f8,
743 0x14e7f100, 658 0xe3f04170,
744 0x06e4b606, 659 0x6821f440,
745 0x0270f7f1, 660 0xf410f4f0,
746 0xf000efd0, 661 0x00f8f31b,
747/* 0x068a: ctx_redswitch_delay */ 662/* 0x0644: ctx_redswitch */
748 0xf2b608f7, 663 0x0614e7f1,
749 0xfd1bf401, 664 0xf106e4b6,
750 0x0770f7f1, 665 0xd00270f7,
751 0xf800efd0, 666 0xf7f000ef,
752/* 0x0699: ctx_86c */ 667/* 0x0655: ctx_redswitch_delay */
753 0x6ce7f100, 668 0x01f2b608,
754 0x06e4b608, 669 0xf1fd1bf4,
755 0xf100efd0, 670 0xd00770f7,
756 0xf08a14e7, 671 0x00f800ef,
757 0x21f440e3, 672/* 0x0664: ctx_86c */
758 0x6ce7f18d, 673 0x086ce7f1,
759 0x41e3f0a8, 674 0xd006e4b6,
760 0xf88d21f4, 675 0xe7f100ef,
761/* 0x06b9: ctx_load */ 676 0xe3f08a14,
762 0x3c87f100, 677 0x8d21f440,
763 0x0684b608, 678 0xa86ce7f1,
764 0x99f094bd, 679 0xf441e3f0,
765 0x0089d005, 680 0x00f88d21,
766 0xf40ca7f0, 681/* 0x0684: ctx_load */
767 0x17f1c921,
768 0x14b60a24,
769 0x0010d006,
770 0x0b0037f1,
771 0xd00634b6,
772 0x17f14032,
773 0x14b60a0c,
774 0x0747f006,
775 0xd00012d0,
776/* 0x06f2: ctx_chan_wait_0 */
777 0x14cf4014,
778 0x1f44f040,
779 0xd0fa1bf4,
780 0x0bfe0032,
781 0x1f2af000,
782 0xb60424b6,
783 0x87f10220,
784 0x84b6083c,
785 0xf094bd06,
786 0x89d00899,
787 0x0417f100,
788 0x0614b60a,
789 0xf10012d0,
790 0xb60a2017,
791 0x27f00614,
792 0x0023f102,
793 0x0012d080,
794 0xf11017f0,
795 0xf0020027,
796 0x12fa0223,
797 0xf103f805,
798 0xb6085c87,
799 0x94bd0684,
800 0xd00899f0,
801 0x01980089,
802 0x1814b681,
803 0xb6800298,
804 0x12fd0825,
805 0x16018005,
806 0x083c87f1, 682 0x083c87f1,
807 0xbd0684b6, 683 0xbd0684b6,
808 0x0999f094, 684 0x0599f094,
809 0xf10089d0, 685 0xf00089d0,
810 0xb60a0427, 686 0x21f40ca7,
811 0x21d00624, 687 0x2417f1c9,
812 0x0127f000, 688 0x0614b60a,
813 0x0a2017f1, 689 0xf10010d0,
690 0xb60b0037,
691 0x32d00634,
692 0x0c17f140,
693 0x0614b60a,
694 0xd00747f0,
695 0x14d00012,
696/* 0x06bd: ctx_chan_wait_0 */
697 0x4014cf40,
698 0xf41f44f0,
699 0x32d0fa1b,
700 0x000bfe00,
701 0xb61f2af0,
702 0x20b60424,
703 0x3c87f102,
704 0x0684b608,
705 0x99f094bd,
706 0x0089d008,
707 0x0a0417f1,
814 0xd00614b6, 708 0xd00614b6,
815 0x17f10012, 709 0x17f10012,
816 0x13f00100, 710 0x14b60a20,
817 0x0501fa06, 711 0x0227f006,
712 0x800023f1,
713 0xf00012d0,
714 0x27f11017,
715 0x23f00200,
716 0x0512fa02,
818 0x87f103f8, 717 0x87f103f8,
819 0x84b6085c, 718 0x84b6085c,
820 0xf094bd06, 719 0xf094bd06,
821 0x89d00999, 720 0x89d00899,
822 0x5c87f100, 721 0x81019800,
722 0x981814b6,
723 0x25b68002,
724 0x0512fd08,
725 0xf1160180,
726 0xb6083c87,
727 0x94bd0684,
728 0xd00999f0,
729 0x27f10089,
730 0x24b60a04,
731 0x0021d006,
732 0xf10127f0,
733 0xb60a2017,
734 0x12d00614,
735 0x0017f100,
736 0x0613f001,
737 0xf80501fa,
738 0x5c87f103,
823 0x0684b608, 739 0x0684b608,
824 0x99f094bd, 740 0x99f094bd,
825 0x0089d005, 741 0x0089d009,
826/* 0x07b6: ctx_chan */ 742 0x085c87f1,
827 0x21f500f8, 743 0xbd0684b6,
828 0x21f50632, 744 0x0599f094,
829 0xa7f006b9, 745 0xf80089d0,
830 0xc921f40c, 746/* 0x0781: ctx_chan */
831 0x0a1017f1, 747 0xfd21f500,
832 0xf00614b6, 748 0x8421f505,
833 0x12d00527, 749 0x0ca7f006,
834/* 0x07d1: ctx_chan_wait */ 750 0xf1c921f4,
835 0x0012cf00, 751 0xb60a1017,
836 0xf40522fd, 752 0x27f00614,
837 0x21f5fa1b, 753 0x0012d005,
838 0x00f8064a, 754/* 0x079c: ctx_chan_wait */
839/* 0x07e0: ctx_mmio_exec */ 755 0xfd0012cf,
840 0xf1410398, 756 0x1bf40522,
841 0xb60a0427, 757 0x1521f5fa,
842 0x23d00624, 758/* 0x07ab: ctx_mmio_exec */
843/* 0x07ef: ctx_mmio_loop */ 759 0x9800f806,
844 0xc434bd00, 760 0x27f14103,
845 0x1bf4ff34, 761 0x24b60a04,
846 0x0057f10f, 762 0x0023d006,
847 0x0653f002, 763/* 0x07ba: ctx_mmio_loop */
848 0xf80535fa, 764 0x34c434bd,
849/* 0x0801: ctx_mmio_pull */ 765 0x0f1bf4ff,
850 0x804e9803, 766 0x020057f1,
851 0xf4814f98, 767 0xfa0653f0,
852 0x30b68d21, 768 0x03f80535,
853 0x0112b608, 769/* 0x07cc: ctx_mmio_pull */
854/* 0x0813: ctx_mmio_done */ 770 0x98804e98,
855 0x98df1bf4, 771 0x21f4814f,
856 0x23d01603, 772 0x0830b68d,
857 0x40008000, 773 0xf40112b6,
858 0x010017f1, 774/* 0x07de: ctx_mmio_done */
859 0xfa0613f0, 775 0x0398df1b,
860 0x03f80601, 776 0x0023d016,
861/* 0x082a: ctx_xfer */ 777 0xf1400080,
862 0xf7f100f8, 778 0xf0010017,
863 0xf4b60c00, 779 0x01fa0613,
864 0x04e7f006, 780 0xf803f806,
865/* 0x0837: ctx_xfer_idle */ 781/* 0x07f5: ctx_xfer */
866 0xcf80fed0, 782 0x00f7f100,
867 0xe4f100fe, 783 0x06f4b60c,
868 0x1bf42000, 784 0xd004e7f0,
869 0x0611f4f9, 785/* 0x0802: ctx_xfer_idle */
870/* 0x0847: ctx_xfer_pre */ 786 0xfecf80fe,
871 0xf01102f4, 787 0x00e4f100,
872 0x21f510f7, 788 0xf91bf420,
873 0x21f50699, 789 0xf40611f4,
874 0x11f40632, 790/* 0x0812: ctx_xfer_pre */
875/* 0x0855: ctx_xfer_pre_load */ 791 0xf7f01102,
876 0x02f7f01c, 792 0x6421f510,
877 0x065821f5, 793 0xfd21f506,
878 0x066721f5, 794 0x1c11f405,
879 0x067921f5, 795/* 0x0820: ctx_xfer_pre_load */
880 0x21f5f4bd, 796 0xf502f7f0,
881 0x21f50658, 797 0xf5062321,
882/* 0x086e: ctx_xfer_exec */ 798 0xf5063221,
883 0x019806b9, 799 0xbd064421,
884 0x1427f116, 800 0x2321f5f4,
885 0x0624b604, 801 0x8421f506,
886 0xf10020d0, 802/* 0x0839: ctx_xfer_exec */
887 0xf0a500e7, 803 0x16019806,
888 0x1fb941e3, 804 0x041427f1,
889 0x8d21f402, 805 0xd00624b6,
890 0xf004e0b6, 806 0xe7f10020,
891 0x2cf001fc, 807 0xe3f0a500,
892 0x0124b602, 808 0x021fb941,
893 0xf405f2fd, 809 0xb68d21f4,
894 0x17f18d21, 810 0xfcf004e0,
895 0x13f04afc, 811 0x022cf001,
896 0x0c27f002, 812 0xfd0124b6,
897 0xf50012d0, 813 0x21f405f2,
898 0xf1020721, 814 0xfc17f18d,
899 0xf047fc27, 815 0x0213f04a,
900 0x20d00223, 816 0xd00c27f0,
901 0x012cf000, 817 0x21f50012,
902 0xd00320b6, 818 0x27f10207,
903 0xacf00012, 819 0x23f047fc,
904 0x06a5f001, 820 0x0020d002,
905 0x9800b7f0, 821 0xb6012cf0,
906 0x0d98140c, 822 0x12d00320,
907 0x00e7f015, 823 0x01acf000,
908 0x015c21f5, 824 0xf006a5f0,
909 0xf508a7f0, 825 0x0c9800b7,
910 0xf5010321, 826 0x010d9800,
911 0xf4020721, 827 0xf500e7f0,
912 0xa7f02201, 828 0xf0015c21,
913 0xc921f40c, 829 0x21f508a7,
914 0x0a1017f1, 830 0x21f50103,
915 0xf00614b6, 831 0x01f40207,
916 0x12d00527, 832 0x0ca7f022,
917/* 0x08f5: ctx_xfer_post_save_wait */ 833 0xf1c921f4,
918 0x0012cf00, 834 0xb60a1017,
919 0xf40522fd, 835 0x27f00614,
920 0x02f4fa1b, 836 0x0012d005,
921/* 0x0901: ctx_xfer_post */ 837/* 0x08c0: ctx_xfer_post_save_wait */
922 0x02f7f032, 838 0xfd0012cf,
923 0x065821f5, 839 0x1bf40522,
924 0x21f5f4bd, 840 0x3202f4fa,
925 0x21f50699, 841/* 0x08cc: ctx_xfer_post */
926 0x21f50226, 842 0xf502f7f0,
927 0xf4bd0667, 843 0xbd062321,
928 0x065821f5, 844 0x6421f5f4,
929 0x981011f4, 845 0x2621f506,
930 0x11fd4001, 846 0x3221f502,
931 0x070bf405, 847 0xf5f4bd06,
932 0x07e021f5, 848 0xf4062321,
933/* 0x092c: ctx_xfer_no_post_mmio */ 849 0x01981011,
934 0x064a21f5, 850 0x0511fd40,
935/* 0x0930: ctx_xfer_done */ 851 0xf5070bf4,
936 0x000000f8, 852/* 0x08f7: ctx_xfer_no_post_mmio */
937 0x00000000, 853 0xf507ab21,
938 0x00000000, 854/* 0x08fb: ctx_xfer_done */
939 0x00000000, 855 0xf8061521,
940 0x00000000,
941 0x00000000,
942 0x00000000,
943 0x00000000,
944 0x00000000,
945 0x00000000,
946 0x00000000,
947 0x00000000,
948 0x00000000,
949 0x00000000,
950 0x00000000,
951 0x00000000,
952 0x00000000,
953 0x00000000,
954 0x00000000,
955 0x00000000,
956 0x00000000,
957 0x00000000,
958 0x00000000,
959 0x00000000,
960 0x00000000,
961 0x00000000,
962 0x00000000,
963 0x00000000,
964 0x00000000,
965 0x00000000,
966 0x00000000,
967 0x00000000,
968 0x00000000,
969 0x00000000,
970 0x00000000,
971 0x00000000,
972 0x00000000,
973 0x00000000,
974 0x00000000,
975 0x00000000,
976 0x00000000,
977 0x00000000,
978 0x00000000,
979 0x00000000,
980 0x00000000,
981 0x00000000,
982 0x00000000,
983 0x00000000,
984 0x00000000,
985 0x00000000,
986 0x00000000,
987 0x00000000, 856 0x00000000,
988}; 857};
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc
index c7225db6486c..27c6a0fdfe0e 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc
@@ -29,131 +29,6 @@
29#define INCLUDE_DATA 29#define INCLUDE_DATA
30#include "com.fuc" 30#include "com.fuc"
31#include "hub.fuc" 31#include "hub.fuc"
32
33chipsets:
34.b8 0xe4 0 0 0
35.b16 #nve4_hub_mmio_head
36.b16 #nve4_hub_mmio_tail
37.b8 0xe7 0 0 0
38.b16 #nve4_hub_mmio_head
39.b16 #nve4_hub_mmio_tail
40.b8 0xe6 0 0 0
41.b16 #nve4_hub_mmio_head
42.b16 #nve4_hub_mmio_tail
43.b8 0xf0 0 0 0
44.b16 #nvf0_hub_mmio_head
45.b16 #nvf0_hub_mmio_tail
46.b8 0 0 0 0
47
48nve4_hub_mmio_head:
49mmctx_data(0x17e91c, 2)
50mmctx_data(0x400204, 2)
51mmctx_data(0x404010, 7)
52mmctx_data(0x4040a8, 9)
53mmctx_data(0x4040d0, 7)
54mmctx_data(0x4040f8, 1)
55mmctx_data(0x404130, 3)
56mmctx_data(0x404150, 3)
57mmctx_data(0x404164, 1)
58mmctx_data(0x4041a0, 4)
59mmctx_data(0x404200, 4)
60mmctx_data(0x404404, 14)
61mmctx_data(0x404460, 4)
62mmctx_data(0x404480, 1)
63mmctx_data(0x404498, 1)
64mmctx_data(0x404604, 4)
65mmctx_data(0x404618, 4)
66mmctx_data(0x40462c, 2)
67mmctx_data(0x404640, 1)
68mmctx_data(0x404654, 1)
69mmctx_data(0x404660, 1)
70mmctx_data(0x404678, 19)
71mmctx_data(0x4046c8, 3)
72mmctx_data(0x404700, 3)
73mmctx_data(0x404718, 10)
74mmctx_data(0x404744, 2)
75mmctx_data(0x404754, 1)
76mmctx_data(0x405800, 1)
77mmctx_data(0x405830, 3)
78mmctx_data(0x405854, 1)
79mmctx_data(0x405870, 4)
80mmctx_data(0x405a00, 2)
81mmctx_data(0x405a18, 1)
82mmctx_data(0x405b00, 1)
83mmctx_data(0x405b10, 1)
84mmctx_data(0x406020, 1)
85mmctx_data(0x406028, 4)
86mmctx_data(0x4064a8, 2)
87mmctx_data(0x4064b4, 2)
88mmctx_data(0x4064c0, 12)
89mmctx_data(0x4064fc, 1)
90mmctx_data(0x407040, 1)
91mmctx_data(0x407804, 1)
92mmctx_data(0x40780c, 6)
93mmctx_data(0x4078bc, 1)
94mmctx_data(0x408000, 7)
95mmctx_data(0x408064, 1)
96mmctx_data(0x408800, 3)
97mmctx_data(0x408840, 1)
98mmctx_data(0x408900, 3)
99mmctx_data(0x408980, 1)
100nve4_hub_mmio_tail:
101
102nvf0_hub_mmio_head:
103mmctx_data(0x17e91c, 2)
104mmctx_data(0x400204, 2)
105mmctx_data(0x404004, 17)
106mmctx_data(0x4040a8, 9)
107mmctx_data(0x4040d0, 7)
108mmctx_data(0x4040f8, 1)
109mmctx_data(0x404100, 10)
110mmctx_data(0x404130, 3)
111mmctx_data(0x404150, 3)
112mmctx_data(0x404164, 1)
113mmctx_data(0x40417c, 2)
114mmctx_data(0x4041a0, 4)
115mmctx_data(0x404200, 4)
116mmctx_data(0x404404, 12)
117mmctx_data(0x404438, 1)
118mmctx_data(0x404460, 4)
119mmctx_data(0x404480, 1)
120mmctx_data(0x404498, 1)
121mmctx_data(0x404604, 4)
122mmctx_data(0x404618, 4)
123mmctx_data(0x40462c, 2)
124mmctx_data(0x404640, 1)
125mmctx_data(0x404654, 1)
126mmctx_data(0x404660, 1)
127mmctx_data(0x404678, 19)
128mmctx_data(0x4046c8, 3)
129mmctx_data(0x404700, 3)
130mmctx_data(0x404718, 10)
131mmctx_data(0x404744, 2)
132mmctx_data(0x404754, 1)
133mmctx_data(0x405800, 1)
134mmctx_data(0x405830, 3)
135mmctx_data(0x405854, 1)
136mmctx_data(0x405870, 4)
137mmctx_data(0x405a00, 2)
138mmctx_data(0x405a18, 1)
139mmctx_data(0x405b00, 1)
140mmctx_data(0x405b10, 1)
141mmctx_data(0x405b20, 1)
142mmctx_data(0x406020, 1)
143mmctx_data(0x406028, 4)
144mmctx_data(0x4064a8, 5)
145mmctx_data(0x4064c0, 12)
146mmctx_data(0x4064fc, 1)
147mmctx_data(0x407804, 1)
148mmctx_data(0x40780c, 6)
149mmctx_data(0x4078bc, 1)
150mmctx_data(0x408000, 7)
151mmctx_data(0x408064, 1)
152mmctx_data(0x408800, 3)
153mmctx_data(0x408840, 1)
154mmctx_data(0x408900, 3)
155mmctx_data(0x408980, 1)
156nvf0_hub_mmio_tail:
157#undef INCLUDE_DATA 32#undef INCLUDE_DATA
158 33
159.section #nve0_grhub_code 34.section #nve0_grhub_code
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc.h b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc.h
index 623e8698ace1..973fcda48b78 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc.h
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc.h
@@ -1,9 +1,13 @@
1uint32_t nve0_grhub_data[] = { 1uint32_t nve0_grhub_data[] = {
2/* 0x0000: gpc_count */ 2/* 0x0000: hub_mmio_list_head */
3 0x00000300,
4/* 0x0004: hub_mmio_list_tail */
5 0x00000304,
6/* 0x0008: gpc_count */
3 0x00000000, 7 0x00000000,
4/* 0x0004: rop_count */ 8/* 0x000c: rop_count */
5 0x00000000, 9 0x00000000,
6/* 0x0008: cmd_queue */ 10/* 0x0010: cmd_queue */
7 0x00000000, 11 0x00000000,
8 0x00000000, 12 0x00000000,
9 0x00000000, 13 0x00000000,
@@ -22,10 +26,6 @@ uint32_t nve0_grhub_data[] = {
22 0x00000000, 26 0x00000000,
23 0x00000000, 27 0x00000000,
24 0x00000000, 28 0x00000000,
25/* 0x0050: hub_mmio_list_head */
26 0x00000000,
27/* 0x0054: hub_mmio_list_tail */
28 0x00000000,
29/* 0x0058: ctx_current */ 29/* 0x0058: ctx_current */
30 0x00000000, 30 0x00000000,
31 0x00000000, 31 0x00000000,
@@ -201,123 +201,8 @@ uint32_t nve0_grhub_data[] = {
201 0x00000000, 201 0x00000000,
202 0x00000000, 202 0x00000000,
203 0x00000000, 203 0x00000000,
204/* 0x0300: chipsets */ 204/* 0x0300: hub_mmio_list_base */
205 0x000000e4,
206 0x03f00324,
207 0x000000e7,
208 0x03f00324,
209 0x000000e6,
210 0x03f00324,
211 0x000000f0,
212 0x04c403f0,
213 0x00000000,
214/* 0x0324: nve4_hub_mmio_head */
215 0x0417e91c, 205 0x0417e91c,
216 0x04400204,
217 0x18404010,
218 0x204040a8,
219 0x184040d0,
220 0x004040f8,
221 0x08404130,
222 0x08404150,
223 0x00404164,
224 0x0c4041a0,
225 0x0c404200,
226 0x34404404,
227 0x0c404460,
228 0x00404480,
229 0x00404498,
230 0x0c404604,
231 0x0c404618,
232 0x0440462c,
233 0x00404640,
234 0x00404654,
235 0x00404660,
236 0x48404678,
237 0x084046c8,
238 0x08404700,
239 0x24404718,
240 0x04404744,
241 0x00404754,
242 0x00405800,
243 0x08405830,
244 0x00405854,
245 0x0c405870,
246 0x04405a00,
247 0x00405a18,
248 0x00405b00,
249 0x00405b10,
250 0x00406020,
251 0x0c406028,
252 0x044064a8,
253 0x044064b4,
254 0x2c4064c0,
255 0x004064fc,
256 0x00407040,
257 0x00407804,
258 0x1440780c,
259 0x004078bc,
260 0x18408000,
261 0x00408064,
262 0x08408800,
263 0x00408840,
264 0x08408900,
265 0x00408980,
266/* 0x03f0: nve4_hub_mmio_tail */
267/* 0x03f0: nvf0_hub_mmio_head */
268 0x0417e91c,
269 0x04400204,
270 0x40404004,
271 0x204040a8,
272 0x184040d0,
273 0x004040f8,
274 0x24404100,
275 0x08404130,
276 0x08404150,
277 0x00404164,
278 0x0440417c,
279 0x0c4041a0,
280 0x0c404200,
281 0x2c404404,
282 0x00404438,
283 0x0c404460,
284 0x00404480,
285 0x00404498,
286 0x0c404604,
287 0x0c404618,
288 0x0440462c,
289 0x00404640,
290 0x00404654,
291 0x00404660,
292 0x48404678,
293 0x084046c8,
294 0x08404700,
295 0x24404718,
296 0x04404744,
297 0x00404754,
298 0x00405800,
299 0x08405830,
300 0x00405854,
301 0x0c405870,
302 0x04405a00,
303 0x00405a18,
304 0x00405b00,
305 0x00405b10,
306 0x00405b20,
307 0x00406020,
308 0x0c406028,
309 0x104064a8,
310 0x2c4064c0,
311 0x004064fc,
312 0x00407804,
313 0x1440780c,
314 0x004078bc,
315 0x18408000,
316 0x00408064,
317 0x08408800,
318 0x00408840,
319 0x08408900,
320 0x00408980,
321}; 206};
322 207
323uint32_t nve0_grhub_code[] = { 208uint32_t nve0_grhub_code[] = {
@@ -553,7 +438,7 @@ uint32_t nve0_grhub_code[] = {
553 0x0017f100, 438 0x0017f100,
554 0x0227f012, 439 0x0227f012,
555 0xf10012d0, 440 0xf10012d0,
556 0xfe05ba17, 441 0xfe058517,
557 0x17f10010, 442 0x17f10010,
558 0x10d00400, 443 0x10d00400,
559 0x0437f1c0, 444 0x0437f1c0,
@@ -577,395 +462,393 @@ uint32_t nve0_grhub_code[] = {
577 0x9604e7f1, 462 0x9604e7f1,
578 0xf440e3f0, 463 0xf440e3f0,
579 0xf1c76821, 464 0xf1c76821,
580 0x01018090, 465 0x03018090,
581 0x801ff4f0, 466 0x801ff4f0,
582 0x17f0000f, 467 0x17f0020f,
583 0x041fbb01, 468 0x041fbb01,
584 0xf10112b6, 469 0xf10112b6,
585 0xb6040c27, 470 0xb6040c27,
586 0x21d00624, 471 0x21d00624,
587 0x4021d000, 472 0x4021d000,
588 0x080027f1, 473 0x010017f1,
589 0xcf0624b6, 474 0x98000e98,
590 0xf7f10022, 475 0x21f5010f,
591/* 0x03aa: init_find_chipset */ 476 0x37f1013d,
592 0xf0b602f8, 477 0x34b60700,
593 0x00f39808, 478 0x08149506,
594 0xf40432b8, 479 0xd00034d0,
595 0x34b00b0b, 480 0x30b74034,
596 0xf11bf400, 481 0x1fbb1300,
597/* 0x03be: init_context */ 482 0x02f5b600,
598 0x17f100f8, 483 0xb6003fd0,
599 0xfe580100, 484 0x10b60815,
600 0x03ff5802, 485 0x0814b601,
601 0x8000e3f0, 486 0xf5021fb9,
602 0x0f80140e, 487 0xbb026321,
603 0x3d21f515, 488 0x0398001f,
604 0x0037f101, 489 0x0047f102,
605 0x0634b607, 490 0x5043f020,
606 0xd0081495, 491/* 0x03e4: init_gpc */
607 0x34d00034, 492 0x08044ea0,
608 0x0030b740, 493 0xf4021fb9,
609 0x001fbb13, 494 0x4ea08d21,
610 0xd002f5b6, 495 0xf4bd010c,
611 0x15b6003f,
612 0x0110b608,
613 0xb90814b6,
614 0x21f5021f,
615 0x1fbb0263,
616 0x00039800,
617 0x200047f1,
618/* 0x040f: init_gpc */
619 0xa05043f0,
620 0xb908044e,
621 0x21f4021f,
622 0x004ea08d,
623 0x022fb908,
624 0xa08d21f4,
625 0xbd010c4e,
626 0x8d21f4f4,
627 0x01044ea0,
628 0xa08d21f4, 496 0xa08d21f4,
629 0xf001004e, 497 0xf401044e,
630 0x21f402f7, 498 0x4ea08d21,
631 0x004ea08d, 499 0xf7f00100,
632/* 0x0441: init_gpc_wait */ 500 0x8d21f402,
501 0x08004ea0,
502/* 0x040c: init_gpc_wait */
503 0xc86821f4,
504 0x0bf41fff,
505 0x044ea0fa,
633 0x6821f408, 506 0x6821f408,
634 0xf41fffc8, 507 0xb7001fbb,
635 0x4ea0fa0b, 508 0xb6800040,
636 0x21f40804, 509 0x1bf40132,
637 0x001fbb68, 510 0x0027f1be,
638 0x800040b7, 511 0x0624b608,
639 0xf40132b6, 512 0xb74021d0,
640 0x27f1b41b, 513 0xbd080020,
641 0x24b60800, 514 0x1f19f014,
642 0x4021d006, 515/* 0x043f: main */
643 0x080020b7, 516 0xf40021d0,
644 0x19f014bd, 517 0x28f40031,
645 0x0021d01f, 518 0x10d7f000,
646/* 0x0474: main */ 519 0xf43921f4,
647 0xf40031f4, 520 0xe4b1f401,
648 0xd7f00028, 521 0x1bf54001,
649 0x3921f408, 522 0x87f100d1,
650 0xb1f401f4, 523 0x84b6083c,
651 0xf54001e4, 524 0xf094bd06,
652 0xf100d11b, 525 0x89d00499,
526 0x0017f100,
527 0x0614b60b,
528 0xcf4012cf,
529 0x13c80011,
530 0x7e0bf41f,
531 0xf41f23c8,
532 0x20f95a0b,
533 0xf10212b9,
653 0xb6083c87, 534 0xb6083c87,
654 0x94bd0684, 535 0x94bd0684,
655 0xd00499f0, 536 0xd00799f0,
656 0x17f10089, 537 0x32f40089,
657 0x14b60b00, 538 0x0231f401,
658 0x4012cf06, 539 0x07c721f5,
659 0xc80011cf, 540 0x085c87f1,
660 0x0bf41f13,
661 0x1f23c87e,
662 0xf95a0bf4,
663 0x0212b920,
664 0x083c87f1,
665 0xbd0684b6, 541 0xbd0684b6,
666 0x0799f094, 542 0x0799f094,
667 0xf40089d0, 543 0xfc0089d0,
668 0x31f40132, 544 0x3c87f120,
669 0xfc21f502,
670 0x5c87f107,
671 0x0684b608, 545 0x0684b608,
672 0x99f094bd, 546 0x99f094bd,
673 0x0089d007, 547 0x0089d006,
674 0x87f120fc, 548 0xf50131f4,
675 0x84b6083c, 549 0xf107c721,
676 0xf094bd06, 550 0xb6085c87,
677 0x89d00699, 551 0x94bd0684,
678 0x0131f400, 552 0xd00699f0,
679 0x07fc21f5, 553 0x0ef40089,
554/* 0x04d5: chsw_prev_no_next */
555 0xb920f931,
556 0x32f40212,
557 0x0232f401,
558 0x07c721f5,
559 0x17f120fc,
560 0x14b60b00,
561 0x0012d006,
562/* 0x04f3: chsw_no_prev */
563 0xc8130ef4,
564 0x0bf41f23,
565 0x0131f40d,
566 0xf50232f4,
567/* 0x0503: chsw_done */
568 0xf107c721,
569 0xb60b0c17,
570 0x27f00614,
571 0x0012d001,
680 0x085c87f1, 572 0x085c87f1,
681 0xbd0684b6, 573 0xbd0684b6,
682 0x0699f094, 574 0x0499f094,
683 0xf40089d0, 575 0xf50089d0,
684/* 0x050a: chsw_prev_no_next */ 576/* 0x0523: main_not_ctx_switch */
685 0x20f9310e, 577 0xb0ff200e,
686 0xf40212b9, 578 0x1bf401e4,
687 0x32f40132, 579 0x02f2b90d,
688 0xfc21f502, 580 0x075b21f5,
689 0xf120fc07, 581/* 0x0533: main_not_ctx_chan */
690 0xb60b0017, 582 0xb0420ef4,
691 0x12d00614, 583 0x1bf402e4,
692 0x130ef400, 584 0x3c87f12e,
693/* 0x0528: chsw_no_prev */
694 0xf41f23c8,
695 0x31f40d0b,
696 0x0232f401,
697 0x07fc21f5,
698/* 0x0538: chsw_done */
699 0x0b0c17f1,
700 0xf00614b6,
701 0x12d00127,
702 0x5c87f100,
703 0x0684b608, 585 0x0684b608,
704 0x99f094bd, 586 0x99f094bd,
705 0x0089d004, 587 0x0089d007,
706 0xff200ef5, 588 0xf40132f4,
707/* 0x0558: main_not_ctx_switch */ 589 0x21f50232,
708 0xf401e4b0, 590 0x87f107c7,
709 0xf2b90d1b, 591 0x84b6085c,
710 0x9021f502,
711 0x420ef407,
712/* 0x0568: main_not_ctx_chan */
713 0xf402e4b0,
714 0x87f12e1b,
715 0x84b6083c,
716 0xf094bd06, 592 0xf094bd06,
717 0x89d00799, 593 0x89d00799,
718 0x0132f400, 594 0x110ef400,
719 0xf50232f4, 595/* 0x0564: main_not_ctx_save */
720 0xf107fc21, 596 0xf010ef94,
721 0xb6085c87, 597 0x21f501f5,
722 0x94bd0684, 598 0x0ef502ec,
723 0xd00799f0, 599/* 0x0572: main_done */
724 0x0ef40089, 600 0x17f1fed1,
725/* 0x0599: main_not_ctx_save */ 601 0x14b60820,
726 0x10ef9411, 602 0xf024bd06,
727 0xf501f5f0, 603 0x12d01f29,
728 0xf502ec21, 604 0xbe0ef500,
729/* 0x05a7: main_done */ 605/* 0x0585: ih */
730 0xf1fed10e, 606 0xfe80f9fe,
731 0xb6082017, 607 0x80f90188,
732 0x24bd0614, 608 0xa0f990f9,
733 0xd01f29f0, 609 0xd0f9b0f9,
734 0x0ef50012, 610 0xf0f9e0f9,
735/* 0x05ba: ih */ 611 0xc4800acf,
736 0x80f9febe, 612 0x0bf404ab,
737 0xf90188fe, 613 0x00b7f11d,
738 0xf990f980, 614 0x10d7f019,
739 0xf9b0f9a0, 615 0xcf40becf,
740 0xf9e0f9d0, 616 0x21f400bf,
741 0x800acff0, 617 0x00b0b704,
742 0xf404abc4, 618 0x01e7f004,
743 0xb7f11d0b, 619/* 0x05bb: ih_no_fifo */
744 0xd7f01900, 620 0xe400bed0,
745 0x40becf08, 621 0xf40100ab,
746 0xf400bfcf, 622 0xd7f00d0b,
747 0xb0b70421, 623 0x01e7f110,
748 0xe7f00400, 624 0x0421f440,
749 0x00bed001, 625/* 0x05cc: ih_no_ctxsw */
750/* 0x05f0: ih_no_fifo */ 626 0x0104b7f1,
751 0x0100abe4, 627 0xabffb0bd,
752 0xf00d0bf4, 628 0x0d0bf4b4,
753 0xe7f108d7, 629 0x0c1ca7f1,
754 0x21f44001, 630 0xd006a4b6,
755/* 0x0601: ih_no_ctxsw */ 631/* 0x05e2: ih_no_other */
756 0x04b7f104, 632 0x0ad000ab,
757 0xffb0bd01, 633 0xfcf0fc40,
758 0x0bf4b4ab, 634 0xfcd0fce0,
759 0x1ca7f10d, 635 0xfca0fcb0,
760 0x06a4b60c, 636 0xfe80fc90,
761/* 0x0617: ih_no_other */ 637 0x80fc0088,
762 0xd000abd0, 638 0xf80032f4,
763 0xf0fc400a, 639/* 0x05fd: ctx_4170s */
764 0xd0fce0fc, 640 0x70e7f101,
765 0xa0fcb0fc,
766 0x80fc90fc,
767 0xfc0088fe,
768 0x0032f480,
769/* 0x0632: ctx_4170s */
770 0xe7f101f8,
771 0xe3f04170,
772 0x10f5f040,
773 0xf88d21f4,
774/* 0x0641: ctx_4170w */
775 0x70e7f100,
776 0x40e3f041, 641 0x40e3f041,
777 0xf06821f4, 642 0xf410f5f0,
778 0x1bf410f4, 643 0x00f88d21,
779/* 0x0653: ctx_redswitch */ 644/* 0x060c: ctx_4170w */
780 0xf100f8f3, 645 0x4170e7f1,
781 0xb60614e7, 646 0xf440e3f0,
782 0xf7f106e4, 647 0xf4f06821,
783 0xefd00270, 648 0xf31bf410,
784 0x08f7f000, 649/* 0x061e: ctx_redswitch */
785/* 0x0664: ctx_redswitch_delay */ 650 0xe7f100f8,
786 0xf401f2b6, 651 0xe4b60614,
787 0xf7f1fd1b, 652 0x70f7f106,
788 0xefd00770, 653 0x00efd002,
789/* 0x0673: ctx_86c */ 654/* 0x062f: ctx_redswitch_delay */
790 0xf100f800, 655 0xb608f7f0,
791 0xb6086ce7, 656 0x1bf401f2,
792 0xefd006e4, 657 0x70f7f1fd,
793 0x14e7f100, 658 0x00efd007,
794 0x40e3f08a, 659/* 0x063e: ctx_86c */
795 0xf18d21f4, 660 0xe7f100f8,
796 0xf0a86ce7, 661 0xe4b6086c,
797 0x21f441e3, 662 0x00efd006,
798/* 0x0693: ctx_load */ 663 0x8a14e7f1,
799 0xf100f88d, 664 0xf440e3f0,
665 0xe7f18d21,
666 0xe3f0a86c,
667 0x8d21f441,
668/* 0x065e: ctx_load */
669 0x87f100f8,
670 0x84b6083c,
671 0xf094bd06,
672 0x89d00599,
673 0x0ca7f000,
674 0xf1c921f4,
675 0xb60a2417,
676 0x10d00614,
677 0x0037f100,
678 0x0634b60b,
679 0xf14032d0,
680 0xb60a0c17,
681 0x47f00614,
682 0x0012d007,
683/* 0x0697: ctx_chan_wait_0 */
684 0xcf4014d0,
685 0x44f04014,
686 0xfa1bf41f,
687 0xfe0032d0,
688 0x2af0000b,
689 0x0424b61f,
690 0xf10220b6,
800 0xb6083c87, 691 0xb6083c87,
801 0x94bd0684, 692 0x94bd0684,
802 0xd00599f0, 693 0xd00899f0,
803 0xa7f00089, 694 0x17f10089,
804 0xc921f40c, 695 0x14b60a04,
805 0x0a2417f1, 696 0x0012d006,
806 0xd00614b6, 697 0x0a2017f1,
807 0x37f10010,
808 0x34b60b00,
809 0x4032d006,
810 0x0a0c17f1,
811 0xf00614b6, 698 0xf00614b6,
812 0x12d00747, 699 0x23f10227,
813 0x4014d000, 700 0x12d08000,
814/* 0x06cc: ctx_chan_wait_0 */ 701 0x1017f000,
815 0xf04014cf, 702 0x020027f1,
816 0x1bf41f44, 703 0xfa0223f0,
817 0x0032d0fa, 704 0x03f80512,
818 0xf0000bfe, 705 0x085c87f1,
819 0x24b61f2a,
820 0x0220b604,
821 0x083c87f1,
822 0xbd0684b6, 706 0xbd0684b6,
823 0x0899f094, 707 0x0899f094,
824 0xf10089d0, 708 0x980089d0,
825 0xb60a0417, 709 0x14b68101,
826 0x12d00614, 710 0x80029818,
827 0x2017f100, 711 0xfd0825b6,
828 0x0614b60a, 712 0x01800512,
829 0xf10227f0, 713 0x3c87f116,
830 0xd0800023,
831 0x17f00012,
832 0x0027f110,
833 0x0223f002,
834 0xf80512fa,
835 0x5c87f103,
836 0x0684b608, 714 0x0684b608,
837 0x99f094bd, 715 0x99f094bd,
838 0x0089d008, 716 0x0089d009,
839 0xb6810198, 717 0x0a0427f1,
840 0x02981814, 718 0xd00624b6,
841 0x0825b680, 719 0x27f00021,
842 0x800512fd, 720 0x2017f101,
843 0x87f11601, 721 0x0614b60a,
844 0x84b6083c, 722 0xf10012d0,
845 0xf094bd06, 723 0xf0010017,
846 0x89d00999, 724 0x01fa0613,
847 0x0427f100, 725 0xf103f805,
848 0x0624b60a,
849 0xf00021d0,
850 0x17f10127,
851 0x14b60a20,
852 0x0012d006,
853 0x010017f1,
854 0xfa0613f0,
855 0x03f80501,
856 0x085c87f1,
857 0xbd0684b6,
858 0x0999f094,
859 0xf10089d0,
860 0xb6085c87, 726 0xb6085c87,
861 0x94bd0684, 727 0x94bd0684,
862 0xd00599f0, 728 0xd00999f0,
863 0x00f80089, 729 0x87f10089,
864/* 0x0790: ctx_chan */ 730 0x84b6085c,
865 0x069321f5, 731 0xf094bd06,
866 0xf40ca7f0, 732 0x89d00599,
867 0x17f1c921, 733/* 0x075b: ctx_chan */
868 0x14b60a10, 734 0xf500f800,
869 0x0527f006, 735 0xf0065e21,
870/* 0x07a7: ctx_chan_wait */ 736 0x21f40ca7,
871 0xcf0012d0, 737 0x1017f1c9,
872 0x22fd0012, 738 0x0614b60a,
873 0xfa1bf405, 739 0xd00527f0,
874/* 0x07b2: ctx_mmio_exec */ 740/* 0x0772: ctx_chan_wait */
875 0x039800f8, 741 0x12cf0012,
876 0x0427f141, 742 0x0522fd00,
877 0x0624b60a, 743 0xf8fa1bf4,
878 0xbd0023d0, 744/* 0x077d: ctx_mmio_exec */
879/* 0x07c1: ctx_mmio_loop */ 745 0x41039800,
880 0xff34c434, 746 0x0a0427f1,
881 0xf10f1bf4, 747 0xd00624b6,
882 0xf0020057, 748 0x34bd0023,
883 0x35fa0653, 749/* 0x078c: ctx_mmio_loop */
884/* 0x07d3: ctx_mmio_pull */ 750 0xf4ff34c4,
885 0x9803f805, 751 0x57f10f1b,
886 0x4f98804e, 752 0x53f00200,
887 0x8d21f481, 753 0x0535fa06,
888 0xb60830b6, 754/* 0x079e: ctx_mmio_pull */
889 0x1bf40112, 755 0x4e9803f8,
890/* 0x07e5: ctx_mmio_done */ 756 0x814f9880,
891 0x160398df, 757 0xb68d21f4,
892 0x800023d0, 758 0x12b60830,
893 0x17f14000, 759 0xdf1bf401,
894 0x13f00100, 760/* 0x07b0: ctx_mmio_done */
895 0x0601fa06, 761 0xd0160398,
896 0x00f803f8, 762 0x00800023,
897/* 0x07fc: ctx_xfer */ 763 0x0017f140,
898 0x0c00f7f1, 764 0x0613f001,
899 0xf006f4b6, 765 0xf80601fa,
900 0xfed004e7, 766/* 0x07c7: ctx_xfer */
901/* 0x0809: ctx_xfer_idle */ 767 0xf100f803,
902 0x00fecf80, 768 0xb60c00f7,
903 0x2000e4f1, 769 0xe7f006f4,
904 0xf4f91bf4, 770 0x80fed004,
905 0x02f40611, 771/* 0x07d4: ctx_xfer_idle */
906/* 0x0819: ctx_xfer_pre */ 772 0xf100fecf,
907 0x10f7f00d, 773 0xf42000e4,
908 0x067321f5, 774 0x11f4f91b,
909/* 0x0823: ctx_xfer_pre_load */ 775 0x0d02f406,
910 0xf01c11f4, 776/* 0x07e4: ctx_xfer_pre */
911 0x21f502f7, 777 0xf510f7f0,
912 0x21f50632, 778 0xf4063e21,
913 0x21f50641, 779/* 0x07ee: ctx_xfer_pre_load */
914 0xf4bd0653, 780 0xf7f01c11,
915 0x063221f5, 781 0xfd21f502,
916 0x069321f5, 782 0x0c21f505,
917/* 0x083c: ctx_xfer_exec */ 783 0x1e21f506,
918 0xf1160198, 784 0xf5f4bd06,
919 0xb6041427, 785 0xf505fd21,
920 0x20d00624, 786/* 0x0807: ctx_xfer_exec */
921 0x00e7f100, 787 0x98065e21,
922 0x41e3f0a5, 788 0x27f11601,
923 0xf4021fb9, 789 0x24b60414,
924 0xe0b68d21, 790 0x0020d006,
925 0x01fcf004, 791 0xa500e7f1,
926 0xb6022cf0, 792 0xb941e3f0,
927 0xf2fd0124, 793 0x21f4021f,
928 0x8d21f405, 794 0x04e0b68d,
929 0x4afc17f1, 795 0xf001fcf0,
930 0xf00213f0, 796 0x24b6022c,
931 0x12d00c27, 797 0x05f2fd01,
932 0x0721f500, 798 0xf18d21f4,
933 0xfc27f102, 799 0xf04afc17,
934 0x0223f047, 800 0x27f00213,
935 0xf00020d0, 801 0x0012d00c,
936 0x20b6012c, 802 0x020721f5,
937 0x0012d003, 803 0x47fc27f1,
938 0xf001acf0, 804 0xd00223f0,
939 0xb7f006a5, 805 0x2cf00020,
940 0x140c9800, 806 0x0320b601,
941 0xf0150d98, 807 0xf00012d0,
942 0x21f500e7, 808 0xa5f001ac,
943 0xa7f0015c, 809 0x00b7f006,
944 0x0321f508, 810 0x98000c98,
945 0x0721f501, 811 0xe7f0010d,
946 0x2201f402, 812 0x5c21f500,
947 0xf40ca7f0, 813 0x08a7f001,
948 0x17f1c921, 814 0x010321f5,
949 0x14b60a10, 815 0x020721f5,
950 0x0527f006, 816 0xf02201f4,
951/* 0x08c3: ctx_xfer_post_save_wait */ 817 0x21f40ca7,
952 0xcf0012d0, 818 0x1017f1c9,
953 0x22fd0012, 819 0x0614b60a,
954 0xfa1bf405, 820 0xd00527f0,
955/* 0x08cf: ctx_xfer_post */ 821/* 0x088e: ctx_xfer_post_save_wait */
956 0xf02e02f4, 822 0x12cf0012,
957 0x21f502f7, 823 0x0522fd00,
958 0xf4bd0632, 824 0xf4fa1bf4,
959 0x067321f5, 825/* 0x089a: ctx_xfer_post */
960 0x022621f5, 826 0xf7f02e02,
961 0x064121f5, 827 0xfd21f502,
962 0x21f5f4bd, 828 0xf5f4bd05,
963 0x11f40632, 829 0xf5063e21,
964 0x40019810, 830 0xf5022621,
965 0xf40511fd, 831 0xbd060c21,
966 0x21f5070b, 832 0xfd21f5f4,
967/* 0x08fa: ctx_xfer_no_post_mmio */ 833 0x1011f405,
968/* 0x08fa: ctx_xfer_done */ 834 0xfd400198,
969 0x00f807b2, 835 0x0bf40511,
836 0x7d21f507,
837/* 0x08c5: ctx_xfer_no_post_mmio */
838/* 0x08c5: ctx_xfer_done */
839 0x0000f807,
840 0x00000000,
841 0x00000000,
842 0x00000000,
843 0x00000000,
844 0x00000000,
845 0x00000000,
846 0x00000000,
847 0x00000000,
848 0x00000000,
849 0x00000000,
850 0x00000000,
851 0x00000000,
852 0x00000000,
970 0x00000000, 853 0x00000000,
971}; 854};
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
index 200a5c54ccad..5f7a040cf0eb 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
@@ -764,10 +764,46 @@ nvc0_graph_init_fw(struct nvc0_graph_priv *priv, u32 fuc_base,
764 } 764 }
765} 765}
766 766
767static void
768nvc0_graph_init_csdata(struct nvc0_graph_priv *priv,
769 struct nvc0_graph_init *init,
770 u32 falcon, u32 starstar, u32 base)
771{
772 u32 addr = init->addr;
773 u32 next = addr;
774 u32 star, temp;
775
776 nv_wr32(priv, falcon + 0x01c0, 0x02000000 + starstar);
777 star = nv_rd32(priv, falcon + 0x01c4);
778 temp = nv_rd32(priv, falcon + 0x01c4);
779 if (temp > star)
780 star = temp;
781 nv_wr32(priv, falcon + 0x01c0, 0x01000000 + star);
782
783 do {
784 if (init->addr != next) {
785 while (addr < next) {
786 u32 nr = min((int)(next - addr) / 4, 32);
787 nv_wr32(priv, falcon + 0x01c4,
788 ((nr - 1) << 26) | (addr - base));
789 addr += nr * 4;
790 star += 4;
791 }
792 addr = next = init->addr;
793 }
794 next += init->count * 4;
795 } while ((init++)->count);
796
797 nv_wr32(priv, falcon + 0x01c0, 0x01000004 + starstar);
798 nv_wr32(priv, falcon + 0x01c4, star);
799}
800
767int 801int
768nvc0_graph_init_ctxctl(struct nvc0_graph_priv *priv) 802nvc0_graph_init_ctxctl(struct nvc0_graph_priv *priv)
769{ 803{
770 struct nvc0_graph_oclass *oclass = (void *)nv_object(priv)->oclass; 804 struct nvc0_graph_oclass *oclass = (void *)nv_object(priv)->oclass;
805 struct nvc0_grctx_oclass *cclass = (void *)nv_engine(priv)->cclass;
806 struct nvc0_graph_init *init;
771 u32 r000260; 807 u32 r000260;
772 int i; 808 int i;
773 809
@@ -874,6 +910,10 @@ nvc0_graph_init_ctxctl(struct nvc0_graph_priv *priv)
874 nv_wr32(priv, 0x409184, oclass->fecs.ucode->code.data[i]); 910 nv_wr32(priv, 0x409184, oclass->fecs.ucode->code.data[i]);
875 } 911 }
876 912
913 for (i = 0; (init = cclass->hub[i]); i++) {
914 nvc0_graph_init_csdata(priv, init, 0x409000, 0x000, 0x000000);
915 }
916
877 /* load GPC microcode */ 917 /* load GPC microcode */
878 nv_wr32(priv, 0x41a1c0, 0x01000000); 918 nv_wr32(priv, 0x41a1c0, 0x01000000);
879 for (i = 0; i < oclass->gpccs.ucode->data.size / 4; i++) 919 for (i = 0; i < oclass->gpccs.ucode->data.size / 4; i++)
@@ -887,8 +927,14 @@ nvc0_graph_init_ctxctl(struct nvc0_graph_priv *priv)
887 } 927 }
888 nv_wr32(priv, 0x000260, r000260); 928 nv_wr32(priv, 0x000260, r000260);
889 929
930 if ((init = cclass->gpc[0]))
931 nvc0_graph_init_csdata(priv, init, 0x41a000, 0x000, 0x418000);
932 if ((init = cclass->gpc[2]))
933 nvc0_graph_init_csdata(priv, init, 0x41a000, 0x004, 0x419800);
934 if ((init = cclass->gpc[3]))
935 nvc0_graph_init_csdata(priv, init, 0x41a000, 0x008, 0x41be00);
936
890 /* start HUB ucode running, it'll init the GPCs */ 937 /* start HUB ucode running, it'll init the GPCs */
891 nv_wr32(priv, 0x409800, nv_device(priv)->chipset);
892 nv_wr32(priv, 0x40910c, 0x00000000); 938 nv_wr32(priv, 0x40910c, 0x00000000);
893 nv_wr32(priv, 0x409100, 0x00000002); 939 nv_wr32(priv, 0x409100, 0x00000002);
894 if (!nv_wait(priv, 0x409800, 0x80000000, 0x80000000)) { 940 if (!nv_wait(priv, 0x409800, 0x80000000, 0x80000000)) {