diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2017-01-16 10:28:54 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2017-02-17 17:38:11 +1000 |
commit | 6845c313f79fd44c64834b98d4341187e77b2377 (patch) | |
tree | 159b3be0ac09773251e636db975db37e7dfd0ce1 | |
parent | 71ce33a28a06fed624b796189c14d960684cf830 (diff) |
drm/nouveau/gr/gf100-: implement chsw_load() method
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c index 88aa0b7385d9..f9acb8a944d2 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c @@ -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 |