drm/nouveau/fb/ram/nv40-: use new devinit script interpreter entry-point
authorBen Skeggs <bskeggs@redhat.com>
Fri, 19 May 2017 13:59:34 +0000 (23:59 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 16 Jun 2017 04:04:45 +0000 (14:04 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp100.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.c

index f6c00791722c7b53b94561056b5dcf752c3d233c..75814f15eb53cc2cf148234d97d1b9d482c1e00f 100644 (file)
@@ -1424,12 +1424,7 @@ gk104_ram_init(struct nvkm_ram *ram)
        for (i = 0; i < cnt; i++, data += 4) {
                if (i != save >> 4) {
                        nvkm_mask(device, 0x10f65c, 0x000000f0, i << 4);
-                       nvbios_exec(&(struct nvbios_init) {
-                                       .subdev = subdev,
-                                       .bios = bios,
-                                       .offset = nvbios_rd32(bios, data),
-                                       .execute = 1,
-                                   });
+                       nvbios_init(subdev, nvbios_rd32(bios, data));
                }
        }
        nvkm_mask(device, 0x10f65c, 0x000000f0, save);
index cac70047ad5a56e7a7a59a301efa49110340aea8..df8a87333b6743bf2612e5cfd026ca8109b71c46 100644 (file)
@@ -59,12 +59,7 @@ gp100_ram_init(struct nvkm_ram *ram)
                for (i = 0; i < cnt; i++, data += 4) {
                        if (i != save >> 4) {
                                nvkm_mask(device, 0x9a065c, 0x000000f0, i << 4);
-                               nvbios_exec(&(struct nvbios_init) {
-                                               .subdev = subdev,
-                                               .bios = bios,
-                                               .offset = nvbios_rd32(bios, data),
-                                               .execute = 1,
-                                           });
+                               nvbios_init(subdev, nvbios_rd32(bios, data));
                        }
                }
                nvkm_mask(device, 0x9a065c, 0x000000f0, save);
index 56f8cffc25604bad85f0ac72dde7b1a2fcd9aa29..70c63535d56b33d6d40e354cbf3a0afcea52d209 100644 (file)
@@ -150,16 +150,8 @@ nv40_ram_prog(struct nvkm_ram *base)
        udelay(100);
 
        /* execute memory reset script from vbios */
-       if (!bit_entry(bios, 'M', &M)) {
-               struct nvbios_init init = {
-                       .subdev = subdev,
-                       .bios = bios,
-                       .offset = nvbios_rd16(bios, M.offset + 0x00),
-                       .execute = 1,
-               };
-
-               nvbios_exec(&init);
-       }
+       if (!bit_entry(bios, 'M', &M))
+               nvbios_init(subdev, nvbios_rd16(bios, M.offset + 0x00));
 
        /* make sure we're in vblank (hopefully the same one as before), and
         * then re-enable crtc memory access