drm/nouveau/gr/gf100-: virtualise r405a14
authorBen Skeggs <bskeggs@redhat.com>
Tue, 8 May 2018 10:39:46 +0000 (20:39 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 18 May 2018 05:01:22 +0000 (15:01 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf108.c

index eb50cfc1b53fcf2174552f8a693a7480071e2676..d127c6a7363cbaa2a9134dddd30cf9fc8884e0c3 100644 (file)
@@ -1946,6 +1946,9 @@ gf100_gr_init(struct gf100_gr *gr)
        else
                gf100_gr_mmio(gr, gr->func->mmio);
 
+       if (gr->func->init_r405a14)
+               gr->func->init_r405a14(gr);
+
        nvkm_mask(device, TPC_UNIT(0, 0, 0x05c), 0x00000001, 0x00000001);
 
        memcpy(tpcnr, gr->tpc_nr, sizeof(gr->tpc_nr));
index c8ec3fd9715591b1be3507d635bd2316296adb63..d940a1a239e8d0c5a944e5bc83573710179bc257 100644 (file)
@@ -122,6 +122,7 @@ struct gf100_gr_func {
        void (*dtor)(struct gf100_gr *);
        int (*init)(struct gf100_gr *);
        void (*init_gpc_mmu)(struct gf100_gr *);
+       void (*init_r405a14)(struct gf100_gr *);
        void (*init_rop_active_fbps)(struct gf100_gr *);
        void (*init_ppc_exceptions)(struct gf100_gr *);
        void (*init_swdx_pes_mask)(struct gf100_gr *);
index cc152eb7412359f6ee1a81453502b2d24913c5f6..3a59dea5ad7a2de8919dbca354c8d7db52b873e5 100644 (file)
@@ -103,10 +103,17 @@ gf108_gr_pack_mmio[] = {
  * PGRAPH engine/subdev functions
  ******************************************************************************/
 
+static void
+gf108_gr_init_r405a14(struct gf100_gr *gr)
+{
+       nvkm_wr32(gr->base.engine.subdev.device, 0x405a14, 0x80000000);
+}
+
 static const struct gf100_gr_func
 gf108_gr = {
        .init = gf100_gr_init,
        .init_gpc_mmu = gf100_gr_init_gpc_mmu,
+       .init_r405a14 = gf108_gr_init_r405a14,
        .mmio = gf108_gr_pack_mmio,
        .fecs.ucode = &gf100_gr_fecs_ucode,
        .gpccs.ucode = &gf100_gr_gpccs_ucode,