mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-08 13:44:01 +08:00
drm/nouveau/gr/gf100-: virtualise init_bios
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
cd9662f89e
commit
a37279e94c
@ -1953,6 +1953,9 @@ gf100_gr_init(struct gf100_gr *gr)
|
|||||||
if (gr->func->clkgate_pack)
|
if (gr->func->clkgate_pack)
|
||||||
nvkm_therm_clkgate_init(device->therm, 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);
|
nvkm_mask(device, TPC_UNIT(0, 0, 0x05c), 0x00000001, 0x00000001);
|
||||||
|
|
||||||
memcpy(tpcnr, gr->tpc_nr, sizeof(gr->tpc_nr));
|
memcpy(tpcnr, gr->tpc_nr, sizeof(gr->tpc_nr));
|
||||||
|
@ -123,6 +123,7 @@ struct gf100_gr_func {
|
|||||||
int (*init)(struct gf100_gr *);
|
int (*init)(struct gf100_gr *);
|
||||||
void (*init_gpc_mmu)(struct gf100_gr *);
|
void (*init_gpc_mmu)(struct gf100_gr *);
|
||||||
void (*init_r405a14)(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_rop_active_fbps)(struct gf100_gr *);
|
||||||
void (*init_ppc_exceptions)(struct gf100_gr *);
|
void (*init_ppc_exceptions)(struct gf100_gr *);
|
||||||
void (*init_swdx_pes_mask)(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 gk20a_gr_init(struct gf100_gr *);
|
||||||
|
|
||||||
int gm200_gr_init(struct gf100_gr *);
|
|
||||||
int gm200_gr_rops(struct gf100_gr *);
|
int gm200_gr_rops(struct gf100_gr *);
|
||||||
|
|
||||||
int gp100_gr_init(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);
|
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);
|
nvkm_wr32(device, GPC_UNIT(0, 0x3018), 0x00000001);
|
||||||
|
|
||||||
@ -451,6 +451,7 @@ static const struct gf100_gr_func
|
|||||||
gm107_gr = {
|
gm107_gr = {
|
||||||
.init = gm107_gr_init,
|
.init = gm107_gr_init,
|
||||||
.init_gpc_mmu = gm107_gr_init_gpc_mmu,
|
.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_rop_active_fbps = gk104_gr_init_rop_active_fbps,
|
||||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||||
.mmio = gm107_gr_pack_mmio,
|
.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 */
|
nvkm_mask(device, 0x408958, 0x0000000f, fbp_count); /* crop */
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
gm200_gr_init(struct gf100_gr *gr)
|
gm200_gr_init(struct gf100_gr *gr)
|
||||||
{
|
{
|
||||||
struct nvkm_device *device = gr->base.engine.subdev.device;
|
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);
|
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);
|
nvkm_wr32(device, GPC_UNIT(0, 0x3018), 0x00000001);
|
||||||
|
|
||||||
@ -210,6 +210,7 @@ static const struct gf100_gr_func
|
|||||||
gm200_gr = {
|
gm200_gr = {
|
||||||
.init = gm200_gr_init,
|
.init = gm200_gr_init,
|
||||||
.init_gpc_mmu = gm200_gr_init_gpc_mmu,
|
.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_rop_active_fbps = gm200_gr_init_rop_active_fbps,
|
||||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||||
.rops = gm200_gr_rops,
|
.rops = gm200_gr_rops,
|
||||||
|
Loading…
Reference in New Issue
Block a user