drm/nouveau/gr/gf100-: virtualise init_vsc_stream_master
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Родитель
a37279e94c
Коммит
2fe5ff6371
|
@ -1930,6 +1930,13 @@ gf100_gr_init_gpc_mmu(struct gf100_gr *gr)
|
|||
nvkm_wr32(device, 0x4188b8, nvkm_memory_addr(fb->mmu_rd) >> 8);
|
||||
}
|
||||
|
||||
void
|
||||
gf100_gr_init_vsc_stream_master(struct gf100_gr *gr)
|
||||
{
|
||||
struct nvkm_device *device = gr->base.engine.subdev.device;
|
||||
nvkm_mask(device, TPC_UNIT(0, 0, 0x05c), 0x00000001, 0x00000001);
|
||||
}
|
||||
|
||||
int
|
||||
gf100_gr_init(struct gf100_gr *gr)
|
||||
{
|
||||
|
@ -1956,7 +1963,7 @@ gf100_gr_init(struct gf100_gr *gr)
|
|||
if (gr->func->init_bios)
|
||||
gr->func->init_bios(gr);
|
||||
|
||||
nvkm_mask(device, TPC_UNIT(0, 0, 0x05c), 0x00000001, 0x00000001);
|
||||
gr->func->init_vsc_stream_master(gr);
|
||||
|
||||
memcpy(tpcnr, gr->tpc_nr, sizeof(gr->tpc_nr));
|
||||
for (i = 0, gpc = -1; i < gr->tpc_total; i++) {
|
||||
|
@ -2068,6 +2075,7 @@ static const struct gf100_gr_func
|
|||
gf100_gr = {
|
||||
.init = gf100_gr_init,
|
||||
.init_gpc_mmu = gf100_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gf100_gr_init_vsc_stream_master,
|
||||
.mmio = gf100_gr_pack_mmio,
|
||||
.fecs.ucode = &gf100_gr_fecs_ucode,
|
||||
.gpccs.ucode = &gf100_gr_gpccs_ucode,
|
||||
|
|
|
@ -124,6 +124,7 @@ struct gf100_gr_func {
|
|||
void (*init_gpc_mmu)(struct gf100_gr *);
|
||||
void (*init_r405a14)(struct gf100_gr *);
|
||||
void (*init_bios)(struct gf100_gr *);
|
||||
void (*init_vsc_stream_master)(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 *);
|
||||
|
@ -143,10 +144,12 @@ struct gf100_gr_func {
|
|||
struct nvkm_sclass sclass[];
|
||||
};
|
||||
|
||||
int gf100_gr_init(struct gf100_gr *);
|
||||
int gf100_gr_rops(struct gf100_gr *);
|
||||
int gf100_gr_init(struct gf100_gr *);
|
||||
void gf100_gr_init_vsc_stream_master(struct gf100_gr *);
|
||||
|
||||
int gk104_gr_init(struct gf100_gr *);
|
||||
void gk104_gr_init_vsc_stream_master(struct gf100_gr *);
|
||||
void gk104_gr_init_rop_active_fbps(struct gf100_gr *);
|
||||
void gk104_gr_init_ppc_exceptions(struct gf100_gr *);
|
||||
|
||||
|
|
|
@ -116,6 +116,7 @@ static const struct gf100_gr_func
|
|||
gf104_gr = {
|
||||
.init = gf100_gr_init,
|
||||
.init_gpc_mmu = gf100_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gf100_gr_init_vsc_stream_master,
|
||||
.mmio = gf104_gr_pack_mmio,
|
||||
.fecs.ucode = &gf100_gr_fecs_ucode,
|
||||
.gpccs.ucode = &gf100_gr_gpccs_ucode,
|
||||
|
|
|
@ -114,6 +114,7 @@ gf108_gr = {
|
|||
.init = gf100_gr_init,
|
||||
.init_gpc_mmu = gf100_gr_init_gpc_mmu,
|
||||
.init_r405a14 = gf108_gr_init_r405a14,
|
||||
.init_vsc_stream_master = gf100_gr_init_vsc_stream_master,
|
||||
.mmio = gf108_gr_pack_mmio,
|
||||
.fecs.ucode = &gf100_gr_fecs_ucode,
|
||||
.gpccs.ucode = &gf100_gr_gpccs_ucode,
|
||||
|
|
|
@ -88,6 +88,7 @@ static const struct gf100_gr_func
|
|||
gf110_gr = {
|
||||
.init = gf100_gr_init,
|
||||
.init_gpc_mmu = gf100_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gf100_gr_init_vsc_stream_master,
|
||||
.mmio = gf110_gr_pack_mmio,
|
||||
.fecs.ucode = &gf100_gr_fecs_ucode,
|
||||
.gpccs.ucode = &gf100_gr_gpccs_ucode,
|
||||
|
|
|
@ -124,6 +124,7 @@ static const struct gf100_gr_func
|
|||
gf117_gr = {
|
||||
.init = gf100_gr_init,
|
||||
.init_gpc_mmu = gf100_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gf100_gr_init_vsc_stream_master,
|
||||
.mmio = gf117_gr_pack_mmio,
|
||||
.fecs.ucode = &gf117_gr_fecs_ucode,
|
||||
.gpccs.ucode = &gf117_gr_gpccs_ucode,
|
||||
|
|
|
@ -179,6 +179,7 @@ static const struct gf100_gr_func
|
|||
gf119_gr = {
|
||||
.init = gf100_gr_init,
|
||||
.init_gpc_mmu = gf100_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gf100_gr_init_vsc_stream_master,
|
||||
.mmio = gf119_gr_pack_mmio,
|
||||
.fecs.ucode = &gf100_gr_fecs_ucode,
|
||||
.gpccs.ucode = &gf100_gr_gpccs_ucode,
|
||||
|
|
|
@ -404,6 +404,13 @@ gk104_gr_init_ppc_exceptions(struct gf100_gr *gr)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
gk104_gr_init_vsc_stream_master(struct gf100_gr *gr)
|
||||
{
|
||||
struct nvkm_device *device = gr->base.engine.subdev.device;
|
||||
nvkm_wr32(device, GPC_UNIT(0, 0x3018), 0x00000001);
|
||||
}
|
||||
|
||||
int
|
||||
gk104_gr_init(struct gf100_gr *gr)
|
||||
{
|
||||
|
@ -421,7 +428,7 @@ gk104_gr_init(struct gf100_gr *gr)
|
|||
nvkm_therm_clkgate_init(gr->base.engine.subdev.device->therm,
|
||||
gr->func->clkgate_pack);
|
||||
|
||||
nvkm_wr32(device, GPC_UNIT(0, 0x3018), 0x00000001);
|
||||
gr->func->init_vsc_stream_master(gr);
|
||||
|
||||
memset(data, 0x00, sizeof(data));
|
||||
memcpy(tpcnr, gr->tpc_nr, sizeof(gr->tpc_nr));
|
||||
|
@ -536,6 +543,7 @@ static const struct gf100_gr_func
|
|||
gk104_gr = {
|
||||
.init = gk104_gr_init,
|
||||
.init_gpc_mmu = gf100_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gk104_gr_init_vsc_stream_master,
|
||||
.init_rop_active_fbps = gk104_gr_init_rop_active_fbps,
|
||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||
.mmio = gk104_gr_pack_mmio,
|
||||
|
|
|
@ -338,6 +338,7 @@ static const struct gf100_gr_func
|
|||
gk110_gr = {
|
||||
.init = gk104_gr_init,
|
||||
.init_gpc_mmu = gf100_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gk104_gr_init_vsc_stream_master,
|
||||
.init_rop_active_fbps = gk104_gr_init_rop_active_fbps,
|
||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||
.mmio = gk110_gr_pack_mmio,
|
||||
|
|
|
@ -104,6 +104,7 @@ static const struct gf100_gr_func
|
|||
gk110b_gr = {
|
||||
.init = gk104_gr_init,
|
||||
.init_gpc_mmu = gf100_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gk104_gr_init_vsc_stream_master,
|
||||
.init_rop_active_fbps = gk104_gr_init_rop_active_fbps,
|
||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||
.mmio = gk110b_gr_pack_mmio,
|
||||
|
|
|
@ -163,6 +163,7 @@ static const struct gf100_gr_func
|
|||
gk208_gr = {
|
||||
.init = gk104_gr_init,
|
||||
.init_gpc_mmu = gf100_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gk104_gr_init_vsc_stream_master,
|
||||
.init_rop_active_fbps = gk104_gr_init_rop_active_fbps,
|
||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||
.mmio = gk208_gr_pack_mmio,
|
||||
|
|
|
@ -337,7 +337,7 @@ gm107_gr_init(struct gf100_gr *gr)
|
|||
|
||||
gr->func->init_bios(gr);
|
||||
|
||||
nvkm_wr32(device, GPC_UNIT(0, 0x3018), 0x00000001);
|
||||
gr->func->init_vsc_stream_master(gr);
|
||||
|
||||
memset(data, 0x00, sizeof(data));
|
||||
memcpy(tpcnr, gr->tpc_nr, sizeof(gr->tpc_nr));
|
||||
|
@ -452,6 +452,7 @@ gm107_gr = {
|
|||
.init = gm107_gr_init,
|
||||
.init_gpc_mmu = gm107_gr_init_gpc_mmu,
|
||||
.init_bios = gm107_gr_init_bios,
|
||||
.init_vsc_stream_master = gk104_gr_init_vsc_stream_master,
|
||||
.init_rop_active_fbps = gk104_gr_init_rop_active_fbps,
|
||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||
.mmio = gm107_gr_pack_mmio,
|
||||
|
|
|
@ -77,7 +77,7 @@ gm200_gr_init(struct gf100_gr *gr)
|
|||
|
||||
gr->func->init_bios(gr);
|
||||
|
||||
nvkm_wr32(device, GPC_UNIT(0, 0x3018), 0x00000001);
|
||||
gr->func->init_vsc_stream_master(gr);
|
||||
|
||||
memset(data, 0x00, sizeof(data));
|
||||
memcpy(tpcnr, gr->tpc_nr, sizeof(gr->tpc_nr));
|
||||
|
@ -211,6 +211,7 @@ gm200_gr = {
|
|||
.init = gm200_gr_init,
|
||||
.init_gpc_mmu = gm200_gr_init_gpc_mmu,
|
||||
.init_bios = gm107_gr_init_bios,
|
||||
.init_vsc_stream_master = gk104_gr_init_vsc_stream_master,
|
||||
.init_rop_active_fbps = gm200_gr_init_rop_active_fbps,
|
||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||
.rops = gm200_gr_rops,
|
||||
|
|
|
@ -63,7 +63,7 @@ gp100_gr_init(struct gf100_gr *gr)
|
|||
|
||||
gf100_gr_mmio(gr, gr->fuc_sw_nonctx);
|
||||
|
||||
nvkm_wr32(device, GPC_UNIT(0, 0x3018), 0x00000001);
|
||||
gr->func->init_vsc_stream_master(gr);
|
||||
|
||||
memset(data, 0x00, sizeof(data));
|
||||
memcpy(tpcnr, gr->tpc_nr, sizeof(gr->tpc_nr));
|
||||
|
@ -160,6 +160,7 @@ static const struct gf100_gr_func
|
|||
gp100_gr = {
|
||||
.init = gp100_gr_init,
|
||||
.init_gpc_mmu = gm200_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gk104_gr_init_vsc_stream_master,
|
||||
.init_rop_active_fbps = gp100_gr_init_rop_active_fbps,
|
||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||
.init_num_active_ltcs = gp100_gr_init_num_active_ltcs,
|
||||
|
|
|
@ -44,6 +44,7 @@ static const struct gf100_gr_func
|
|||
gp102_gr = {
|
||||
.init = gp100_gr_init,
|
||||
.init_gpc_mmu = gm200_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gk104_gr_init_vsc_stream_master,
|
||||
.init_rop_active_fbps = gp100_gr_init_rop_active_fbps,
|
||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||
.init_swdx_pes_mask = gp102_gr_init_swdx_pes_mask,
|
||||
|
|
|
@ -30,6 +30,7 @@ static const struct gf100_gr_func
|
|||
gp107_gr = {
|
||||
.init = gp100_gr_init,
|
||||
.init_gpc_mmu = gm200_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gk104_gr_init_vsc_stream_master,
|
||||
.init_rop_active_fbps = gp100_gr_init_rop_active_fbps,
|
||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||
.init_swdx_pes_mask = gp102_gr_init_swdx_pes_mask,
|
||||
|
|
|
@ -37,6 +37,7 @@ static const struct gf100_gr_func
|
|||
gp10b_gr = {
|
||||
.init = gp100_gr_init,
|
||||
.init_gpc_mmu = gm200_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gk104_gr_init_vsc_stream_master,
|
||||
.init_rop_active_fbps = gp100_gr_init_rop_active_fbps,
|
||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||
.init_num_active_ltcs = gp10b_gr_init_num_active_ltcs,
|
||||
|
|
Загрузка…
Ссылка в новой задаче