mirror of https://gitee.com/openkylin/linux.git
drm/nouveau/gr/gf100-: virtualise init_419eb4 + apply fixes from traces
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
0feab0250d
commit
0a84a51334
|
@ -1914,6 +1914,13 @@ gf100_gr_new_(const struct gf100_gr_func *func, struct nvkm_device *device,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gf100_gr_init_419eb4(struct gf100_gr *gr)
|
||||||
|
{
|
||||||
|
struct nvkm_device *device = gr->base.engine.subdev.device;
|
||||||
|
nvkm_mask(device, 0x419eb4, 0x00001000, 0x00001000);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gf100_gr_init_419cc0(struct gf100_gr *gr)
|
gf100_gr_init_419cc0(struct gf100_gr *gr)
|
||||||
{
|
{
|
||||||
|
@ -2059,8 +2066,8 @@ gf100_gr_init(struct gf100_gr *gr)
|
||||||
|
|
||||||
if (gr->func->init_419cc0)
|
if (gr->func->init_419cc0)
|
||||||
gr->func->init_419cc0(gr);
|
gr->func->init_419cc0(gr);
|
||||||
|
if (gr->func->init_419eb4)
|
||||||
nvkm_mask(device, 0x419eb4, 0x00001000, 0x00001000);
|
gr->func->init_419eb4(gr);
|
||||||
|
|
||||||
for (gpc = 0; gpc < gr->gpc_nr; gpc++) {
|
for (gpc = 0; gpc < gr->gpc_nr; gpc++) {
|
||||||
nvkm_wr32(device, GPC_UNIT(gpc, 0x0420), 0xc0000000);
|
nvkm_wr32(device, GPC_UNIT(gpc, 0x0420), 0xc0000000);
|
||||||
|
@ -2130,6 +2137,7 @@ gf100_gr = {
|
||||||
.init_fecs_exceptions = gf100_gr_init_fecs_exceptions,
|
.init_fecs_exceptions = gf100_gr_init_fecs_exceptions,
|
||||||
.init_40601c = gf100_gr_init_40601c,
|
.init_40601c = gf100_gr_init_40601c,
|
||||||
.init_419cc0 = gf100_gr_init_419cc0,
|
.init_419cc0 = gf100_gr_init_419cc0,
|
||||||
|
.init_419eb4 = gf100_gr_init_419eb4,
|
||||||
.mmio = gf100_gr_pack_mmio,
|
.mmio = gf100_gr_pack_mmio,
|
||||||
.fecs.ucode = &gf100_gr_fecs_ucode,
|
.fecs.ucode = &gf100_gr_fecs_ucode,
|
||||||
.gpccs.ucode = &gf100_gr_gpccs_ucode,
|
.gpccs.ucode = &gf100_gr_gpccs_ucode,
|
||||||
|
|
|
@ -135,6 +135,7 @@ struct gf100_gr_func {
|
||||||
void (*init_40601c)(struct gf100_gr *);
|
void (*init_40601c)(struct gf100_gr *);
|
||||||
void (*init_sked_hww_esr)(struct gf100_gr *);
|
void (*init_sked_hww_esr)(struct gf100_gr *);
|
||||||
void (*init_419cc0)(struct gf100_gr *);
|
void (*init_419cc0)(struct gf100_gr *);
|
||||||
|
void (*init_419eb4)(struct gf100_gr *);
|
||||||
void (*init_ppc_exceptions)(struct gf100_gr *);
|
void (*init_ppc_exceptions)(struct gf100_gr *);
|
||||||
void (*set_hww_esr_report_mask)(struct gf100_gr *);
|
void (*set_hww_esr_report_mask)(struct gf100_gr *);
|
||||||
const struct gf100_gr_pack *mmio;
|
const struct gf100_gr_pack *mmio;
|
||||||
|
@ -159,6 +160,7 @@ void gf100_gr_init_num_active_ltcs(struct gf100_gr *);
|
||||||
void gf100_gr_init_fecs_exceptions(struct gf100_gr *);
|
void gf100_gr_init_fecs_exceptions(struct gf100_gr *);
|
||||||
void gf100_gr_init_40601c(struct gf100_gr *);
|
void gf100_gr_init_40601c(struct gf100_gr *);
|
||||||
void gf100_gr_init_419cc0(struct gf100_gr *);
|
void gf100_gr_init_419cc0(struct gf100_gr *);
|
||||||
|
void gf100_gr_init_419eb4(struct gf100_gr *);
|
||||||
|
|
||||||
void gf117_gr_init_zcull(struct gf100_gr *);
|
void gf117_gr_init_zcull(struct gf100_gr *);
|
||||||
|
|
||||||
|
@ -168,6 +170,8 @@ void gk104_gr_init_rop_active_fbps(struct gf100_gr *);
|
||||||
void gk104_gr_init_ppc_exceptions(struct gf100_gr *);
|
void gk104_gr_init_ppc_exceptions(struct gf100_gr *);
|
||||||
void gk104_gr_init_sked_hww_esr(struct gf100_gr *);
|
void gk104_gr_init_sked_hww_esr(struct gf100_gr *);
|
||||||
|
|
||||||
|
void gk110_gr_init_419eb4(struct gf100_gr *);
|
||||||
|
|
||||||
int gk20a_gr_init(struct gf100_gr *);
|
int gk20a_gr_init(struct gf100_gr *);
|
||||||
|
|
||||||
int gm200_gr_rops(struct gf100_gr *);
|
int gm200_gr_rops(struct gf100_gr *);
|
||||||
|
|
|
@ -122,6 +122,7 @@ gf104_gr = {
|
||||||
.init_fecs_exceptions = gf100_gr_init_fecs_exceptions,
|
.init_fecs_exceptions = gf100_gr_init_fecs_exceptions,
|
||||||
.init_40601c = gf100_gr_init_40601c,
|
.init_40601c = gf100_gr_init_40601c,
|
||||||
.init_419cc0 = gf100_gr_init_419cc0,
|
.init_419cc0 = gf100_gr_init_419cc0,
|
||||||
|
.init_419eb4 = gf100_gr_init_419eb4,
|
||||||
.mmio = gf104_gr_pack_mmio,
|
.mmio = gf104_gr_pack_mmio,
|
||||||
.fecs.ucode = &gf100_gr_fecs_ucode,
|
.fecs.ucode = &gf100_gr_fecs_ucode,
|
||||||
.gpccs.ucode = &gf100_gr_gpccs_ucode,
|
.gpccs.ucode = &gf100_gr_gpccs_ucode,
|
||||||
|
|
|
@ -120,6 +120,7 @@ gf108_gr = {
|
||||||
.init_fecs_exceptions = gf100_gr_init_fecs_exceptions,
|
.init_fecs_exceptions = gf100_gr_init_fecs_exceptions,
|
||||||
.init_40601c = gf100_gr_init_40601c,
|
.init_40601c = gf100_gr_init_40601c,
|
||||||
.init_419cc0 = gf100_gr_init_419cc0,
|
.init_419cc0 = gf100_gr_init_419cc0,
|
||||||
|
.init_419eb4 = gf100_gr_init_419eb4,
|
||||||
.mmio = gf108_gr_pack_mmio,
|
.mmio = gf108_gr_pack_mmio,
|
||||||
.fecs.ucode = &gf100_gr_fecs_ucode,
|
.fecs.ucode = &gf100_gr_fecs_ucode,
|
||||||
.gpccs.ucode = &gf100_gr_gpccs_ucode,
|
.gpccs.ucode = &gf100_gr_gpccs_ucode,
|
||||||
|
|
|
@ -94,6 +94,7 @@ gf110_gr = {
|
||||||
.init_fecs_exceptions = gf100_gr_init_fecs_exceptions,
|
.init_fecs_exceptions = gf100_gr_init_fecs_exceptions,
|
||||||
.init_40601c = gf100_gr_init_40601c,
|
.init_40601c = gf100_gr_init_40601c,
|
||||||
.init_419cc0 = gf100_gr_init_419cc0,
|
.init_419cc0 = gf100_gr_init_419cc0,
|
||||||
|
.init_419eb4 = gf100_gr_init_419eb4,
|
||||||
.mmio = gf110_gr_pack_mmio,
|
.mmio = gf110_gr_pack_mmio,
|
||||||
.fecs.ucode = &gf100_gr_fecs_ucode,
|
.fecs.ucode = &gf100_gr_fecs_ucode,
|
||||||
.gpccs.ucode = &gf100_gr_gpccs_ucode,
|
.gpccs.ucode = &gf100_gr_gpccs_ucode,
|
||||||
|
|
|
@ -158,6 +158,7 @@ gf117_gr = {
|
||||||
.init_fecs_exceptions = gf100_gr_init_fecs_exceptions,
|
.init_fecs_exceptions = gf100_gr_init_fecs_exceptions,
|
||||||
.init_40601c = gf100_gr_init_40601c,
|
.init_40601c = gf100_gr_init_40601c,
|
||||||
.init_419cc0 = gf100_gr_init_419cc0,
|
.init_419cc0 = gf100_gr_init_419cc0,
|
||||||
|
.init_419eb4 = gf100_gr_init_419eb4,
|
||||||
.mmio = gf117_gr_pack_mmio,
|
.mmio = gf117_gr_pack_mmio,
|
||||||
.fecs.ucode = &gf117_gr_fecs_ucode,
|
.fecs.ucode = &gf117_gr_fecs_ucode,
|
||||||
.gpccs.ucode = &gf117_gr_gpccs_ucode,
|
.gpccs.ucode = &gf117_gr_gpccs_ucode,
|
||||||
|
|
|
@ -185,6 +185,7 @@ gf119_gr = {
|
||||||
.init_fecs_exceptions = gf100_gr_init_fecs_exceptions,
|
.init_fecs_exceptions = gf100_gr_init_fecs_exceptions,
|
||||||
.init_40601c = gf100_gr_init_40601c,
|
.init_40601c = gf100_gr_init_40601c,
|
||||||
.init_419cc0 = gf100_gr_init_419cc0,
|
.init_419cc0 = gf100_gr_init_419cc0,
|
||||||
|
.init_419eb4 = gf100_gr_init_419eb4,
|
||||||
.mmio = gf119_gr_pack_mmio,
|
.mmio = gf119_gr_pack_mmio,
|
||||||
.fecs.ucode = &gf100_gr_fecs_ucode,
|
.fecs.ucode = &gf100_gr_fecs_ucode,
|
||||||
.gpccs.ucode = &gf100_gr_gpccs_ucode,
|
.gpccs.ucode = &gf100_gr_gpccs_ucode,
|
||||||
|
|
|
@ -461,7 +461,7 @@ gk104_gr_init(struct gf100_gr *gr)
|
||||||
nvkm_wr32(device, 0x405840, 0xc0000000);
|
nvkm_wr32(device, 0x405840, 0xc0000000);
|
||||||
nvkm_wr32(device, 0x405844, 0x00ffffff);
|
nvkm_wr32(device, 0x405844, 0x00ffffff);
|
||||||
gr->func->init_419cc0(gr);
|
gr->func->init_419cc0(gr);
|
||||||
nvkm_mask(device, 0x419eb4, 0x00001000, 0x00001000);
|
gr->func->init_419eb4(gr);
|
||||||
|
|
||||||
gr->func->init_ppc_exceptions(gr);
|
gr->func->init_ppc_exceptions(gr);
|
||||||
|
|
||||||
|
@ -534,6 +534,7 @@ gk104_gr = {
|
||||||
.init_fecs_exceptions = gk104_gr_init_fecs_exceptions,
|
.init_fecs_exceptions = gk104_gr_init_fecs_exceptions,
|
||||||
.init_sked_hww_esr = gk104_gr_init_sked_hww_esr,
|
.init_sked_hww_esr = gk104_gr_init_sked_hww_esr,
|
||||||
.init_419cc0 = gf100_gr_init_419cc0,
|
.init_419cc0 = gf100_gr_init_419cc0,
|
||||||
|
.init_419eb4 = gf100_gr_init_419eb4,
|
||||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||||
.mmio = gk104_gr_pack_mmio,
|
.mmio = gk104_gr_pack_mmio,
|
||||||
.fecs.ucode = &gk104_gr_fecs_ucode,
|
.fecs.ucode = &gk104_gr_fecs_ucode,
|
||||||
|
|
|
@ -334,6 +334,20 @@ gk110_gr_gpccs_ucode = {
|
||||||
.data.size = sizeof(gk110_grgpc_data),
|
.data.size = sizeof(gk110_grgpc_data),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void
|
||||||
|
gk110_gr_init_419eb4(struct gf100_gr *gr)
|
||||||
|
{
|
||||||
|
struct nvkm_device *device = gr->base.engine.subdev.device;
|
||||||
|
nvkm_mask(device, 0x419eb4, 0x00001000, 0x00001000);
|
||||||
|
nvkm_mask(device, 0x419eb4, 0x00002000, 0x00002000);
|
||||||
|
nvkm_mask(device, 0x419eb4, 0x00004000, 0x00004000);
|
||||||
|
nvkm_mask(device, 0x419eb4, 0x00008000, 0x00008000);
|
||||||
|
nvkm_mask(device, 0x419eb4, 0x00001000, 0x00000000);
|
||||||
|
nvkm_mask(device, 0x419eb4, 0x00002000, 0x00000000);
|
||||||
|
nvkm_mask(device, 0x419eb4, 0x00004000, 0x00000000);
|
||||||
|
nvkm_mask(device, 0x419eb4, 0x00008000, 0x00000000);
|
||||||
|
}
|
||||||
|
|
||||||
static const struct gf100_gr_func
|
static const struct gf100_gr_func
|
||||||
gk110_gr = {
|
gk110_gr = {
|
||||||
.init = gk104_gr_init,
|
.init = gk104_gr_init,
|
||||||
|
@ -345,6 +359,7 @@ gk110_gr = {
|
||||||
.init_fecs_exceptions = gf100_gr_init_fecs_exceptions,
|
.init_fecs_exceptions = gf100_gr_init_fecs_exceptions,
|
||||||
.init_sked_hww_esr = gk104_gr_init_sked_hww_esr,
|
.init_sked_hww_esr = gk104_gr_init_sked_hww_esr,
|
||||||
.init_419cc0 = gf100_gr_init_419cc0,
|
.init_419cc0 = gf100_gr_init_419cc0,
|
||||||
|
.init_419eb4 = gk110_gr_init_419eb4,
|
||||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||||
.mmio = gk110_gr_pack_mmio,
|
.mmio = gk110_gr_pack_mmio,
|
||||||
.fecs.ucode = &gk110_gr_fecs_ucode,
|
.fecs.ucode = &gk110_gr_fecs_ucode,
|
||||||
|
|
|
@ -111,6 +111,7 @@ gk110b_gr = {
|
||||||
.init_fecs_exceptions = gf100_gr_init_fecs_exceptions,
|
.init_fecs_exceptions = gf100_gr_init_fecs_exceptions,
|
||||||
.init_sked_hww_esr = gk104_gr_init_sked_hww_esr,
|
.init_sked_hww_esr = gk104_gr_init_sked_hww_esr,
|
||||||
.init_419cc0 = gf100_gr_init_419cc0,
|
.init_419cc0 = gf100_gr_init_419cc0,
|
||||||
|
.init_419eb4 = gk110_gr_init_419eb4,
|
||||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||||
.mmio = gk110b_gr_pack_mmio,
|
.mmio = gk110b_gr_pack_mmio,
|
||||||
.fecs.ucode = &gk110_gr_fecs_ucode,
|
.fecs.ucode = &gk110_gr_fecs_ucode,
|
||||||
|
|
Loading…
Reference in New Issue