提交 e7163b19 编写于 作者: B Ben Skeggs

drm/nouveau/gr/gf100-: virtualise r406500

Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 60770fa2
......@@ -1362,6 +1362,8 @@ gf100_grctx_generate_floorsweep(struct gf100_gr *gr)
func->max_ways_evict(gr);
if (func->dist_skip_table)
func->dist_skip_table(gr);
if (func->r406500)
func->r406500(gr);
}
void
......
......@@ -58,6 +58,7 @@ struct gf100_grctx_func {
void (*alpha_beta_tables)(struct gf100_gr *);
void (*max_ways_evict)(struct gf100_gr *);
void (*dist_skip_table)(struct gf100_gr *);
void (*r406500)(struct gf100_gr *);
};
extern const struct gf100_grctx_func gf100_grctx;
......@@ -115,6 +116,7 @@ void gm107_grctx_generate_attrib(struct gf100_grctx *);
extern const struct gf100_grctx_func gm200_grctx;
void gm200_grctx_generate_dist_skip_table(struct gf100_gr *);
void gm200_grctx_generate_r406500(struct gf100_gr *);
void gm200_grctx_generate_405b60(struct gf100_gr *);
extern const struct gf100_grctx_func gm20b_grctx;
......
......@@ -930,6 +930,12 @@ gm107_grctx_generate_attrib(struct gf100_grctx *info)
}
}
static void
gm107_grctx_generate_r406500(struct gf100_gr *gr)
{
nvkm_wr32(gr->base.engine.subdev.device, 0x406500, 0x00000001);
}
void
gm107_grctx_generate_sm_id(struct gf100_gr *gr, int gpc, int tpc, int sm)
{
......@@ -961,8 +967,6 @@ gm107_grctx_generate_main(struct gf100_gr *gr, struct gf100_grctx *info)
gf100_grctx_generate_floorsweep(gr);
nvkm_wr32(device, 0x406500, 0x00000001);
nvkm_wr32(device, 0x405b00, (gr->tpc_total << 8) | gr->gpc_nr);
gf100_gr_icmd(gr, grctx->icmd);
......@@ -1002,4 +1006,5 @@ gm107_grctx = {
.rop_mapping = gf117_grctx_generate_rop_mapping,
.alpha_beta_tables = gk104_grctx_generate_alpha_beta_tables,
.dist_skip_table = gf117_grctx_generate_dist_skip_table,
.r406500 = gm107_grctx_generate_r406500,
};
......@@ -59,6 +59,12 @@ gm200_grctx_generate_405b60(struct gf100_gr *gr)
nvkm_wr32(device, 0x405ba0 + (i * 4), gpcs[i]);
}
void
gm200_grctx_generate_r406500(struct gf100_gr *gr)
{
nvkm_wr32(gr->base.engine.subdev.device, 0x406500, 0x00000000);
}
static void
gm200_grctx_generate_main(struct gf100_gr *gr, struct gf100_grctx *info)
{
......@@ -78,8 +84,6 @@ gm200_grctx_generate_main(struct gf100_gr *gr, struct gf100_grctx *info)
gf100_grctx_generate_floorsweep(gr);
nvkm_wr32(device, 0x406500, 0x00000000);
nvkm_wr32(device, 0x405b00, (gr->tpc_total << 8) | gr->gpc_nr);
for (tmp = 0, i = 0; i < gr->gpc_nr; i++)
......@@ -136,4 +140,5 @@ gm200_grctx = {
.sm_id = gm107_grctx_generate_sm_id,
.rop_mapping = gf117_grctx_generate_rop_mapping,
.dist_skip_table = gm200_grctx_generate_dist_skip_table,
.r406500 = gm200_grctx_generate_r406500,
};
......@@ -140,8 +140,6 @@ gp100_grctx_generate_main(struct gf100_gr *gr, struct gf100_grctx *info)
gf100_grctx_generate_floorsweep(gr);
nvkm_wr32(device, 0x406500, 0x00000000);
nvkm_wr32(device, 0x405b00, (gr->tpc_total << 8) | gr->gpc_nr);
for (tmp = 0, i = 0; i < gr->gpc_nr; i++)
......@@ -173,4 +171,5 @@ gp100_grctx = {
.sm_id = gm107_grctx_generate_sm_id,
.rop_mapping = gf117_grctx_generate_rop_mapping,
.dist_skip_table = gm200_grctx_generate_dist_skip_table,
.r406500 = gm200_grctx_generate_r406500,
};
......@@ -97,4 +97,5 @@ gp102_grctx = {
.sm_id = gm107_grctx_generate_sm_id,
.rop_mapping = gf117_grctx_generate_rop_mapping,
.dist_skip_table = gm200_grctx_generate_dist_skip_table,
.r406500 = gm200_grctx_generate_r406500,
};
......@@ -47,4 +47,5 @@ gp107_grctx = {
.sm_id = gm107_grctx_generate_sm_id,
.rop_mapping = gf117_grctx_generate_rop_mapping,
.dist_skip_table = gm200_grctx_generate_dist_skip_table,
.r406500 = gm200_grctx_generate_r406500,
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册