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")
Signed-off-by: Rhys Kidd <[email protected]>
---

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(-)

diff --git a/drm/nouveau/nvkm/engine/gr/gf100.c 
b/drm/nouveau/nvkm/engine/gr/gf100.c
index 5beb683a..81a13cf9 100644
--- a/drm/nouveau/nvkm/engine/gr/gf100.c
+++ b/drm/nouveau/nvkm/engine/gr/gf100.c
@@ -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)
-- 
2.19.1

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

Reply via email to