drm/nouveau/gr/gf100-: insert some WFIs during gr init
authorBen Skeggs <bskeggs@redhat.com>
Wed, 16 May 2018 02:07:32 +0000 (12:07 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 18 May 2018 07:09:35 +0000 (17:09 +1000)
Inserted wait-for-gr-idle in the places it seems that RM does it, seems
to prevent some random mmio timeouts on Quadro GV100.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c

index f0f5a518e52a24f70dadccf0e60a1103ae287c1b..e813a3f8ea93dc3820a6824e4f6183ca8f0c6bfa 100644 (file)
@@ -1385,6 +1385,8 @@ gf100_grctx_generate_main(struct gf100_gr *gr, struct gf100_grctx *info)
                gf100_gr_mmio(gr, gr->fuc_sw_ctx);
        }
 
+       gf100_gr_wait_idle(gr);
+
        idle_timeout = nvkm_mask(device, 0x404154, 0xffffffff, 0x00000000);
 
        grctx->pagepool(info);
@@ -1396,6 +1398,8 @@ gf100_grctx_generate_main(struct gf100_gr *gr, struct gf100_grctx *info)
 
        gf100_grctx_generate_floorsweep(gr);
 
+       gf100_gr_wait_idle(gr);
+
        if (grctx->r400088) grctx->r400088(gr, false);
        if (gr->fuc_bundle)
                gf100_gr_icmd(gr, gr->fuc_bundle);
index 8dd4bd71b4fc3cad74c3ca845e6c46cfc7359d94..70d3d41e616c50cf129483fd95411bc4d3efb52e 100644 (file)
@@ -2123,6 +2123,8 @@ gf100_gr_init(struct gf100_gr *gr)
        else
                gf100_gr_mmio(gr, gr->func->mmio);
 
+       gf100_gr_wait_idle(gr);
+
        if (gr->func->init_r405a14)
                gr->func->init_r405a14(gr);