mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 08:12:41 -04:00
drm/nouveau/gr/gf100-: move some init to init_rop_exceptions()
Ampere. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
This commit is contained in:
@@ -2154,6 +2154,20 @@ gf100_gr_init_400054(struct gf100_gr *gr)
|
||||
nvkm_wr32(gr->base.engine.subdev.device, 0x400054, 0x34ce3464);
|
||||
}
|
||||
|
||||
void
|
||||
gf100_gr_init_rop_exceptions(struct gf100_gr *gr)
|
||||
{
|
||||
struct nvkm_device *device = gr->base.engine.subdev.device;
|
||||
int rop;
|
||||
|
||||
for (rop = 0; rop < gr->rop_nr; rop++) {
|
||||
nvkm_wr32(device, ROP_UNIT(rop, 0x144), 0x40000000);
|
||||
nvkm_wr32(device, ROP_UNIT(rop, 0x070), 0x40000000);
|
||||
nvkm_wr32(device, ROP_UNIT(rop, 0x204), 0xffffffff);
|
||||
nvkm_wr32(device, ROP_UNIT(rop, 0x208), 0xffffffff);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gf100_gr_init_shader_exceptions(struct gf100_gr *gr, int gpc, int tpc)
|
||||
{
|
||||
@@ -2283,7 +2297,7 @@ int
|
||||
gf100_gr_init(struct gf100_gr *gr)
|
||||
{
|
||||
struct nvkm_device *device = gr->base.engine.subdev.device;
|
||||
int gpc, tpc, rop;
|
||||
int gpc, tpc;
|
||||
|
||||
nvkm_mask(device, 0x400500, 0x00010001, 0x00000000);
|
||||
|
||||
@@ -2375,12 +2389,7 @@ gf100_gr_init(struct gf100_gr *gr)
|
||||
nvkm_wr32(device, GPC_UNIT(gpc, 0x2c94), 0xffffffff);
|
||||
}
|
||||
|
||||
for (rop = 0; rop < gr->rop_nr; rop++) {
|
||||
nvkm_wr32(device, ROP_UNIT(rop, 0x144), 0x40000000);
|
||||
nvkm_wr32(device, ROP_UNIT(rop, 0x070), 0x40000000);
|
||||
nvkm_wr32(device, ROP_UNIT(rop, 0x204), 0xffffffff);
|
||||
nvkm_wr32(device, ROP_UNIT(rop, 0x208), 0xffffffff);
|
||||
}
|
||||
gr->func->init_rop_exceptions(gr);
|
||||
|
||||
nvkm_wr32(device, 0x400108, 0xffffffff);
|
||||
nvkm_wr32(device, 0x400138, 0xffffffff);
|
||||
@@ -2464,6 +2473,7 @@ gf100_gr = {
|
||||
.init_419eb4 = gf100_gr_init_419eb4,
|
||||
.init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
|
||||
.init_shader_exceptions = gf100_gr_init_shader_exceptions,
|
||||
.init_rop_exceptions = gf100_gr_init_rop_exceptions,
|
||||
.init_400054 = gf100_gr_init_400054,
|
||||
.trap_mp = gf100_gr_trap_mp,
|
||||
.mmio = gf100_gr_pack_mmio,
|
||||
|
||||
@@ -165,6 +165,7 @@ struct gf100_gr_func {
|
||||
void (*init_tex_hww_esr)(struct gf100_gr *, int gpc, int tpc);
|
||||
void (*init_504430)(struct gf100_gr *, int gpc, int tpc);
|
||||
void (*init_shader_exceptions)(struct gf100_gr *, int gpc, int tpc);
|
||||
void (*init_rop_exceptions)(struct gf100_gr *);
|
||||
void (*init_400054)(struct gf100_gr *);
|
||||
void (*init_4188a4)(struct gf100_gr *);
|
||||
void (*trap_mp)(struct gf100_gr *, int gpc, int tpc);
|
||||
@@ -200,6 +201,7 @@ void gf100_gr_init_419cc0(struct gf100_gr *);
|
||||
void gf100_gr_init_419eb4(struct gf100_gr *);
|
||||
void gf100_gr_init_tex_hww_esr(struct gf100_gr *, int, int);
|
||||
void gf100_gr_init_shader_exceptions(struct gf100_gr *, int, int);
|
||||
void gf100_gr_init_rop_exceptions(struct gf100_gr *);
|
||||
void gf100_gr_init_400054(struct gf100_gr *);
|
||||
void gf100_gr_init_num_tpc_per_gpc(struct gf100_gr *, bool, bool);
|
||||
extern const struct gf100_gr_func_zbc gf100_gr_zbc;
|
||||
|
||||
@@ -127,6 +127,7 @@ gf104_gr = {
|
||||
.init_419eb4 = gf100_gr_init_419eb4,
|
||||
.init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
|
||||
.init_shader_exceptions = gf100_gr_init_shader_exceptions,
|
||||
.init_rop_exceptions = gf100_gr_init_rop_exceptions,
|
||||
.init_400054 = gf100_gr_init_400054,
|
||||
.trap_mp = gf100_gr_trap_mp,
|
||||
.mmio = gf104_gr_pack_mmio,
|
||||
|
||||
@@ -125,6 +125,7 @@ gf108_gr = {
|
||||
.init_419eb4 = gf100_gr_init_419eb4,
|
||||
.init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
|
||||
.init_shader_exceptions = gf100_gr_init_shader_exceptions,
|
||||
.init_rop_exceptions = gf100_gr_init_rop_exceptions,
|
||||
.init_400054 = gf100_gr_init_400054,
|
||||
.trap_mp = gf100_gr_trap_mp,
|
||||
.mmio = gf108_gr_pack_mmio,
|
||||
|
||||
@@ -99,6 +99,7 @@ gf110_gr = {
|
||||
.init_419eb4 = gf100_gr_init_419eb4,
|
||||
.init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
|
||||
.init_shader_exceptions = gf100_gr_init_shader_exceptions,
|
||||
.init_rop_exceptions = gf100_gr_init_rop_exceptions,
|
||||
.init_400054 = gf100_gr_init_400054,
|
||||
.trap_mp = gf100_gr_trap_mp,
|
||||
.mmio = gf110_gr_pack_mmio,
|
||||
|
||||
@@ -163,6 +163,7 @@ gf117_gr = {
|
||||
.init_419eb4 = gf100_gr_init_419eb4,
|
||||
.init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
|
||||
.init_shader_exceptions = gf100_gr_init_shader_exceptions,
|
||||
.init_rop_exceptions = gf100_gr_init_rop_exceptions,
|
||||
.init_400054 = gf100_gr_init_400054,
|
||||
.trap_mp = gf100_gr_trap_mp,
|
||||
.mmio = gf117_gr_pack_mmio,
|
||||
|
||||
@@ -190,6 +190,7 @@ gf119_gr = {
|
||||
.init_419eb4 = gf100_gr_init_419eb4,
|
||||
.init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
|
||||
.init_shader_exceptions = gf100_gr_init_shader_exceptions,
|
||||
.init_rop_exceptions = gf100_gr_init_rop_exceptions,
|
||||
.init_400054 = gf100_gr_init_400054,
|
||||
.trap_mp = gf100_gr_trap_mp,
|
||||
.mmio = gf119_gr_pack_mmio,
|
||||
|
||||
@@ -470,6 +470,7 @@ gk104_gr = {
|
||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||
.init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
|
||||
.init_shader_exceptions = gf100_gr_init_shader_exceptions,
|
||||
.init_rop_exceptions = gf100_gr_init_rop_exceptions,
|
||||
.init_400054 = gf100_gr_init_400054,
|
||||
.trap_mp = gf100_gr_trap_mp,
|
||||
.mmio = gk104_gr_pack_mmio,
|
||||
|
||||
@@ -366,6 +366,7 @@ gk110_gr = {
|
||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||
.init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
|
||||
.init_shader_exceptions = gf100_gr_init_shader_exceptions,
|
||||
.init_rop_exceptions = gf100_gr_init_rop_exceptions,
|
||||
.init_400054 = gf100_gr_init_400054,
|
||||
.trap_mp = gf100_gr_trap_mp,
|
||||
.mmio = gk110_gr_pack_mmio,
|
||||
|
||||
@@ -118,6 +118,7 @@ gk110b_gr = {
|
||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||
.init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
|
||||
.init_shader_exceptions = gf100_gr_init_shader_exceptions,
|
||||
.init_rop_exceptions = gf100_gr_init_rop_exceptions,
|
||||
.init_400054 = gf100_gr_init_400054,
|
||||
.trap_mp = gf100_gr_trap_mp,
|
||||
.mmio = gk110b_gr_pack_mmio,
|
||||
|
||||
@@ -176,6 +176,7 @@ gk208_gr = {
|
||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||
.init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
|
||||
.init_shader_exceptions = gf100_gr_init_shader_exceptions,
|
||||
.init_rop_exceptions = gf100_gr_init_rop_exceptions,
|
||||
.init_400054 = gf100_gr_init_400054,
|
||||
.trap_mp = gf100_gr_trap_mp,
|
||||
.mmio = gk208_gr_pack_mmio,
|
||||
|
||||
@@ -411,6 +411,7 @@ gm107_gr = {
|
||||
.init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
|
||||
.init_504430 = gm107_gr_init_504430,
|
||||
.init_shader_exceptions = gm107_gr_init_shader_exceptions,
|
||||
.init_rop_exceptions = gf100_gr_init_rop_exceptions,
|
||||
.init_400054 = gm107_gr_init_400054,
|
||||
.trap_mp = gf100_gr_trap_mp,
|
||||
.mmio = gm107_gr_pack_mmio,
|
||||
|
||||
@@ -199,6 +199,7 @@ gm200_gr = {
|
||||
.init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
|
||||
.init_504430 = gm107_gr_init_504430,
|
||||
.init_shader_exceptions = gm107_gr_init_shader_exceptions,
|
||||
.init_rop_exceptions = gf100_gr_init_rop_exceptions,
|
||||
.init_400054 = gm107_gr_init_400054,
|
||||
.trap_mp = gf100_gr_trap_mp,
|
||||
.fecs.reset = gf100_gr_fecs_reset,
|
||||
|
||||
@@ -119,6 +119,7 @@ gp100_gr = {
|
||||
.init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
|
||||
.init_504430 = gm107_gr_init_504430,
|
||||
.init_shader_exceptions = gp100_gr_init_shader_exceptions,
|
||||
.init_rop_exceptions = gf100_gr_init_rop_exceptions,
|
||||
.trap_mp = gf100_gr_trap_mp,
|
||||
.fecs.reset = gf100_gr_fecs_reset,
|
||||
.rops = gm200_gr_rops,
|
||||
|
||||
@@ -115,6 +115,7 @@ gp102_gr = {
|
||||
.init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
|
||||
.init_504430 = gm107_gr_init_504430,
|
||||
.init_shader_exceptions = gp100_gr_init_shader_exceptions,
|
||||
.init_rop_exceptions = gf100_gr_init_rop_exceptions,
|
||||
.trap_mp = gf100_gr_trap_mp,
|
||||
.fecs.reset = gf100_gr_fecs_reset,
|
||||
.rops = gm200_gr_rops,
|
||||
|
||||
@@ -43,6 +43,7 @@ gp104_gr = {
|
||||
.init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
|
||||
.init_504430 = gm107_gr_init_504430,
|
||||
.init_shader_exceptions = gp100_gr_init_shader_exceptions,
|
||||
.init_rop_exceptions = gf100_gr_init_rop_exceptions,
|
||||
.trap_mp = gf100_gr_trap_mp,
|
||||
.fecs.reset = gf100_gr_fecs_reset,
|
||||
.rops = gm200_gr_rops,
|
||||
|
||||
@@ -45,6 +45,7 @@ gp107_gr = {
|
||||
.init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
|
||||
.init_504430 = gm107_gr_init_504430,
|
||||
.init_shader_exceptions = gp100_gr_init_shader_exceptions,
|
||||
.init_rop_exceptions = gf100_gr_init_rop_exceptions,
|
||||
.trap_mp = gf100_gr_trap_mp,
|
||||
.fecs.reset = gf100_gr_fecs_reset,
|
||||
.rops = gm200_gr_rops,
|
||||
|
||||
@@ -55,6 +55,7 @@ gp10b_gr = {
|
||||
.init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
|
||||
.init_504430 = gm107_gr_init_504430,
|
||||
.init_shader_exceptions = gp100_gr_init_shader_exceptions,
|
||||
.init_rop_exceptions = gf100_gr_init_rop_exceptions,
|
||||
.trap_mp = gf100_gr_trap_mp,
|
||||
.fecs.reset = gf100_gr_fecs_reset,
|
||||
.rops = gm200_gr_rops,
|
||||
|
||||
@@ -103,6 +103,7 @@ gv100_gr = {
|
||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||
.init_504430 = gv100_gr_init_504430,
|
||||
.init_shader_exceptions = gv100_gr_init_shader_exceptions,
|
||||
.init_rop_exceptions = gf100_gr_init_rop_exceptions,
|
||||
.init_4188a4 = gv100_gr_init_4188a4,
|
||||
.trap_mp = gv100_gr_trap_mp,
|
||||
.fecs.reset = gf100_gr_fecs_reset,
|
||||
|
||||
@@ -109,6 +109,7 @@ tu102_gr = {
|
||||
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
|
||||
.init_504430 = gv100_gr_init_504430,
|
||||
.init_shader_exceptions = gv100_gr_init_shader_exceptions,
|
||||
.init_rop_exceptions = gf100_gr_init_rop_exceptions,
|
||||
.trap_mp = gv100_gr_trap_mp,
|
||||
.fecs.reset = gf100_gr_fecs_reset,
|
||||
.rops = gm200_gr_rops,
|
||||
|
||||
Reference in New Issue
Block a user