drm/nouveau/gr: implement chsw_load() method
authorBen Skeggs <bskeggs@redhat.com>
Mon, 16 Jan 2017 00:25:10 +0000 (10:25 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 17 Feb 2017 07:38:10 +0000 (17:38 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/engine/gr/base.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/priv.h

index a8282edc2b582cd2d3bba0b64441a01bc7b87ebf..cd8cf6f7024c2c4b916ae20b1fda7e2ded9080e0 100644 (file)
 
 #include <engine/fifo.h>
 
+static bool
+nvkm_gr_chsw_load(struct nvkm_engine *engine)
+{
+       struct nvkm_gr *gr = nvkm_gr(engine);
+       if (gr->func->chsw_load)
+               return gr->func->chsw_load(gr);
+       return false;
+}
+
 static void
 nvkm_gr_tile(struct nvkm_engine *engine, int region, struct nvkm_fb_tile *tile)
 {
@@ -132,6 +141,7 @@ nvkm_gr = {
        .fini = nvkm_gr_fini,
        .intr = nvkm_gr_intr,
        .tile = nvkm_gr_tile,
+       .chsw_load = nvkm_gr_chsw_load,
        .fifo.cclass = nvkm_gr_cclass_new,
        .fifo.sclass = nvkm_gr_oclass_get,
 };
index 0d6d940a744f7fc64bc1cc7588b4198a20380e86..2a52d9f026ecbee89513941c66c0627b2504c58c 100644 (file)
@@ -25,6 +25,7 @@ struct nvkm_gr_func {
        /* Returns chipset-specific counts of units packed into an u64.
         */
        u64 (*units)(struct nvkm_gr *);
+       bool (*chsw_load)(struct nvkm_gr *);
        struct nvkm_sclass sclass[];
 };