drm/nouveau/gr/gf100-: support clkgate_pack everywhere
authorBen Skeggs <bskeggs@redhat.com>
Tue, 8 May 2018 10:39:46 +0000 (20:39 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 18 May 2018 05:01:22 +0000 (15:01 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c

index d127c6a..eaf32f7 100644 (file)
@@ -32,6 +32,7 @@
 #include <subdev/fb.h>
 #include <subdev/mc.h>
 #include <subdev/pmu.h>
+#include <subdev/therm.h>
 #include <subdev/timer.h>
 #include <engine/fifo.h>
 
@@ -1949,6 +1950,9 @@ gf100_gr_init(struct gf100_gr *gr)
        if (gr->func->init_r405a14)
                gr->func->init_r405a14(gr);
 
+       if (gr->func->clkgate_pack)
+               nvkm_therm_clkgate_init(device->therm, gr->func->clkgate_pack);
+
        nvkm_mask(device, TPC_UNIT(0, 0, 0x05c), 0x00000001, 0x00000001);
 
        memcpy(tpcnr, gr->tpc_nr, sizeof(gr->tpc_nr));