Commit a37279e9 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/gr/gf100-: virtualise init_bios

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent cd9662f8
......@@ -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));
......
......@@ -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 *);
......
......@@ -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,
......
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment