drm/nouveau/gr/gf100-: implement chsw_load() method

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Ben Skeggs 2017-01-16 10:28:54 +10:00
parent 71ce33a28a
commit 6845c313f7
1 changed files with 17 additions and 0 deletions

View File

@ -702,6 +702,22 @@ gf100_gr_pack_mmio[] = {
* PGRAPH engine/subdev functions
******************************************************************************/
static bool
gf100_gr_chsw_load(struct nvkm_gr *base)
{
struct gf100_gr *gr = gf100_gr(base);
if (!gr->firmware) {
u32 trace = nvkm_rd32(gr->base.engine.subdev.device, 0x40981c);
if (trace & 0x00000040)
return true;
} else {
u32 mthd = nvkm_rd32(gr->base.engine.subdev.device, 0x409808);
if (mthd & 0x00080000)
return true;
}
return false;
}
int
gf100_gr_rops(struct gf100_gr *gr)
{
@ -1770,6 +1786,7 @@ gf100_gr_ = {
.units = gf100_gr_units,
.chan_new = gf100_gr_chan_new,
.object_get = gf100_gr_object_get,
.chsw_load = gf100_gr_chsw_load,
};
int