mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-07 05:04:04 +08:00
drm/nouveau/gr/gf100-: virtualise init_num_active_ltcs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
02917aa39d
commit
bfd27f39b5
@ -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_num_active_ltcs(struct gf100_gr *gr)
|
||||
{
|
||||
struct nvkm_device *device = gr->base.engine.subdev.device;
|
||||
nvkm_wr32(device, GPC_BCAST(0x08ac), nvkm_rd32(device, 0x100800));
|
||||
}
|
||||
|
||||
void
|
||||
gf100_gr_init_zcull(struct gf100_gr *gr)
|
||||
{
|
||||
@ -1989,8 +1996,7 @@ gf100_gr_init(struct gf100_gr *gr)
|
||||
|
||||
gr->func->init_vsc_stream_master(gr);
|
||||
gr->func->init_zcull(gr);
|
||||
|
||||
nvkm_wr32(device, GPC_BCAST(0x08ac), nvkm_rd32(device, 0x100800));
|
||||
gr->func->init_num_active_ltcs(gr);
|
||||
|
||||
nvkm_wr32(device, 0x400500, 0x00010001);
|
||||
|
||||
@ -2074,6 +2080,7 @@ gf100_gr = {
|
||||
.init_gpc_mmu = gf100_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gf100_gr_init_vsc_stream_master,
|
||||
.init_zcull = gf100_gr_init_zcull,
|
||||
.init_num_active_ltcs = gf100_gr_init_num_active_ltcs,
|
||||
.mmio = gf100_gr_pack_mmio,
|
||||
.fecs.ucode = &gf100_gr_fecs_ucode,
|
||||
.gpccs.ucode = &gf100_gr_gpccs_ucode,
|
||||
|
@ -126,10 +126,10 @@ struct gf100_gr_func {
|
||||
void (*init_bios)(struct gf100_gr *);
|
||||
void (*init_vsc_stream_master)(struct gf100_gr *);
|
||||
void (*init_zcull)(struct gf100_gr *);
|
||||
void (*init_num_active_ltcs)(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 *);
|
||||
void (*init_num_active_ltcs)(struct gf100_gr *);
|
||||
void (*set_hww_esr_report_mask)(struct gf100_gr *);
|
||||
const struct gf100_gr_pack *mmio;
|
||||
struct {
|
||||
@ -149,6 +149,7 @@ int gf100_gr_rops(struct gf100_gr *);
|
||||
int gf100_gr_init(struct gf100_gr *);
|
||||
void gf100_gr_init_vsc_stream_master(struct gf100_gr *);
|
||||
void gf100_gr_init_zcull(struct gf100_gr *);
|
||||
void gf100_gr_init_num_active_ltcs(struct gf100_gr *);
|
||||
|
||||
void gf117_gr_init_zcull(struct gf100_gr *);
|
||||
|
||||
@ -160,6 +161,7 @@ void gk104_gr_init_ppc_exceptions(struct gf100_gr *);
|
||||
int gk20a_gr_init(struct gf100_gr *);
|
||||
|
||||
int gm200_gr_rops(struct gf100_gr *);
|
||||
void gm200_gr_init_num_active_ltcs(struct gf100_gr *);
|
||||
|
||||
int gp100_gr_init(struct gf100_gr *);
|
||||
void gp100_gr_init_rop_active_fbps(struct gf100_gr *);
|
||||
@ -315,7 +317,5 @@ void gm107_gr_init_bios(struct gf100_gr *);
|
||||
|
||||
void gm200_gr_init_gpc_mmu(struct gf100_gr *);
|
||||
|
||||
void gp100_gr_init_num_active_ltcs(struct gf100_gr *gr);
|
||||
|
||||
void gp102_gr_init_swdx_pes_mask(struct gf100_gr *);
|
||||
#endif
|
||||
|
@ -118,6 +118,7 @@ gf104_gr = {
|
||||
.init_gpc_mmu = gf100_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gf100_gr_init_vsc_stream_master,
|
||||
.init_zcull = gf100_gr_init_zcull,
|
||||
.init_num_active_ltcs = gf100_gr_init_num_active_ltcs,
|
||||
.mmio = gf104_gr_pack_mmio,
|
||||
.fecs.ucode = &gf100_gr_fecs_ucode,
|
||||
.gpccs.ucode = &gf100_gr_gpccs_ucode,
|
||||
|
@ -116,6 +116,7 @@ gf108_gr = {
|
||||
.init_r405a14 = gf108_gr_init_r405a14,
|
||||
.init_vsc_stream_master = gf100_gr_init_vsc_stream_master,
|
||||
.init_zcull = gf100_gr_init_zcull,
|
||||
.init_num_active_ltcs = gf100_gr_init_num_active_ltcs,
|
||||
.mmio = gf108_gr_pack_mmio,
|
||||
.fecs.ucode = &gf100_gr_fecs_ucode,
|
||||
.gpccs.ucode = &gf100_gr_gpccs_ucode,
|
||||
|
@ -90,6 +90,7 @@ gf110_gr = {
|
||||
.init_gpc_mmu = gf100_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gf100_gr_init_vsc_stream_master,
|
||||
.init_zcull = gf100_gr_init_zcull,
|
||||
.init_num_active_ltcs = gf100_gr_init_num_active_ltcs,
|
||||
.mmio = gf110_gr_pack_mmio,
|
||||
.fecs.ucode = &gf100_gr_fecs_ucode,
|
||||
.gpccs.ucode = &gf100_gr_gpccs_ucode,
|
||||
|
@ -154,6 +154,7 @@ gf117_gr = {
|
||||
.init_gpc_mmu = gf100_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gf100_gr_init_vsc_stream_master,
|
||||
.init_zcull = gf117_gr_init_zcull,
|
||||
.init_num_active_ltcs = gf100_gr_init_num_active_ltcs,
|
||||
.mmio = gf117_gr_pack_mmio,
|
||||
.fecs.ucode = &gf117_gr_fecs_ucode,
|
||||
.gpccs.ucode = &gf117_gr_gpccs_ucode,
|
||||
|
@ -181,6 +181,7 @@ gf119_gr = {
|
||||
.init_gpc_mmu = gf100_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gf100_gr_init_vsc_stream_master,
|
||||
.init_zcull = gf100_gr_init_zcull,
|
||||
.init_num_active_ltcs = gf100_gr_init_num_active_ltcs,
|
||||
.mmio = gf119_gr_pack_mmio,
|
||||
.fecs.ucode = &gf100_gr_fecs_ucode,
|
||||
.gpccs.ucode = &gf100_gr_gpccs_ucode,
|
||||
|
@ -426,8 +426,7 @@ gk104_gr_init(struct gf100_gr *gr)
|
||||
|
||||
gr->func->init_vsc_stream_master(gr);
|
||||
gr->func->init_zcull(gr);
|
||||
|
||||
nvkm_wr32(device, GPC_BCAST(0x08ac), nvkm_rd32(device, 0x100800));
|
||||
gr->func->init_num_active_ltcs(gr);
|
||||
|
||||
gr->func->init_rop_active_fbps(gr);
|
||||
|
||||
@ -517,6 +516,7 @@ gk104_gr = {
|
||||
.init_gpc_mmu = gf100_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gk104_gr_init_vsc_stream_master,
|
||||
.init_zcull = gf117_gr_init_zcull,
|
||||
.init_num_active_ltcs = gf100_gr_init_num_active_ltcs,
|
||||
.init_rop_active_fbps = gk104_gr_init_rop_active_fbps,
|
||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||
.mmio = gk104_gr_pack_mmio,
|
||||
|
@ -340,6 +340,7 @@ gk110_gr = {
|
||||
.init_gpc_mmu = gf100_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gk104_gr_init_vsc_stream_master,
|
||||
.init_zcull = gf117_gr_init_zcull,
|
||||
.init_num_active_ltcs = gf100_gr_init_num_active_ltcs,
|
||||
.init_rop_active_fbps = gk104_gr_init_rop_active_fbps,
|
||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||
.mmio = gk110_gr_pack_mmio,
|
||||
|
@ -106,6 +106,7 @@ gk110b_gr = {
|
||||
.init_gpc_mmu = gf100_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gk104_gr_init_vsc_stream_master,
|
||||
.init_zcull = gf117_gr_init_zcull,
|
||||
.init_num_active_ltcs = gf100_gr_init_num_active_ltcs,
|
||||
.init_rop_active_fbps = gk104_gr_init_rop_active_fbps,
|
||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||
.mmio = gk110b_gr_pack_mmio,
|
||||
|
@ -165,6 +165,7 @@ gk208_gr = {
|
||||
.init_gpc_mmu = gf100_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gk104_gr_init_vsc_stream_master,
|
||||
.init_zcull = gf117_gr_init_zcull,
|
||||
.init_num_active_ltcs = gf100_gr_init_num_active_ltcs,
|
||||
.init_rop_active_fbps = gk104_gr_init_rop_active_fbps,
|
||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||
.mmio = gk208_gr_pack_mmio,
|
||||
|
@ -335,8 +335,7 @@ gm107_gr_init(struct gf100_gr *gr)
|
||||
|
||||
gr->func->init_vsc_stream_master(gr);
|
||||
gr->func->init_zcull(gr);
|
||||
|
||||
nvkm_wr32(device, GPC_BCAST(0x08ac), nvkm_rd32(device, 0x100800));
|
||||
gr->func->init_num_active_ltcs(gr);
|
||||
|
||||
gr->func->init_rop_active_fbps(gr);
|
||||
|
||||
@ -426,6 +425,7 @@ gm107_gr = {
|
||||
.init_bios = gm107_gr_init_bios,
|
||||
.init_vsc_stream_master = gk104_gr_init_vsc_stream_master,
|
||||
.init_zcull = gf117_gr_init_zcull,
|
||||
.init_num_active_ltcs = gf100_gr_init_num_active_ltcs,
|
||||
.init_rop_active_fbps = gk104_gr_init_rop_active_fbps,
|
||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||
.mmio = gm107_gr_pack_mmio,
|
||||
|
@ -38,6 +38,14 @@ gm200_gr_rops(struct gf100_gr *gr)
|
||||
return nvkm_rd32(gr->base.engine.subdev.device, 0x12006c);
|
||||
}
|
||||
|
||||
void
|
||||
gm200_gr_init_num_active_ltcs(struct gf100_gr *gr)
|
||||
{
|
||||
struct nvkm_device *device = gr->base.engine.subdev.device;
|
||||
nvkm_wr32(device, GPC_BCAST(0x08ac), nvkm_rd32(device, 0x100800));
|
||||
nvkm_wr32(device, GPC_BCAST(0x033c), nvkm_rd32(device, 0x100804));
|
||||
}
|
||||
|
||||
void
|
||||
gm200_gr_init_gpc_mmu(struct gf100_gr *gr)
|
||||
{
|
||||
@ -75,9 +83,7 @@ gm200_gr_init(struct gf100_gr *gr)
|
||||
|
||||
gr->func->init_vsc_stream_master(gr);
|
||||
gr->func->init_zcull(gr);
|
||||
|
||||
nvkm_wr32(device, GPC_BCAST(0x08ac), nvkm_rd32(device, 0x100800));
|
||||
nvkm_wr32(device, GPC_BCAST(0x033c), nvkm_rd32(device, 0x100804));
|
||||
gr->func->init_num_active_ltcs(gr);
|
||||
|
||||
gr->func->init_rop_active_fbps(gr);
|
||||
|
||||
@ -185,6 +191,7 @@ gm200_gr = {
|
||||
.init_bios = gm107_gr_init_bios,
|
||||
.init_vsc_stream_master = gk104_gr_init_vsc_stream_master,
|
||||
.init_zcull = gf117_gr_init_zcull,
|
||||
.init_num_active_ltcs = gm200_gr_init_num_active_ltcs,
|
||||
.init_rop_active_fbps = gm200_gr_init_rop_active_fbps,
|
||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||
.rops = gm200_gr_rops,
|
||||
|
@ -40,15 +40,6 @@ gp100_gr_init_rop_active_fbps(struct gf100_gr *gr)
|
||||
nvkm_mask(device, 0x408958, 0x0000000f, fbp_count); /* crop */
|
||||
}
|
||||
|
||||
void
|
||||
gp100_gr_init_num_active_ltcs(struct gf100_gr *gr)
|
||||
{
|
||||
struct nvkm_device *device = gr->base.engine.subdev.device;
|
||||
|
||||
nvkm_wr32(device, GPC_BCAST(0x08ac), nvkm_rd32(device, 0x100800));
|
||||
nvkm_wr32(device, GPC_BCAST(0x033c), nvkm_rd32(device, 0x100804));
|
||||
}
|
||||
|
||||
int
|
||||
gp100_gr_init(struct gf100_gr *gr)
|
||||
{
|
||||
@ -134,9 +125,9 @@ gp100_gr = {
|
||||
.init_gpc_mmu = gm200_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gk104_gr_init_vsc_stream_master,
|
||||
.init_zcull = gf117_gr_init_zcull,
|
||||
.init_num_active_ltcs = gm200_gr_init_num_active_ltcs,
|
||||
.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,
|
||||
.rops = gm200_gr_rops,
|
||||
.ppc_nr = 2,
|
||||
.grctx = &gp100_grctx,
|
||||
|
@ -46,10 +46,10 @@ gp102_gr = {
|
||||
.init_gpc_mmu = gm200_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gk104_gr_init_vsc_stream_master,
|
||||
.init_zcull = gf117_gr_init_zcull,
|
||||
.init_num_active_ltcs = gm200_gr_init_num_active_ltcs,
|
||||
.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,
|
||||
.init_num_active_ltcs = gp100_gr_init_num_active_ltcs,
|
||||
.rops = gm200_gr_rops,
|
||||
.ppc_nr = 3,
|
||||
.grctx = &gp102_grctx,
|
||||
|
@ -32,10 +32,10 @@ gp107_gr = {
|
||||
.init_gpc_mmu = gm200_gr_init_gpc_mmu,
|
||||
.init_vsc_stream_master = gk104_gr_init_vsc_stream_master,
|
||||
.init_zcull = gf117_gr_init_zcull,
|
||||
.init_num_active_ltcs = gm200_gr_init_num_active_ltcs,
|
||||
.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,
|
||||
.init_num_active_ltcs = gp100_gr_init_num_active_ltcs,
|
||||
.rops = gm200_gr_rops,
|
||||
.ppc_nr = 1,
|
||||
.grctx = &gp107_grctx,
|
||||
|
@ -25,23 +25,15 @@
|
||||
|
||||
#include <nvif/class.h>
|
||||
|
||||
static void
|
||||
gp10b_gr_init_num_active_ltcs(struct gf100_gr *gr)
|
||||
{
|
||||
struct nvkm_device *device = gr->base.engine.subdev.device;
|
||||
|
||||
nvkm_wr32(device, GPC_BCAST(0x08ac), nvkm_rd32(device, 0x100800));
|
||||
}
|
||||
|
||||
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_zcull = gf117_gr_init_zcull,
|
||||
.init_num_active_ltcs = gf100_gr_init_num_active_ltcs,
|
||||
.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,
|
||||
.rops = gm200_gr_rops,
|
||||
.ppc_nr = 1,
|
||||
.grctx = &gp102_grctx,
|
||||
|
Loading…
Reference in New Issue
Block a user