diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c index eaf32f79ee47..6ecb4a05096d 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c @@ -1953,6 +1953,9 @@ gf100_gr_init(struct gf100_gr *gr) if (gr->func->clkgate_pack) nvkm_therm_clkgate_init(device->therm, gr->func->clkgate_pack); + if (gr->func->init_bios) + gr->func->init_bios(gr); + nvkm_mask(device, TPC_UNIT(0, 0, 0x05c), 0x00000001, 0x00000001); memcpy(tpcnr, gr->tpc_nr, sizeof(gr->tpc_nr)); diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h index d940a1a239e8..1320befd4f10 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h @@ -123,6 +123,7 @@ struct gf100_gr_func { int (*init)(struct gf100_gr *); void (*init_gpc_mmu)(struct gf100_gr *); void (*init_r405a14)(struct gf100_gr *); + void (*init_bios)(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 *); @@ -151,7 +152,6 @@ void gk104_gr_init_ppc_exceptions(struct gf100_gr *); int gk20a_gr_init(struct gf100_gr *); -int gm200_gr_init(struct gf100_gr *); int gm200_gr_rops(struct gf100_gr *); int gp100_gr_init(struct gf100_gr *); diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c index 5ea74f62cee4..d5629cdddf4a 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c @@ -335,7 +335,7 @@ gm107_gr_init(struct gf100_gr *gr) gf100_gr_mmio(gr, gr->func->mmio); - gm107_gr_init_bios(gr); + gr->func->init_bios(gr); nvkm_wr32(device, GPC_UNIT(0, 0x3018), 0x00000001); @@ -451,6 +451,7 @@ static const struct gf100_gr_func gm107_gr = { .init = gm107_gr_init, .init_gpc_mmu = gm107_gr_init_gpc_mmu, + .init_bios = gm107_gr_init_bios, .init_rop_active_fbps = gk104_gr_init_rop_active_fbps, .init_ppc_exceptions = gk104_gr_init_ppc_exceptions, .mmio = gm107_gr_pack_mmio, diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c index 6435f1257572..7a793a0bb28e 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c @@ -61,7 +61,7 @@ gm200_gr_init_rop_active_fbps(struct gf100_gr *gr) nvkm_mask(device, 0x408958, 0x0000000f, fbp_count); /* crop */ } -int +static int gm200_gr_init(struct gf100_gr *gr) { struct nvkm_device *device = gr->base.engine.subdev.device; @@ -75,7 +75,7 @@ gm200_gr_init(struct gf100_gr *gr) gf100_gr_mmio(gr, gr->fuc_sw_nonctx); - gm107_gr_init_bios(gr); + gr->func->init_bios(gr); nvkm_wr32(device, GPC_UNIT(0, 0x3018), 0x00000001); @@ -210,6 +210,7 @@ static const struct gf100_gr_func gm200_gr = { .init = gm200_gr_init, .init_gpc_mmu = gm200_gr_init_gpc_mmu, + .init_bios = gm107_gr_init_bios, .init_rop_active_fbps = gm200_gr_init_rop_active_fbps, .init_ppc_exceptions = gk104_gr_init_ppc_exceptions, .rops = gm200_gr_rops,