Commit 60a4acd7 authored by Ben Skeggs's avatar Ben Skeggs

drm/nvf0-/gr: ctxsw scratch reg count got bumped to 16

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent f8adeb82
......@@ -149,13 +149,9 @@ watchdog_clear:
//
wait_donez:
trace_set(T_WAIT);
mov $r8 0x818
shl b32 $r8 6
iowr I[$r8 + 0x000] $r10
nv_iowr(NV_PGRAPH_FECS_CC_SCRATCH_VAL(6), 0, $r10)
wait_donez_ne:
mov $r8 0x400
shl b32 $r8 6
iord $r8 I[$r8 + 0x000]
nv_iord($r8, NV_PGRAPH_FECS_SIGNAL, 0)
xbit $r8 $r8 $r10
bra ne #wait_donez_ne
trace_clr(T_WAIT)
......
......@@ -141,9 +141,7 @@ init:
#endif
// initialise context base, and size tracking
mov $r2 0x800
shl b32 $r2 6
iord $r2 I[$r2 + 0x100] // CC_SCRATCH[1], initial base
nv_iord($r2, NV_PGRAPH_GPCX_GPCCS_CC_SCRATCH_VAL(1), 0)
clear b32 $r3 // track GPC context size here
// set mmctx base addresses now so we don't have to do it later,
......@@ -198,13 +196,10 @@ init:
add b32 $r3 $r15
// save context size, and tell HUB we're done
mov $r1 0x800
shl b32 $r1 6
iowr I[$r1 + 0x100] $r3 // CC_SCRATCH[1] = context size
add b32 $r1 0x800
nv_iowr(NV_PGRAPH_GPCX_GPCCS_CC_SCRATCH_VAL(1), 0, $r3)
clear b32 $r2
bset $r2 31
iowr I[$r1 + 0x000] $r2 // CC_SCRATCH[0] |= 0x80000000
nv_iowr(NV_PGRAPH_GPCX_GPCCS_CC_SCRATCH_SET(0), 0, $r2)
// Main program loop, very simple, sleeps until woken up by the interrupt
// handler, pulls a command from the queue and executes its handler
......@@ -249,6 +244,7 @@ ih:
push $r13
push $r14
push $r15
clear b32 $r0
// incoming fifo command?
iord $r10 I[$r0 + 0x200] // INTR
......
......@@ -37,14 +37,14 @@ uint32_t nvc0_grgpc_data[] = {
};
uint32_t nvc0_grgpc_code[] = {
0x03060ef5,
0x03180ef5,
/* 0x0004: queue_put */
0x9800d898,
0x86f001d9,
0x0489b808,
0xf00c1bf4,
0x21f502f7,
0x00f802ec,
0x00f802fe,
/* 0x001c: queue_put_next */
0xb60798c4,
0x8dbb0384,
......@@ -76,7 +76,7 @@ uint32_t nvc0_grgpc_code[] = {
0xc800bccf,
0x1bf41fcc,
0x06a7f0fa,
0x010321f5,
0x010921f5,
0xf840bfcf,
/* 0x008d: nv_wr32 */
0x28b7f100,
......@@ -98,63 +98,66 @@ uint32_t nvc0_grgpc_code[] = {
0x0684b604,
0xf80080d0,
/* 0x00c9: wait_donez */
0x3c87f100,
0x0684b608,
0x99f094bd,
0x0089d000,
0x081887f1,
0xd00684b6,
/* 0x00e2: wait_donez_ne */
0x87f1008a,
0x84b60400,
0x0088cf06,
0xf094bd00,
0x07f10099,
0x03f00f00,
0x0009d002,
0x07f104bd,
0x03f00600,
0x000ad002,
/* 0x00e6: wait_donez_ne */
0x87f104bd,
0x83f00000,
0x0088cf01,
0xf4888aff,
0x87f1f31b,
0x84b6085c,
0xf094bd06,
0x89d00099,
/* 0x0103: wait_doneo */
0xf100f800,
0xb6083c87,
0x94bd0684,
0xd00099f0,
0x87f10089,
0x94bdf31b,
0xf10099f0,
0xf0170007,
0x09d00203,
0xf804bd00,
/* 0x0109: wait_doneo */
0xf094bd00,
0x07f10099,
0x03f00f00,
0x0009d002,
0x87f104bd,
0x84b60818,
0x008ad006,
/* 0x011c: wait_doneo_e */
/* 0x0124: wait_doneo_e */
0x040087f1,
0xcf0684b6,
0x8aff0088,
0xf30bf488,
0x085c87f1,
0xbd0684b6,
0x0099f094,
0xf80089d0,
/* 0x013d: mmctx_size */
/* 0x013f: nv_mmctx_size_loop */
0x9894bd00,
0x85b600e8,
0x0180b61a,
0xbb0284b6,
0xe0b60098,
0x04efb804,
0xb9eb1bf4,
0x00f8029f,
/* 0x015c: mmctx_xfer */
0x083c87f1,
0xbd0684b6,
0x0199f094,
0xf10089d0,
0x99f094bd,
0x0007f100,
0x0203f017,
0xbd0009d0,
/* 0x0147: mmctx_size */
0xbd00f804,
/* 0x0149: nv_mmctx_size_loop */
0x00e89894,
0xb61a85b6,
0x84b60180,
0x0098bb02,
0xb804e0b6,
0x1bf404ef,
0x029fb9eb,
/* 0x0166: mmctx_xfer */
0x94bd00f8,
0xf10199f0,
0xf00f0007,
0x09d00203,
0xf104bd00,
0xb6071087,
0x94bd0684,
0xf405bbfd,
0x8bd0090b,
0x0099f000,
/* 0x0180: mmctx_base_disabled */
/* 0x018c: mmctx_base_disabled */
0xf405eefd,
0x8ed00c0b,
0xc08fd080,
/* 0x018f: mmctx_multi_disabled */
/* 0x019b: mmctx_multi_disabled */
0xb70199f0,
0xc8010080,
0xb4b600ab,
......@@ -162,8 +165,8 @@ uint32_t nvc0_grgpc_code[] = {
0xb601aec8,
0xbefd11e4,
0x008bd005,
/* 0x01a8: mmctx_exec_loop */
/* 0x01a8: mmctx_wait_free */
/* 0x01b4: mmctx_exec_loop */
/* 0x01b4: mmctx_wait_free */
0xf0008ecf,
0x0bf41fe4,
0x00ce98fa,
......@@ -172,76 +175,77 @@ uint32_t nvc0_grgpc_code[] = {
0x04cdb804,
0xc8e81bf4,
0x1bf402ab,
/* 0x01c9: mmctx_fini_wait */
/* 0x01d5: mmctx_fini_wait */
0x008bcf18,
0xb01fb4f0,
0x1bf410b4,
0x02a7f0f7,
0xf4c921f4,
/* 0x01de: mmctx_stop */
/* 0x01ea: mmctx_stop */
0xabc81b0e,
0x10b4b600,
0xf00cb9f0,
0x8bd012b9,
/* 0x01ed: mmctx_stop_wait */
/* 0x01f9: mmctx_stop_wait */
0x008bcf00,
0xf412bbc8,
/* 0x01f6: mmctx_done */
0x87f1fa1b,
0x84b6085c,
0xf094bd06,
0x89d00199,
/* 0x0207: strand_wait */
0xf900f800,
0x02a7f0a0,
0xfcc921f4,
/* 0x0213: strand_pre */
0xf100f8a0,
0xf04afc87,
0x97f00283,
0x0089d00c,
0x020721f5,
/* 0x0226: strand_post */
0x87f100f8,
0x83f04afc,
0x0d97f002,
0xf50089d0,
0xf8020721,
/* 0x0239: strand_set */
0xfca7f100,
0x02a3f04f,
0x0500aba2,
0xd00fc7f0,
0xc7f000ac,
0x00bcd00b,
0x020721f5,
0xf000aed0,
0xbcd00ac7,
0x0721f500,
/* 0x0263: strand_ctx_init */
0xf100f802,
0xb6083c87,
0x94bd0684,
0xd00399f0,
/* 0x0202: mmctx_done */
0x94bdfa1b,
0xf10199f0,
0xf0170007,
0x09d00203,
0xf804bd00,
/* 0x0215: strand_wait */
0xf0a0f900,
0x21f402a7,
0xf8a0fcc9,
/* 0x0221: strand_pre */
0xfc87f100,
0x0283f04a,
0xd00c97f0,
0x21f50089,
0xe7f00213,
0x3921f503,
0x00f80215,
/* 0x0234: strand_post */
0x4afc87f1,
0xf00283f0,
0x89d00d97,
0x1521f500,
/* 0x0247: strand_set */
0xf100f802,
0xf04ffca7,
0xaba202a3,
0xc7f00500,
0x00acd00f,
0xd00bc7f0,
0x21f500bc,
0xaed00215,
0x0ac7f000,
0xf500bcd0,
0xf8021521,
/* 0x0271: strand_ctx_init */
0xf094bd00,
0x07f10399,
0x03f00f00,
0x0009d002,
0x21f504bd,
0xe7f00221,
0x4721f503,
0xfca7f102,
0x02a3f046,
0x0400aba0,
0xf040a0d0,
0xbcd001c7,
0x0721f500,
0x1521f500,
0x010c9202,
0xf000acd0,
0xbcd002c7,
0x0721f500,
0x2621f502,
0x1521f500,
0x3421f502,
0x8087f102,
0x0684b608,
0xb70089cf,
0x95220080,
/* 0x02ba: ctx_init_strand_loop */
/* 0x02ca: ctx_init_strand_loop */
0x8ed008fe,
0x408ed000,
0xb6808acf,
......@@ -250,175 +254,171 @@ uint32_t nvc0_grgpc_code[] = {
0xb60480b6,
0x1bf40192,
0x08e4b6e8,
0xf1f2efbc,
0xb6085c87,
0x94bd0684,
0xd00399f0,
0x00f80089,
/* 0x02ec: error */
0xe7f1e0f9,
0xe3f09814,
0x8d21f440,
0x041ce0b7,
0xf401f7f0,
0xe0fc8d21,
/* 0x0306: init */
0x04bd00f8,
0xf10004fe,
0xf0120017,
0x12d00227,
0x0d17f100,
0x0010fe04,
0x040017f1,
0xf0c010d0,
0x12d00427,
0x1031f400,
0x060817f1,
0xcf0614b6,
0x37f00012,
0x1f24f001,
0xb60432bb,
0x02800132,
0x06038005,
0x040010b7,
0x800012cf,
0x27f10402,
0x24b60800,
0x4022cf06,
0x47f134bd,
0x44b60700,
0x08259506,
0xd00045d0,
0x0e984045,
0x010f9800,
0x013d21f5,
0xbb002fbb,
0x0e98003f,
0x020f9801,
0x013d21f5,
0xfd050e98,
0x2ebb00ef,
0x003ebb00,
0x130040b7,
0xd00235b6,
0x25b60043,
0x0635b608,
0xb60120b6,
0x24b60130,
0x0834b608,
0xf5022fb9,
0xbb026321,
0x17f1003f,
0x14b60800,
0x4013d006,
0x080010b7,
0xbdf2efbc,
0x0399f094,
0x170007f1,
0xd00203f0,
0x04bd0009,
/* 0x02fe: error */
0xe0f900f8,
0x9814e7f1,
0xf440e3f0,
0xe0b78d21,
0xf7f0041c,
0x8d21f401,
0x00f8e0fc,
/* 0x0318: init */
0x04fe04bd,
0x0017f100,
0x0227f012,
0xf10012d0,
0xfe042617,
0x17f10010,
0x10d00400,
0x0427f0c0,
0xf40012d0,
0x17f11031,
0x14b60608,
0x0012cf06,
0xf00137f0,
0x32bb1f24,
0x0132b604,
0x80050280,
0x10b70603,
0x12cf0400,
0x04028000,
0x010027f1,
0xcf0223f0,
0x34bd0022,
0x070047f1,
0x950644b6,
0x45d00825,
0x4045d000,
0x98000e98,
0x21f5010f,
0x2fbb0147,
0x003fbb00,
0x98010e98,
0x21f5020f,
0x0e980147,
0x00effd05,
0xbb002ebb,
0x40b7003e,
0x35b61300,
0x0043d002,
0xb60825b6,
0x20b60635,
0x0130b601,
0xb60824b6,
0x2fb90834,
0x7121f502,
0x003fbb02,
0x010007f1,
0xd00203f0,
0x04bd0003,
0x29f024bd,
0x0012d01f,
/* 0x03d0: main */
0xf40031f4,
0xd7f00028,
0x3921f41c,
0xb0f401f4,
0x18f404e4,
0x0181fe1e,
0xbd0627f0,
0x0412fd20,
0xfd01e4b6,
0x18fe051e,
0x9221f500,
0xd30ef404,
/* 0x0400: main_not_ctx_xfer */
0xf010ef94,
0x21f501f5,
0x0ef402ec,
/* 0x040d: ih */
0xfe80f9c6,
0x80f90188,
0xa0f990f9,
0xd0f9b0f9,
0xf0f9e0f9,
0xc4800acf,
0x0bf404ab,
0x00b7f11d,
0x1cd7f019,
0xcf40becf,
0x21f400bf,
0x00b0b704,
0x01e7f004,
/* 0x0443: ih_no_fifo */
0xd000bed0,
0xf0fc400a,
0xd0fce0fc,
0xa0fcb0fc,
0x80fc90fc,
0xfc0088fe,
0x0032f480,
/* 0x045e: hub_barrier_done */
0xf7f001f8,
0x040e9801,
0xf104febb,
0xf09418e7,
0x21f440e3,
/* 0x0473: ctx_redswitch */
0xf100f88d,
0xb60614e7,
0xf7f006e4,
0x00efd020,
/* 0x0483: ctx_redswitch_delay */
0xb608f7f0,
0x1bf401f2,
0x20f7f1fd,
0x00efd00a,
/* 0x0492: ctx_xfer */
0x17f100f8,
0x14b60a04,
0x001fd006,
0xf50711f4,
/* 0x04a3: ctx_xfer_not_load */
0xf1047321,
0xf04afc17,
0x27f00213,
0x0012d00c,
0x020721f5,
0x47fc27f1,
0xd00223f0,
0x2cf00020,
0x0320b601,
0xf00012d0,
0xa5f001ac,
0x00b7f002,
0x9850b3f0,
0xc4b6040c,
0x00bcbb0f,
0x98000c98,
0xe7f0010d,
0x5c21f500,
0x01acf001,
0x4000b7f1,
0x9850b3f0,
0xc4b6040c,
0x00bcbb0f,
0x98010c98,
0x0f98020d,
0x00e7f106,
0x5c21f508,
0x0721f501,
0x0601f402,
/* 0x0517: ctx_xfer_post */
0xf11412f4,
0xf04afc17,
0x27f00213,
0x0012d00d,
0x020721f5,
/* 0x0528: ctx_xfer_done */
0x045e21f5,
0x000000f8,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x0007f11f,
0x0203f008,
0xbd0002d0,
/* 0x03e9: main */
0x0031f404,
0xf00028f4,
0x21f41cd7,
0xf401f439,
0xf404e4b0,
0x81fe1e18,
0x0627f001,
0x12fd20bd,
0x01e4b604,
0xfe051efd,
0x21f50018,
0x0ef404ad,
/* 0x0419: main_not_ctx_xfer */
0x10ef94d3,
0xf501f5f0,
0xf402fe21,
/* 0x0426: ih */
0x80f9c60e,
0xf90188fe,
0xf990f980,
0xf9b0f9a0,
0xf9e0f9d0,
0xcf04bdf0,
0xabc4800a,
0x1d0bf404,
0x1900b7f1,
0xcf1cd7f0,
0xbfcf40be,
0x0421f400,
0x0400b0b7,
0xd001e7f0,
/* 0x045e: ih_no_fifo */
0x0ad000be,
0xfcf0fc40,
0xfcd0fce0,
0xfca0fcb0,
0xfe80fc90,
0x80fc0088,
0xf80032f4,
/* 0x0479: hub_barrier_done */
0x01f7f001,
0xbb040e98,
0xe7f104fe,
0xe3f09418,
0x8d21f440,
/* 0x048e: ctx_redswitch */
0xe7f100f8,
0xe4b60614,
0x20f7f006,
0xf000efd0,
/* 0x049e: ctx_redswitch_delay */
0xf2b608f7,
0xfd1bf401,
0x0a20f7f1,
0xf800efd0,
/* 0x04ad: ctx_xfer */
0x0417f100,
0x0614b60a,
0xf4001fd0,
0x21f50711,
/* 0x04be: ctx_xfer_not_load */
0x17f1048e,
0x13f04afc,
0x0c27f002,
0xf50012d0,
0xf1021521,
0xf047fc27,
0x20d00223,
0x012cf000,
0xd00320b6,
0xacf00012,
0x02a5f001,
0xf000b7f0,
0x0c9850b3,
0x0fc4b604,
0x9800bcbb,
0x0d98000c,
0x00e7f001,
0x016621f5,
0xf101acf0,
0xf04000b7,
0x0c9850b3,
0x0fc4b604,
0x9800bcbb,
0x0d98010c,
0x060f9802,
0x0800e7f1,
0x016621f5,
0x021521f5,
0xf40601f4,
/* 0x0532: ctx_xfer_post */
0x17f11412,
0x13f04afc,
0x0d27f002,
0xf50012d0,
/* 0x0543: ctx_xfer_done */
0xf5021521,
0xf8047921,
0x00000000,
0x00000000,
0x00000000,
......
......@@ -52,15 +52,9 @@ hub_mmio_list_next:
// In: $r15 error code (see nvc0.fuc)
//
error:
push $r14
mov $r14 0x814
shl b32 $r14 6
iowr I[$r14 + 0x000] $r15 // CC_SCRATCH[5] = error code
mov $r14 0xc1c
shl b32 $r14 6
nv_iowr(NV_PGRAPH_FECS_CC_SCRATCH_VAL(5), 0, $r15)
mov $r15 1
iowr I[$r14 + 0x000] $r15 // INTR_UP_SET
pop $r14
nv_iowr(NV_PGRAPH_FECS_INTR_UP_SET, 0, $r15)
ret
// HUB fuc initialisation, executed by triggering ucode start, will
......@@ -211,13 +205,10 @@ init:
bra ne #init_gpc
// save context size, and tell host we're ready
mov $r2 0x800
shl b32 $r2 6
iowr I[$r2 + 0x100] $r1 // CC_SCRATCH[1] = context size
add b32 $r2 0x800
nv_iowr(NV_PGRAPH_FECS_CC_SCRATCH_VAL(1), 0, $r1)
clear b32 $r1
bset $r1 31
iowr I[$r2 + 0x000] $r1 // CC_SCRATCH[0] |= 0x80000000
nv_iowr(NV_PGRAPH_FECS_CC_SCRATCH_SET(0), 0, $r1)
// Main program loop, very simple, sleeps until woken up by the interrupt
// handler, pulls a command from the queue and executes its handler
......@@ -309,11 +300,9 @@ main:
bra #main
main_done:
mov $r1 0x820
shl b32 $r1 6
clear b32 $r2
bset $r2 31
iowr I[$r1 + 0x000] $r2 // CC_SCRATCH[0] |= 0x80000000
nv_iowr(NV_PGRAPH_FECS_CC_SCRATCH_SET(0), 0, $r2)
bra #main
// interrupt handler
......@@ -327,6 +316,7 @@ ih:
push $r13
push $r14
push $r15
clear b32 $r0
// incoming fifo command?
iord $r10 I[$r0 + 0x200] // INTR
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment