Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca79e49d authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nouveau/gr/gf100-: fix race condition in fecs/gpccs ucode



This is a simplied version of the fix by Roy in fdo#93629.  While this
doesn't appear to fix the issues for the users in that report, it's a
real issue that deserves to be resolved.

Reported-by: default avatarRoy Spliet <rspliet@eclipso.eu>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent f9e20294
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -291,12 +291,13 @@ init:
// Main program loop, very simple, sleeps until woken up by the interrupt
// handler, pulls a command from the queue and executes its handler
//
main:
	bset $flags $p0
wait:
	sleep $p0
	bset $flags $p0
main:
	mov $r13 #cmd_queue
	call(queue_get)
	bra $p1 #main
	bra $p1 #wait

	// 0x0000-0x0003 are all context transfers
	cmpu b32 $r14 0x04
+5 −4
Original line number Diff line number Diff line
@@ -370,9 +370,10 @@ uint32_t gf100_grgpc_code[] = {
	0xf11f29f0,
	0xf0080007,
	0x02d00203,
/* 0x04bb: main */
/* 0x04bb: wait */
	0xf404bd00,
	0x28f40031,
	0x31f40028,
/* 0x04c1: main */
	0x1cd7f000,
	0xf43921f4,
	0xe4b0f401,
@@ -384,10 +385,10 @@ uint32_t gf100_grgpc_code[] = {
	0x0018fe05,
	0x05b421f5,
/* 0x04eb: main_not_ctx_xfer */
	0x94d30ef4,
	0x94d90ef4,
	0xf5f010ef,
	0x7e21f501,
	0xc60ef403,
	0xcc0ef403,
/* 0x04f8: ih */
	0x80f900f9,
	0xf90188fe,
+6 −5
Original line number Diff line number Diff line
@@ -397,9 +397,10 @@ uint32_t gf117_grgpc_code[] = {
	0x080007f1,
	0xd00203f0,
	0x04bd0002,
/* 0x0508: main */
	0xf40031f4,
	0xd7f00028,
/* 0x0508: wait */
	0xf40028f4,
/* 0x050e: main */
	0xd7f00031,
	0x3921f424,
	0xb0f401f4,
	0x18f404e4,
@@ -409,13 +410,13 @@ uint32_t gf117_grgpc_code[] = {
	0xfd01e4b6,
	0x18fe051e,
	0x0121f500,
	0xd30ef406,
	0xd90ef406,
/* 0x0538: main_not_ctx_xfer */
	0xf010ef94,
	0x21f501f5,
	0x0ef4037e,
/* 0x0545: ih */
	0xf900f9c6,
	0xf900f9cc,
	0x0188fe80,
	0x90f980f9,
	0xb0f9a0f9,
+6 −5
Original line number Diff line number Diff line
@@ -397,9 +397,10 @@ uint32_t gk104_grgpc_code[] = {
	0x080007f1,
	0xd00203f0,
	0x04bd0002,
/* 0x0508: main */
	0xf40031f4,
	0xd7f00028,
/* 0x0508: wait */
	0xf40028f4,
/* 0x050e: main */
	0xd7f00031,
	0x3921f424,
	0xb0f401f4,
	0x18f404e4,
@@ -409,13 +410,13 @@ uint32_t gk104_grgpc_code[] = {
	0xfd01e4b6,
	0x18fe051e,
	0x0121f500,
	0xd30ef406,
	0xd90ef406,
/* 0x0538: main_not_ctx_xfer */
	0xf010ef94,
	0x21f501f5,
	0x0ef4037e,
/* 0x0545: ih */
	0xf900f9c6,
	0xf900f9cc,
	0x0188fe80,
	0x90f980f9,
	0xb0f9a0f9,
+6 −5
Original line number Diff line number Diff line
@@ -397,9 +397,10 @@ uint32_t gk110_grgpc_code[] = {
	0x300007f1,
	0xd00203f0,
	0x04bd0002,
/* 0x0508: main */
	0xf40031f4,
	0xd7f00028,
/* 0x0508: wait */
	0xf40028f4,
/* 0x050e: main */
	0xd7f00031,
	0x3921f424,
	0xb0f401f4,
	0x18f404e4,
@@ -409,13 +410,13 @@ uint32_t gk110_grgpc_code[] = {
	0xfd01e4b6,
	0x18fe051e,
	0x0121f500,
	0xd30ef406,
	0xd90ef406,
/* 0x0538: main_not_ctx_xfer */
	0xf010ef94,
	0x21f501f5,
	0x0ef4037e,
/* 0x0545: ih */
	0xf900f9c6,
	0xf900f9cc,
	0x0188fe80,
	0x90f980f9,
	0xb0f9a0f9,
Loading