These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / gpu / drm / nouveau / nvkm / engine / gr / gf119.c
index e6dd651..01faf9a 100644 (file)
@@ -24,6 +24,8 @@
 #include "gf100.h"
 #include "ctxgf100.h"
 
+#include <nvif/class.h>
+
 /*******************************************************************************
  * PGRAPH register lists
  ******************************************************************************/
@@ -173,18 +175,27 @@ gf119_gr_pack_mmio[] = {
  * PGRAPH engine/subdev functions
  ******************************************************************************/
 
-struct nvkm_oclass *
-gf119_gr_oclass = &(struct gf100_gr_oclass) {
-       .base.handle = NV_ENGINE(GR, 0xd9),
-       .base.ofuncs = &(struct nvkm_ofuncs) {
-               .ctor = gf100_gr_ctor,
-               .dtor = gf100_gr_dtor,
-               .init = gf100_gr_init,
-               .fini = _nvkm_gr_fini,
-       },
-       .cclass = &gf119_grctx_oclass,
-       .sclass = gf110_gr_sclass,
+static const struct gf100_gr_func
+gf119_gr = {
+       .init = gf100_gr_init,
        .mmio = gf119_gr_pack_mmio,
        .fecs.ucode = &gf100_gr_fecs_ucode,
        .gpccs.ucode = &gf100_gr_gpccs_ucode,
-}.base;
+       .grctx = &gf119_grctx,
+       .sclass = {
+               { -1, -1, FERMI_TWOD_A },
+               { -1, -1, FERMI_MEMORY_TO_MEMORY_FORMAT_A },
+               { -1, -1, FERMI_A, &gf100_fermi },
+               { -1, -1, FERMI_B, &gf100_fermi },
+               { -1, -1, FERMI_C, &gf100_fermi },
+               { -1, -1, FERMI_COMPUTE_A },
+               { -1, -1, FERMI_COMPUTE_B },
+               {}
+       }
+};
+
+int
+gf119_gr_new(struct nvkm_device *device, int index, struct nvkm_gr **pgr)
+{
+       return gf100_gr_new_(&gf119_gr, device, index, pgr);
+}