Commit 6845c313 authored by Ben Skeggs's avatar Ben Skeggs

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

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 71ce33a2
...@@ -702,6 +702,22 @@ gf100_gr_pack_mmio[] = { ...@@ -702,6 +702,22 @@ gf100_gr_pack_mmio[] = {
* PGRAPH engine/subdev functions * 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 int
gf100_gr_rops(struct gf100_gr *gr) gf100_gr_rops(struct gf100_gr *gr)
{ {
...@@ -1770,6 +1786,7 @@ gf100_gr_ = { ...@@ -1770,6 +1786,7 @@ gf100_gr_ = {
.units = gf100_gr_units, .units = gf100_gr_units,
.chan_new = gf100_gr_chan_new, .chan_new = gf100_gr_chan_new,
.object_get = gf100_gr_object_get, .object_get = gf100_gr_object_get,
.chsw_load = gf100_gr_chsw_load,
}; };
int int
......
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