Commit ea4a2bb5 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/gr/gf100-: virtualise patch_ltc, noting missing init

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent aedc49fd
......@@ -1254,6 +1254,8 @@ gf100_grctx_generate_main(struct gf100_gr *gr, struct gf100_grctx *info)
grctx->bundle(info);
grctx->pagepool(info);
grctx->attrib(info);
if (grctx->patch_ltc)
grctx->patch_ltc(info);
grctx->unkn(gr);
gf100_grctx_generate_tpcid(gr);
......
......@@ -48,6 +48,8 @@ struct gf100_grctx_func {
u32 attrib_nr;
u32 alpha_nr_max;
u32 alpha_nr;
/* other patch buffer stuff */
void (*patch_ltc)(struct gf100_grctx *);
};
extern const struct gf100_grctx_func gf100_grctx;
......@@ -80,6 +82,7 @@ extern const struct gf100_grctx_func gk20a_grctx;
void gk104_grctx_generate_main(struct gf100_gr *, struct gf100_grctx *);
void gk104_grctx_generate_bundle(struct gf100_grctx *);
void gk104_grctx_generate_pagepool(struct gf100_grctx *);
void gk104_grctx_generate_patch_ltc(struct gf100_grctx *);
void gk104_grctx_generate_unkn(struct gf100_gr *);
void gk104_grctx_generate_r418bb8(struct gf100_gr *);
......
......@@ -840,6 +840,17 @@ gk104_grctx_pack_ppc[] = {
* PGRAPH context implementation
******************************************************************************/
void
gk104_grctx_generate_patch_ltc(struct gf100_grctx *info)
{
struct nvkm_device *device = info->gr->base.engine.subdev.device;
u32 data0 = nvkm_rd32(device, 0x17e91c);
u32 data1 = nvkm_rd32(device, 0x17e920);
/*XXX: Figure out how to modify this correctly! */
mmio_wr32(info, 0x17e91c, data0);
mmio_wr32(info, 0x17e920, data1);
}
void
gk104_grctx_generate_bundle(struct gf100_grctx *info)
{
......@@ -1005,4 +1016,5 @@ gk104_grctx = {
.attrib_nr = 0x218,
.alpha_nr_max = 0x7ff,
.alpha_nr = 0x648,
.patch_ltc = gk104_grctx_generate_patch_ltc,
};
......@@ -830,4 +830,5 @@ gk110_grctx = {
.attrib_nr = 0x218,
.alpha_nr_max = 0x7ff,
.alpha_nr = 0x648,
.patch_ltc = gk104_grctx_generate_patch_ltc,
};
......@@ -91,4 +91,5 @@ gk110b_grctx = {
.attrib_nr = 0x218,
.alpha_nr_max = 0x7ff,
.alpha_nr = 0x648,
.patch_ltc = gk104_grctx_generate_patch_ltc,
};
......@@ -552,4 +552,5 @@ gk208_grctx = {
.attrib_nr = 0x218,
.alpha_nr_max = 0x7ff,
.alpha_nr = 0x648,
.patch_ltc = gk104_grctx_generate_patch_ltc,
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment