These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / gpu / drm / nouveau / nvkm / engine / gr / gk110b.c
index 9ff9eab..22f88af 100644 (file)
@@ -24,6 +24,8 @@
 #include "gf100.h"
 #include "ctxgf100.h"
 
+#include <nvif/class.h>
+
 /*******************************************************************************
  * PGRAPH register lists
  ******************************************************************************/
@@ -98,19 +100,25 @@ gk110b_gr_pack_mmio[] = {
  * PGRAPH engine/subdev functions
  ******************************************************************************/
 
-struct nvkm_oclass *
-gk110b_gr_oclass = &(struct gf100_gr_oclass) {
-       .base.handle = NV_ENGINE(GR, 0xf1),
-       .base.ofuncs = &(struct nvkm_ofuncs) {
-               .ctor = gk104_gr_ctor,
-               .dtor = gf100_gr_dtor,
-               .init = gk104_gr_init,
-               .fini = _nvkm_gr_fini,
-       },
-       .cclass = &gk110b_grctx_oclass,
-       .sclass =  gk110_gr_sclass,
+static const struct gf100_gr_func
+gk110b_gr = {
+       .init = gk104_gr_init,
        .mmio = gk110b_gr_pack_mmio,
        .fecs.ucode = &gk110_gr_fecs_ucode,
        .gpccs.ucode = &gk110_gr_gpccs_ucode,
        .ppc_nr = 2,
-}.base;
+       .grctx = &gk110b_grctx,
+       .sclass = {
+               { -1, -1, FERMI_TWOD_A },
+               { -1, -1, KEPLER_INLINE_TO_MEMORY_B },
+               { -1, -1, KEPLER_B, &gf100_fermi },
+               { -1, -1, KEPLER_COMPUTE_B },
+               {}
+       }
+};
+
+int
+gk110b_gr_new(struct nvkm_device *device, int index, struct nvkm_gr **pgr)
+{
+       return gf100_gr_new_(&gk110b_gr, device, index, pgr);
+}