Skip to contentSkip to conversation

gr/gf100-: correctly expose fecs methods for ctxsw start and stop

PATCH New Rhys Kidd 1 participant 1 message Feb 17, 2019

lore
Share & tools
lore

Rhys Kidd

author
#0 lore raw

PATCH 1/1 gr/gf100-: correctly expose fecs methods for ctxsw start and stop

Allow fecs to potentially set both methods:
- 0x38 STOP_CTXSW
- 0x39 START_CTXSW

At present the code only ever starts context swap, and never pauses it as appears to be the intent of one caller of gf100_gr_fecs_ctrl_ctxs().

Cc Ben Skeggs <[email protected]>
Fixes 2642e0b5 ("gr/gf100-: expose fecs methods for pausing ctxsw")

---

Ben, I wrote this patch against the commit in https://github.com/skeggsb/nouveau/
Whilst I haven't seen 2642e0b5 from your "nouveau-next" repo merged into drm-next yet, if that occurs this patch will also need to be tracked into drm-next in order for the fix to make it into Linux 5.1.

Would you like me to write that patch as well?

 drm/nouveau/nvkm/engine/gr/gf100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drm/nouveau/nvkm/engine/gr/gf100.c +1 -1
index 5beb683a..81a13cf9 100644
@@ -729,7 +729,7 @@ gf100_gr_fecs_ctrl_ctxsw(struct gf100_gr *gr, u32 mthd)
 	nvkm_wr32(device, 0x409804, 0xffffffff);
 	nvkm_wr32(device, 0x409840, 0xffffffff);
 	nvkm_wr32(device, 0x409500, 0xffffffff);
-	nvkm_wr32(device, 0x409504, 0x00000039);
+	nvkm_wr32(device, 0x409504, mthd);
 	nvkm_msec(device, 2000,
 		u32 stat = nvkm_rd32(device, 0x409804);
 		if (stat == 0x00000002)
Signature · 6 lines
2.19.1

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau