drm/nouveau/gr/gf100-gf119: modify max_ways_evict where required

I don't think this is done after Fermi, NVGPU used to do it but removed
the code, and I've not seen RM traces touching it either.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Ben Skeggs 2018-05-08 20:39:46 +10:00
parent 43952c6f43
commit c4a2b6385d
7 changed files with 19 additions and 0 deletions

View File

@ -1163,6 +1163,15 @@ gf100_grctx_generate_rop_mapping(struct gf100_gr *gr)
nvkm_wr32(device, 0x40780c + (i * 4), data[i]); nvkm_wr32(device, 0x40780c + (i * 4), data[i]);
} }
void
gf100_grctx_generate_max_ways_evict(struct gf100_gr *gr)
{
struct nvkm_device *device = gr->base.engine.subdev.device;
u32 fbps = nvkm_rd32(device, 0x121c74);
if (fbps == 1)
nvkm_mask(device, 0x17e91c, 0x001f0000, 0x00090000);
}
static const u32 static const u32
gf100_grctx_alpha_beta_map[17][32] = { gf100_grctx_alpha_beta_map[17][32] = {
[1] = { [1] = {
@ -1349,6 +1358,8 @@ gf100_grctx_generate_floorsweep(struct gf100_gr *gr)
if (func->alpha_beta_tables) if (func->alpha_beta_tables)
func->alpha_beta_tables(gr); func->alpha_beta_tables(gr);
if (func->max_ways_evict)
func->max_ways_evict(gr);
} }
void void
@ -1532,4 +1543,5 @@ gf100_grctx = {
.r4060a8 = gf100_grctx_generate_r4060a8, .r4060a8 = gf100_grctx_generate_r4060a8,
.rop_mapping = gf100_grctx_generate_rop_mapping, .rop_mapping = gf100_grctx_generate_rop_mapping,
.alpha_beta_tables = gf100_grctx_generate_alpha_beta_tables, .alpha_beta_tables = gf100_grctx_generate_alpha_beta_tables,
.max_ways_evict = gf100_grctx_generate_max_ways_evict,
}; };

View File

@ -56,6 +56,7 @@ struct gf100_grctx_func {
void (*r4060a8)(struct gf100_gr *); void (*r4060a8)(struct gf100_gr *);
void (*rop_mapping)(struct gf100_gr *); void (*rop_mapping)(struct gf100_gr *);
void (*alpha_beta_tables)(struct gf100_gr *); void (*alpha_beta_tables)(struct gf100_gr *);
void (*max_ways_evict)(struct gf100_gr *);
}; };
extern const struct gf100_grctx_func gf100_grctx; extern const struct gf100_grctx_func gf100_grctx;
@ -71,6 +72,7 @@ void gf100_grctx_generate_tpc_nr(struct gf100_gr *, int);
void gf100_grctx_generate_r4060a8(struct gf100_gr *); void gf100_grctx_generate_r4060a8(struct gf100_gr *);
void gf100_grctx_generate_rop_mapping(struct gf100_gr *); void gf100_grctx_generate_rop_mapping(struct gf100_gr *);
void gf100_grctx_generate_alpha_beta_tables(struct gf100_gr *); void gf100_grctx_generate_alpha_beta_tables(struct gf100_gr *);
void gf100_grctx_generate_max_ways_evict(struct gf100_gr *);
extern const struct gf100_grctx_func gf108_grctx; extern const struct gf100_grctx_func gf108_grctx;
void gf108_grctx_generate_attrib(struct gf100_grctx *); void gf108_grctx_generate_attrib(struct gf100_grctx *);

View File

@ -101,4 +101,5 @@ gf104_grctx = {
.r4060a8 = gf100_grctx_generate_r4060a8, .r4060a8 = gf100_grctx_generate_r4060a8,
.rop_mapping = gf100_grctx_generate_rop_mapping, .rop_mapping = gf100_grctx_generate_rop_mapping,
.alpha_beta_tables = gf100_grctx_generate_alpha_beta_tables, .alpha_beta_tables = gf100_grctx_generate_alpha_beta_tables,
.max_ways_evict = gf100_grctx_generate_max_ways_evict,
}; };

View File

@ -799,4 +799,5 @@ gf108_grctx = {
.r4060a8 = gf100_grctx_generate_r4060a8, .r4060a8 = gf100_grctx_generate_r4060a8,
.rop_mapping = gf100_grctx_generate_rop_mapping, .rop_mapping = gf100_grctx_generate_rop_mapping,
.alpha_beta_tables = gf100_grctx_generate_alpha_beta_tables, .alpha_beta_tables = gf100_grctx_generate_alpha_beta_tables,
.max_ways_evict = gf100_grctx_generate_max_ways_evict,
}; };

View File

@ -352,4 +352,5 @@ gf110_grctx = {
.r4060a8 = gf100_grctx_generate_r4060a8, .r4060a8 = gf100_grctx_generate_r4060a8,
.rop_mapping = gf100_grctx_generate_rop_mapping, .rop_mapping = gf100_grctx_generate_rop_mapping,
.alpha_beta_tables = gf100_grctx_generate_alpha_beta_tables, .alpha_beta_tables = gf100_grctx_generate_alpha_beta_tables,
.max_ways_evict = gf100_grctx_generate_max_ways_evict,
}; };

View File

@ -335,4 +335,5 @@ gf117_grctx = {
.r4060a8 = gf100_grctx_generate_r4060a8, .r4060a8 = gf100_grctx_generate_r4060a8,
.rop_mapping = gf117_grctx_generate_rop_mapping, .rop_mapping = gf117_grctx_generate_rop_mapping,
.alpha_beta_tables = gf100_grctx_generate_alpha_beta_tables, .alpha_beta_tables = gf100_grctx_generate_alpha_beta_tables,
.max_ways_evict = gf100_grctx_generate_max_ways_evict,
}; };

View File

@ -522,4 +522,5 @@ gf119_grctx = {
.r4060a8 = gf100_grctx_generate_r4060a8, .r4060a8 = gf100_grctx_generate_r4060a8,
.rop_mapping = gf100_grctx_generate_rop_mapping, .rop_mapping = gf100_grctx_generate_rop_mapping,
.alpha_beta_tables = gf100_grctx_generate_alpha_beta_tables, .alpha_beta_tables = gf100_grctx_generate_alpha_beta_tables,
.max_ways_evict = gf100_grctx_generate_max_ways_evict,
}; };