]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/nouveau/devinit: switch to instanced constructor
authorBen Skeggs <bskeggs@redhat.com>
Fri, 4 Dec 2020 01:04:41 +0000 (11:04 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 11 Feb 2021 01:49:52 +0000 (11:49 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
25 files changed:
drivers/gpu/drm/nouveau/include/nvkm/core/device.h
drivers/gpu/drm/nouveau/include/nvkm/core/layout.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/devinit.h
drivers/gpu/drm/nouveau/nvkm/core/subdev.c
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/g84.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/g98.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/ga100.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm107.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm200.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gv100.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/mcp89.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.h
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv05.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv10.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv1a.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv20.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.h
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/tu102.c

index 42ae6c5cf0e1d5790c23cec7ae7745418fcff256..01e653f16edc37c183db1e0106906b325cac311a 100644 (file)
@@ -60,7 +60,6 @@ struct nvkm_device {
                struct notifier_block nb;
        } acpi;
 
-       struct nvkm_devinit *devinit;
        struct nvkm_fault *fault;
        struct nvkm_fb *fb;
        struct nvkm_fuse *fuse;
@@ -143,7 +142,6 @@ struct nvkm_device_chip {
 #include <core/layout.h>
 #undef NVKM_LAYOUT_INST
 #undef NVKM_LAYOUT_ONCE
-       int (*devinit )(struct nvkm_device *, int idx, struct nvkm_devinit **);
        int (*fault   )(struct nvkm_device *, int idx, struct nvkm_fault **);
        int (*fb      )(struct nvkm_device *, int idx, struct nvkm_fb **);
        int (*fuse    )(struct nvkm_device *, int idx, struct nvkm_fuse **);
index 1b79b4e812ae9ec62c02e14a35ced7de312d8eac..47cb81c6e129c66ac2df8c081e9778e8a936d6bc 100644 (file)
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: MIT */
 NVKM_LAYOUT_ONCE(NVKM_SUBDEV_VBIOS   , struct nvkm_bios    ,     bios)
+NVKM_LAYOUT_ONCE(NVKM_SUBDEV_DEVINIT , struct nvkm_devinit ,  devinit)
 NVKM_LAYOUT_ONCE(NVKM_SUBDEV_BUS     , struct nvkm_bus     ,      bus)
 NVKM_LAYOUT_ONCE(NVKM_SUBDEV_BAR     , struct nvkm_bar     ,      bar)
 NVKM_LAYOUT_ONCE(NVKM_SUBDEV_ACR     , struct nvkm_acr     ,      acr)
index 50cc7c05eac49c64587bc3c90b24994e82505566..d22d7239c2725c792b9523715b31f42b804e8cb1 100644 (file)
@@ -17,20 +17,20 @@ void nvkm_devinit_meminit(struct nvkm_devinit *);
 u64 nvkm_devinit_disable(struct nvkm_devinit *);
 int nvkm_devinit_post(struct nvkm_devinit *, u64 *disable);
 
-int nv04_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
-int nv05_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
-int nv10_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
-int nv1a_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
-int nv20_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
-int nv50_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
-int g84_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
-int g98_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
-int gt215_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
-int mcp89_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
-int gf100_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
-int gm107_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
-int gm200_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
-int gv100_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
-int tu102_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
-int ga100_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
+int nv04_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
+int nv05_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
+int nv10_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
+int nv1a_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
+int nv20_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
+int nv50_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
+int g84_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
+int g98_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
+int gt215_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
+int mcp89_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
+int gf100_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
+int gm107_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
+int gm200_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
+int gv100_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
+int tu102_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
+int ga100_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
 #endif
index 8f8853a5bac604c69205a8a866f3b5a33ebc0bb7..2aa0dc6c32d3ac59606e170e949d76dace611522 100644 (file)
@@ -33,7 +33,6 @@ nvkm_subdev_type[NVKM_SUBDEV_NR] = {
 #include <core/layout.h>
 #undef NVKM_LAYOUT_ONCE
 #undef NVKM_LAYOUT_INST
-       [NVKM_SUBDEV_DEVINIT ] = "devinit",
        [NVKM_SUBDEV_FAULT   ] = "fault",
        [NVKM_SUBDEV_FB      ] = "fb",
        [NVKM_SUBDEV_FUSE    ] = "fuse",
index bb0aefc65f7e991c0900d0b1860c4c1f20ef53b6..d334bcc6d5bbec5012cc7493a80b19ced8cda1dc 100644 (file)
@@ -80,7 +80,7 @@ nv4_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv04_bus_new },
        .clk      = { 0x00000001, nv04_clk_new },
-       .devinit = nv04_devinit_new,
+       .devinit  = { 0x00000001, nv04_devinit_new },
        .fb = nv04_fb_new,
        .i2c = nv04_i2c_new,
        .imem = nv04_instmem_new,
@@ -101,7 +101,7 @@ nv5_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv04_bus_new },
        .clk      = { 0x00000001, nv04_clk_new },
-       .devinit = nv05_devinit_new,
+       .devinit  = { 0x00000001, nv05_devinit_new },
        .fb = nv04_fb_new,
        .i2c = nv04_i2c_new,
        .imem = nv04_instmem_new,
@@ -122,7 +122,7 @@ nv10_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv04_bus_new },
        .clk      = { 0x00000001, nv04_clk_new },
-       .devinit = nv10_devinit_new,
+       .devinit  = { 0x00000001, nv10_devinit_new },
        .fb = nv10_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -142,7 +142,7 @@ nv11_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv04_bus_new },
        .clk      = { 0x00000001, nv04_clk_new },
-       .devinit = nv10_devinit_new,
+       .devinit  = { 0x00000001, nv10_devinit_new },
        .fb = nv10_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -164,7 +164,7 @@ nv15_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv04_bus_new },
        .clk      = { 0x00000001, nv04_clk_new },
-       .devinit = nv10_devinit_new,
+       .devinit  = { 0x00000001, nv10_devinit_new },
        .fb = nv10_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -186,7 +186,7 @@ nv17_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv04_bus_new },
        .clk      = { 0x00000001, nv04_clk_new },
-       .devinit = nv10_devinit_new,
+       .devinit  = { 0x00000001, nv10_devinit_new },
        .fb = nv10_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -208,7 +208,7 @@ nv18_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv04_bus_new },
        .clk      = { 0x00000001, nv04_clk_new },
-       .devinit = nv10_devinit_new,
+       .devinit  = { 0x00000001, nv10_devinit_new },
        .fb = nv10_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -230,7 +230,7 @@ nv1a_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv04_bus_new },
        .clk      = { 0x00000001, nv04_clk_new },
-       .devinit = nv1a_devinit_new,
+       .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb = nv1a_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -252,7 +252,7 @@ nv1f_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv04_bus_new },
        .clk      = { 0x00000001, nv04_clk_new },
-       .devinit = nv1a_devinit_new,
+       .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb = nv1a_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -274,7 +274,7 @@ nv20_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv04_bus_new },
        .clk      = { 0x00000001, nv04_clk_new },
-       .devinit = nv20_devinit_new,
+       .devinit  = { 0x00000001, nv20_devinit_new },
        .fb = nv20_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -296,7 +296,7 @@ nv25_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv04_bus_new },
        .clk      = { 0x00000001, nv04_clk_new },
-       .devinit = nv20_devinit_new,
+       .devinit  = { 0x00000001, nv20_devinit_new },
        .fb = nv25_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -318,7 +318,7 @@ nv28_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv04_bus_new },
        .clk      = { 0x00000001, nv04_clk_new },
-       .devinit = nv20_devinit_new,
+       .devinit  = { 0x00000001, nv20_devinit_new },
        .fb = nv25_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -340,7 +340,7 @@ nv2a_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv04_bus_new },
        .clk      = { 0x00000001, nv04_clk_new },
-       .devinit = nv20_devinit_new,
+       .devinit  = { 0x00000001, nv20_devinit_new },
        .fb = nv25_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -362,7 +362,7 @@ nv30_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv04_bus_new },
        .clk      = { 0x00000001, nv04_clk_new },
-       .devinit = nv20_devinit_new,
+       .devinit  = { 0x00000001, nv20_devinit_new },
        .fb = nv30_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -384,7 +384,7 @@ nv31_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv31_bus_new },
        .clk      = { 0x00000001, nv04_clk_new },
-       .devinit = nv20_devinit_new,
+       .devinit  = { 0x00000001, nv20_devinit_new },
        .fb = nv30_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -407,7 +407,7 @@ nv34_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv31_bus_new },
        .clk      = { 0x00000001, nv04_clk_new },
-       .devinit = nv10_devinit_new,
+       .devinit  = { 0x00000001, nv10_devinit_new },
        .fb = nv10_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -430,7 +430,7 @@ nv35_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv04_bus_new },
        .clk      = { 0x00000001, nv04_clk_new },
-       .devinit = nv20_devinit_new,
+       .devinit  = { 0x00000001, nv20_devinit_new },
        .fb = nv35_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -452,7 +452,7 @@ nv36_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv31_bus_new },
        .clk      = { 0x00000001, nv04_clk_new },
-       .devinit = nv20_devinit_new,
+       .devinit  = { 0x00000001, nv20_devinit_new },
        .fb = nv36_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -475,7 +475,7 @@ nv40_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv31_bus_new },
        .clk      = { 0x00000001, nv40_clk_new },
-       .devinit = nv1a_devinit_new,
+       .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb = nv40_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -501,7 +501,7 @@ nv41_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv31_bus_new },
        .clk      = { 0x00000001, nv40_clk_new },
-       .devinit = nv1a_devinit_new,
+       .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb = nv41_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -527,7 +527,7 @@ nv42_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv31_bus_new },
        .clk      = { 0x00000001, nv40_clk_new },
-       .devinit = nv1a_devinit_new,
+       .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb = nv41_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -553,7 +553,7 @@ nv43_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv31_bus_new },
        .clk      = { 0x00000001, nv40_clk_new },
-       .devinit = nv1a_devinit_new,
+       .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb = nv41_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -579,7 +579,7 @@ nv44_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv31_bus_new },
        .clk      = { 0x00000001, nv40_clk_new },
-       .devinit = nv1a_devinit_new,
+       .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb = nv44_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -605,7 +605,7 @@ nv45_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv31_bus_new },
        .clk      = { 0x00000001, nv40_clk_new },
-       .devinit = nv1a_devinit_new,
+       .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb = nv40_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -631,7 +631,7 @@ nv46_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv31_bus_new },
        .clk      = { 0x00000001, nv40_clk_new },
-       .devinit = nv1a_devinit_new,
+       .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb = nv46_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -657,7 +657,7 @@ nv47_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv31_bus_new },
        .clk      = { 0x00000001, nv40_clk_new },
-       .devinit = nv1a_devinit_new,
+       .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb = nv47_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -683,7 +683,7 @@ nv49_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv31_bus_new },
        .clk      = { 0x00000001, nv40_clk_new },
-       .devinit = nv1a_devinit_new,
+       .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb = nv49_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -709,7 +709,7 @@ nv4a_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv31_bus_new },
        .clk      = { 0x00000001, nv40_clk_new },
-       .devinit = nv1a_devinit_new,
+       .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb = nv44_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -735,7 +735,7 @@ nv4b_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv31_bus_new },
        .clk      = { 0x00000001, nv40_clk_new },
-       .devinit = nv1a_devinit_new,
+       .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb = nv49_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -761,7 +761,7 @@ nv4c_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv31_bus_new },
        .clk      = { 0x00000001, nv40_clk_new },
-       .devinit = nv1a_devinit_new,
+       .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb = nv46_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -787,7 +787,7 @@ nv4e_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv31_bus_new },
        .clk      = { 0x00000001, nv40_clk_new },
-       .devinit = nv1a_devinit_new,
+       .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb = nv4e_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv4e_i2c_new,
@@ -814,7 +814,7 @@ nv50_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv50_bus_new },
        .clk      = { 0x00000001, nv50_clk_new },
-       .devinit = nv50_devinit_new,
+       .devinit  = { 0x00000001, nv50_devinit_new },
        .fb = nv50_fb_new,
        .fuse = nv50_fuse_new,
        .gpio = nv50_gpio_new,
@@ -842,7 +842,7 @@ nv63_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv31_bus_new },
        .clk      = { 0x00000001, nv40_clk_new },
-       .devinit = nv1a_devinit_new,
+       .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb = nv46_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -868,7 +868,7 @@ nv67_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv31_bus_new },
        .clk      = { 0x00000001, nv40_clk_new },
-       .devinit = nv1a_devinit_new,
+       .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb = nv46_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -894,7 +894,7 @@ nv68_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv31_bus_new },
        .clk      = { 0x00000001, nv40_clk_new },
-       .devinit = nv1a_devinit_new,
+       .devinit  = { 0x00000001, nv1a_devinit_new },
        .fb = nv46_fb_new,
        .gpio = nv10_gpio_new,
        .i2c = nv04_i2c_new,
@@ -921,7 +921,7 @@ nv84_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv50_bus_new },
        .clk      = { 0x00000001, g84_clk_new },
-       .devinit = g84_devinit_new,
+       .devinit  = { 0x00000001, g84_devinit_new },
        .fb = g84_fb_new,
        .fuse = nv50_fuse_new,
        .gpio = nv50_gpio_new,
@@ -953,7 +953,7 @@ nv86_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv50_bus_new },
        .clk      = { 0x00000001, g84_clk_new },
-       .devinit = g84_devinit_new,
+       .devinit  = { 0x00000001, g84_devinit_new },
        .fb = g84_fb_new,
        .fuse = nv50_fuse_new,
        .gpio = nv50_gpio_new,
@@ -985,7 +985,7 @@ nv92_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, nv50_bus_new },
        .clk      = { 0x00000001, g84_clk_new },
-       .devinit = g84_devinit_new,
+       .devinit  = { 0x00000001, g84_devinit_new },
        .fb = g84_fb_new,
        .fuse = nv50_fuse_new,
        .gpio = nv50_gpio_new,
@@ -1017,7 +1017,7 @@ nv94_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, g94_bus_new },
        .clk      = { 0x00000001, g84_clk_new },
-       .devinit = g84_devinit_new,
+       .devinit  = { 0x00000001, g84_devinit_new },
        .fb = g84_fb_new,
        .fuse = nv50_fuse_new,
        .gpio = g94_gpio_new,
@@ -1049,7 +1049,7 @@ nv96_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, g94_bus_new },
        .clk      = { 0x00000001, g84_clk_new },
-       .devinit = g84_devinit_new,
+       .devinit  = { 0x00000001, g84_devinit_new },
        .fb = g84_fb_new,
        .fuse = nv50_fuse_new,
        .gpio = g94_gpio_new,
@@ -1081,7 +1081,7 @@ nv98_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, g94_bus_new },
        .clk      = { 0x00000001, g84_clk_new },
-       .devinit = g98_devinit_new,
+       .devinit  = { 0x00000001, g98_devinit_new },
        .fb = g84_fb_new,
        .fuse = nv50_fuse_new,
        .gpio = g94_gpio_new,
@@ -1113,7 +1113,7 @@ nva0_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, g94_bus_new },
        .clk      = { 0x00000001, g84_clk_new },
-       .devinit = g84_devinit_new,
+       .devinit  = { 0x00000001, g84_devinit_new },
        .fb = g84_fb_new,
        .fuse = nv50_fuse_new,
        .gpio = g94_gpio_new,
@@ -1145,7 +1145,7 @@ nva3_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, g94_bus_new },
        .clk      = { 0x00000001, gt215_clk_new },
-       .devinit = gt215_devinit_new,
+       .devinit  = { 0x00000001, gt215_devinit_new },
        .fb = gt215_fb_new,
        .fuse = nv50_fuse_new,
        .gpio = g94_gpio_new,
@@ -1179,7 +1179,7 @@ nva5_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, g94_bus_new },
        .clk      = { 0x00000001, gt215_clk_new },
-       .devinit = gt215_devinit_new,
+       .devinit  = { 0x00000001, gt215_devinit_new },
        .fb = gt215_fb_new,
        .fuse = nv50_fuse_new,
        .gpio = g94_gpio_new,
@@ -1212,7 +1212,7 @@ nva8_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, g94_bus_new },
        .clk      = { 0x00000001, gt215_clk_new },
-       .devinit = gt215_devinit_new,
+       .devinit  = { 0x00000001, gt215_devinit_new },
        .fb = gt215_fb_new,
        .fuse = nv50_fuse_new,
        .gpio = g94_gpio_new,
@@ -1245,7 +1245,7 @@ nvaa_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, g94_bus_new },
        .clk      = { 0x00000001, mcp77_clk_new },
-       .devinit = g98_devinit_new,
+       .devinit  = { 0x00000001, g98_devinit_new },
        .fb = mcp77_fb_new,
        .fuse = nv50_fuse_new,
        .gpio = g94_gpio_new,
@@ -1277,7 +1277,7 @@ nvac_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, g94_bus_new },
        .clk      = { 0x00000001, mcp77_clk_new },
-       .devinit = g98_devinit_new,
+       .devinit  = { 0x00000001, g98_devinit_new },
        .fb = mcp77_fb_new,
        .fuse = nv50_fuse_new,
        .gpio = g94_gpio_new,
@@ -1309,7 +1309,7 @@ nvaf_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, g94_bus_new },
        .clk      = { 0x00000001, gt215_clk_new },
-       .devinit = mcp89_devinit_new,
+       .devinit  = { 0x00000001, mcp89_devinit_new },
        .fb = mcp89_fb_new,
        .fuse = nv50_fuse_new,
        .gpio = g94_gpio_new,
@@ -1342,7 +1342,7 @@ nvc0_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
        .clk      = { 0x00000001, gf100_clk_new },
-       .devinit = gf100_devinit_new,
+       .devinit  = { 0x00000001, gf100_devinit_new },
        .fb = gf100_fb_new,
        .fuse = gf100_fuse_new,
        .gpio = g94_gpio_new,
@@ -1379,7 +1379,7 @@ nvc1_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
        .clk      = { 0x00000001, gf100_clk_new },
-       .devinit = gf100_devinit_new,
+       .devinit  = { 0x00000001, gf100_devinit_new },
        .fb = gf108_fb_new,
        .fuse = gf100_fuse_new,
        .gpio = g94_gpio_new,
@@ -1415,7 +1415,7 @@ nvc3_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
        .clk      = { 0x00000001, gf100_clk_new },
-       .devinit = gf100_devinit_new,
+       .devinit  = { 0x00000001, gf100_devinit_new },
        .fb = gf100_fb_new,
        .fuse = gf100_fuse_new,
        .gpio = g94_gpio_new,
@@ -1451,7 +1451,7 @@ nvc4_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
        .clk      = { 0x00000001, gf100_clk_new },
-       .devinit = gf100_devinit_new,
+       .devinit  = { 0x00000001, gf100_devinit_new },
        .fb = gf100_fb_new,
        .fuse = gf100_fuse_new,
        .gpio = g94_gpio_new,
@@ -1488,7 +1488,7 @@ nvc8_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
        .clk      = { 0x00000001, gf100_clk_new },
-       .devinit = gf100_devinit_new,
+       .devinit  = { 0x00000001, gf100_devinit_new },
        .fb = gf100_fb_new,
        .fuse = gf100_fuse_new,
        .gpio = g94_gpio_new,
@@ -1525,7 +1525,7 @@ nvce_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
        .clk      = { 0x00000001, gf100_clk_new },
-       .devinit = gf100_devinit_new,
+       .devinit  = { 0x00000001, gf100_devinit_new },
        .fb = gf100_fb_new,
        .fuse = gf100_fuse_new,
        .gpio = g94_gpio_new,
@@ -1562,7 +1562,7 @@ nvcf_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
        .clk      = { 0x00000001, gf100_clk_new },
-       .devinit = gf100_devinit_new,
+       .devinit  = { 0x00000001, gf100_devinit_new },
        .fb = gf100_fb_new,
        .fuse = gf100_fuse_new,
        .gpio = g94_gpio_new,
@@ -1598,7 +1598,7 @@ nvd7_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
        .clk      = { 0x00000001, gf100_clk_new },
-       .devinit = gf100_devinit_new,
+       .devinit  = { 0x00000001, gf100_devinit_new },
        .fb = gf100_fb_new,
        .fuse = gf100_fuse_new,
        .gpio = gf119_gpio_new,
@@ -1633,7 +1633,7 @@ nvd9_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
        .clk      = { 0x00000001, gf100_clk_new },
-       .devinit = gf100_devinit_new,
+       .devinit  = { 0x00000001, gf100_devinit_new },
        .fb = gf100_fb_new,
        .fuse = gf100_fuse_new,
        .gpio = gf119_gpio_new,
@@ -1669,7 +1669,7 @@ nve4_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
        .clk      = { 0x00000001, gk104_clk_new },
-       .devinit = gf100_devinit_new,
+       .devinit  = { 0x00000001, gf100_devinit_new },
        .fb = gk104_fb_new,
        .fuse = gf100_fuse_new,
        .gpio = gk104_gpio_new,
@@ -1708,7 +1708,7 @@ nve6_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
        .clk      = { 0x00000001, gk104_clk_new },
-       .devinit = gf100_devinit_new,
+       .devinit  = { 0x00000001, gf100_devinit_new },
        .fb = gk104_fb_new,
        .fuse = gf100_fuse_new,
        .gpio = gk104_gpio_new,
@@ -1747,7 +1747,7 @@ nve7_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
        .clk      = { 0x00000001, gk104_clk_new },
-       .devinit = gf100_devinit_new,
+       .devinit  = { 0x00000001, gf100_devinit_new },
        .fb = gk104_fb_new,
        .fuse = gf100_fuse_new,
        .gpio = gk104_gpio_new,
@@ -1811,7 +1811,7 @@ nvf0_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
        .clk      = { 0x00000001, gk104_clk_new },
-       .devinit = gf100_devinit_new,
+       .devinit  = { 0x00000001, gf100_devinit_new },
        .fb = gk110_fb_new,
        .fuse = gf100_fuse_new,
        .gpio = gk104_gpio_new,
@@ -1849,7 +1849,7 @@ nvf1_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
        .clk      = { 0x00000001, gk104_clk_new },
-       .devinit = gf100_devinit_new,
+       .devinit  = { 0x00000001, gf100_devinit_new },
        .fb = gk110_fb_new,
        .fuse = gf100_fuse_new,
        .gpio = gk104_gpio_new,
@@ -1887,7 +1887,7 @@ nv106_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
        .clk      = { 0x00000001, gk104_clk_new },
-       .devinit = gf100_devinit_new,
+       .devinit  = { 0x00000001, gf100_devinit_new },
        .fb = gk110_fb_new,
        .fuse = gf100_fuse_new,
        .gpio = gk104_gpio_new,
@@ -1925,7 +1925,7 @@ nv108_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
        .clk      = { 0x00000001, gk104_clk_new },
-       .devinit = gf100_devinit_new,
+       .devinit  = { 0x00000001, gf100_devinit_new },
        .fb = gk110_fb_new,
        .fuse = gf100_fuse_new,
        .gpio = gk104_gpio_new,
@@ -1963,7 +1963,7 @@ nv117_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
        .clk      = { 0x00000001, gk104_clk_new },
-       .devinit = gm107_devinit_new,
+       .devinit  = { 0x00000001, gm107_devinit_new },
        .fb = gm107_fb_new,
        .fuse = gm107_fuse_new,
        .gpio = gk104_gpio_new,
@@ -1999,7 +1999,7 @@ nv118_chipset = {
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
        .clk      = { 0x00000001, gk104_clk_new },
-       .devinit = gm107_devinit_new,
+       .devinit  = { 0x00000001, gm107_devinit_new },
        .fb = gm107_fb_new,
        .fuse = gm107_fuse_new,
        .gpio = gk104_gpio_new,
@@ -2033,7 +2033,7 @@ nv120_chipset = {
        .bar      = { 0x00000001, gm107_bar_new },
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
-       .devinit = gm200_devinit_new,
+       .devinit  = { 0x00000001, gm200_devinit_new },
        .fb = gm200_fb_new,
        .fuse = gm107_fuse_new,
        .gpio = gk104_gpio_new,
@@ -2071,7 +2071,7 @@ nv124_chipset = {
        .bar      = { 0x00000001, gm107_bar_new },
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
-       .devinit = gm200_devinit_new,
+       .devinit  = { 0x00000001, gm200_devinit_new },
        .fb = gm200_fb_new,
        .fuse = gm107_fuse_new,
        .gpio = gk104_gpio_new,
@@ -2109,7 +2109,7 @@ nv126_chipset = {
        .bar      = { 0x00000001, gm107_bar_new },
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
-       .devinit = gm200_devinit_new,
+       .devinit  = { 0x00000001, gm200_devinit_new },
        .fb = gm200_fb_new,
        .fuse = gm107_fuse_new,
        .gpio = gk104_gpio_new,
@@ -2171,7 +2171,7 @@ nv130_chipset = {
        .bar      = { 0x00000001, gm107_bar_new },
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
-       .devinit = gm200_devinit_new,
+       .devinit  = { 0x00000001, gm200_devinit_new },
        .fault = gp100_fault_new,
        .fb = gp100_fb_new,
        .fuse = gm107_fuse_new,
@@ -2211,7 +2211,7 @@ nv132_chipset = {
        .bar      = { 0x00000001, gm107_bar_new },
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
-       .devinit = gm200_devinit_new,
+       .devinit  = { 0x00000001, gm200_devinit_new },
        .fault = gp100_fault_new,
        .fb = gp102_fb_new,
        .fuse = gm107_fuse_new,
@@ -2249,7 +2249,7 @@ nv134_chipset = {
        .bar      = { 0x00000001, gm107_bar_new },
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
-       .devinit = gm200_devinit_new,
+       .devinit  = { 0x00000001, gm200_devinit_new },
        .fault = gp100_fault_new,
        .fb = gp102_fb_new,
        .fuse = gm107_fuse_new,
@@ -2287,7 +2287,7 @@ nv136_chipset = {
        .bar      = { 0x00000001, gm107_bar_new },
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
-       .devinit = gm200_devinit_new,
+       .devinit  = { 0x00000001, gm200_devinit_new },
        .fault = gp100_fault_new,
        .fb = gp102_fb_new,
        .fuse = gm107_fuse_new,
@@ -2324,7 +2324,7 @@ nv137_chipset = {
        .bar      = { 0x00000001, gm107_bar_new },
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
-       .devinit = gm200_devinit_new,
+       .devinit  = { 0x00000001, gm200_devinit_new },
        .fault = gp100_fault_new,
        .fb = gp102_fb_new,
        .fuse = gm107_fuse_new,
@@ -2362,7 +2362,7 @@ nv138_chipset = {
        .bar      = { 0x00000001, gm107_bar_new },
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
-       .devinit = gm200_devinit_new,
+       .devinit  = { 0x00000001, gm200_devinit_new },
        .fault = gp100_fault_new,
        .fb = gp102_fb_new,
        .fuse = gm107_fuse_new,
@@ -2422,7 +2422,7 @@ nv140_chipset = {
        .bar      = { 0x00000001, gm107_bar_new },
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
-       .devinit = gv100_devinit_new,
+       .devinit  = { 0x00000001, gv100_devinit_new },
        .fault = gv100_fault_new,
        .fb = gv100_fb_new,
        .fuse = gm107_fuse_new,
@@ -2466,7 +2466,7 @@ nv162_chipset = {
        .bar      = { 0x00000001, tu102_bar_new },
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
-       .devinit = tu102_devinit_new,
+       .devinit  = { 0x00000001, tu102_devinit_new },
        .fault = tu102_fault_new,
        .fb = gv100_fb_new,
        .fuse = gm107_fuse_new,
@@ -2504,7 +2504,7 @@ nv164_chipset = {
        .bar      = { 0x00000001, tu102_bar_new },
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
-       .devinit = tu102_devinit_new,
+       .devinit  = { 0x00000001, tu102_devinit_new },
        .fault = tu102_fault_new,
        .fb = gv100_fb_new,
        .fuse = gm107_fuse_new,
@@ -2543,7 +2543,7 @@ nv166_chipset = {
        .bar      = { 0x00000001, tu102_bar_new },
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
-       .devinit = tu102_devinit_new,
+       .devinit  = { 0x00000001, tu102_devinit_new },
        .fault = tu102_fault_new,
        .fb = gv100_fb_new,
        .fuse = gm107_fuse_new,
@@ -2583,7 +2583,7 @@ nv167_chipset = {
        .bar      = { 0x00000001, tu102_bar_new },
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
-       .devinit = tu102_devinit_new,
+       .devinit  = { 0x00000001, tu102_devinit_new },
        .fault = tu102_fault_new,
        .fb = gv100_fb_new,
        .fuse = gm107_fuse_new,
@@ -2621,7 +2621,7 @@ nv168_chipset = {
        .bar      = { 0x00000001, tu102_bar_new },
        .bios     = { 0x00000001, nvkm_bios_new },
        .bus      = { 0x00000001, gf100_bus_new },
-       .devinit = tu102_devinit_new,
+       .devinit  = { 0x00000001, tu102_devinit_new },
        .fault = tu102_fault_new,
        .fb = gv100_fb_new,
        .fuse = gm107_fuse_new,
@@ -2657,7 +2657,7 @@ nv170_chipset = {
        .name = "GA100",
        .bar      = { 0x00000001, tu102_bar_new },
        .bios     = { 0x00000001, nvkm_bios_new },
-       .devinit = ga100_devinit_new,
+       .devinit  = { 0x00000001, ga100_devinit_new },
        .fb = ga100_fb_new,
        .gpio = gk104_gpio_new,
        .i2c = gm200_i2c_new,
@@ -2674,7 +2674,7 @@ nv172_chipset = {
        .name = "GA102",
        .bar      = { 0x00000001, tu102_bar_new },
        .bios     = { 0x00000001, nvkm_bios_new },
-       .devinit = ga100_devinit_new,
+       .devinit  = { 0x00000001, ga100_devinit_new },
        .fb = ga102_fb_new,
        .gpio = ga102_gpio_new,
        .i2c = gm200_i2c_new,
@@ -2693,7 +2693,7 @@ nv174_chipset = {
        .name = "GA104",
        .bar      = { 0x00000001, tu102_bar_new },
        .bios     = { 0x00000001, nvkm_bios_new },
-       .devinit = ga100_devinit_new,
+       .devinit  = { 0x00000001, ga100_devinit_new },
        .fb = ga102_fb_new,
        .gpio = ga102_gpio_new,
        .i2c = gm200_i2c_new,
@@ -3248,7 +3248,6 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
 #include <core/layout.h>
 #undef NVKM_LAYOUT_INST
 #undef NVKM_LAYOUT_ONCE
-               _(NVKM_SUBDEV_DEVINIT ,  devinit);
                _(NVKM_SUBDEV_FAULT   ,    fault);
                _(NVKM_SUBDEV_FB      ,       fb);
                _(NVKM_SUBDEV_FUSE    ,     fuse);
index 4756019ddf3fba74bf69795a7fd567e38241d813..1ccccc212d942940f127189befca6fba7d5fcec9 100644 (file)
@@ -126,11 +126,10 @@ nvkm_devinit = {
 };
 
 void
-nvkm_devinit_ctor(const struct nvkm_devinit_func *func,
-                 struct nvkm_device *device, int index,
-                 struct nvkm_devinit *init)
+nvkm_devinit_ctor(const struct nvkm_devinit_func *func, struct nvkm_device *device,
+                 enum nvkm_subdev_type type, int inst, struct nvkm_devinit *init)
 {
-       nvkm_subdev_ctor(&nvkm_devinit, device, index, &init->subdev);
+       nvkm_subdev_ctor(&nvkm_devinit, device, type, inst, &init->subdev);
        init->func = func;
        init->force_post = nvkm_boolopt(device->cfgopt, "NvForcePost", false);
 }
index e895289bf3c176a16ad9fd57d0354b7dd012a0a1..44513a474f743af6588341b96ac05792a2149648 100644 (file)
@@ -61,8 +61,8 @@ g84_devinit = {
 };
 
 int
-g84_devinit_new(struct nvkm_device *device, int index,
+g84_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
                struct nvkm_devinit **pinit)
 {
-       return nv50_devinit_new_(&g84_devinit, device, index, pinit);
+       return nv50_devinit_new_(&g84_devinit, device, type, inst, pinit);
 }
index a9d45844df5a8fafca713afb1acc38da8d9b3b84..ba810cb1f386af066a2929faa1a8f4aaf3fbdbcf 100644 (file)
@@ -60,8 +60,8 @@ g98_devinit = {
 };
 
 int
-g98_devinit_new(struct nvkm_device *device, int index,
+g98_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
                struct nvkm_devinit **pinit)
 {
-       return nv50_devinit_new_(&g98_devinit, device, index, pinit);
+       return nv50_devinit_new_(&g98_devinit, device, type, inst, pinit);
 }
index 636a92128f6c8cab99160cee3f8c392ceb0f11df..6b280b05c4ca07c9bedf81b76c26827bbf2f937f 100644 (file)
@@ -70,7 +70,8 @@ ga100_devinit = {
 };
 
 int
-ga100_devinit_new(struct nvkm_device *device, int index, struct nvkm_devinit **pinit)
+ga100_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+                 struct nvkm_devinit **pinit)
 {
-       return nv50_devinit_new_(&ga100_devinit, device, index, pinit);
+       return nv50_devinit_new_(&ga100_devinit, device, type, inst, pinit);
 }
index 8b1b34c3ad2624cfbda40054a7c5410b8a0364f6..54735a6a01cb7abb102498c5f4773b51c3e8043c 100644 (file)
@@ -114,8 +114,8 @@ gf100_devinit = {
 };
 
 int
-gf100_devinit_new(struct nvkm_device *device, int index,
-               struct nvkm_devinit **pinit)
+gf100_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+                 struct nvkm_devinit **pinit)
 {
-       return nv50_devinit_new_(&gf100_devinit, device, index, pinit);
+       return nv50_devinit_new_(&gf100_devinit, device, type, inst, pinit);
 }
index 28ca01be3d3825b4fd249f85c87c41782b10d5f5..f5eb88bffe3bc9ea9b6c38d5f852695a039a3ca5 100644 (file)
@@ -54,8 +54,8 @@ gm107_devinit = {
 };
 
 int
-gm107_devinit_new(struct nvkm_device *device, int index,
-               struct nvkm_devinit **pinit)
+gm107_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+                 struct nvkm_devinit **pinit)
 {
-       return nv50_devinit_new_(&gm107_devinit, device, index, pinit);
+       return nv50_devinit_new_(&gm107_devinit, device, type, inst, pinit);
 }
index 59940dacc2ba028939d3822c0e736248a5af9359..a308b9bde4497e403377d8f048f8407ba63ef2c9 100644 (file)
@@ -179,8 +179,8 @@ gm200_devinit = {
 };
 
 int
-gm200_devinit_new(struct nvkm_device *device, int index,
-               struct nvkm_devinit **pinit)
+gm200_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+                 struct nvkm_devinit **pinit)
 {
-       return nv50_devinit_new_(&gm200_devinit, device, index, pinit);
+       return nv50_devinit_new_(&gm200_devinit, device, type, inst, pinit);
 }
index 9a8522fa9c6523ff16666456cb9ee02433dc86ad..f93ab872395f566963d52cd3b36ad2115ff45143 100644 (file)
@@ -146,8 +146,8 @@ gt215_devinit = {
 };
 
 int
-gt215_devinit_new(struct nvkm_device *device, int index,
-               struct nvkm_devinit **pinit)
+gt215_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+                 struct nvkm_devinit **pinit)
 {
-       return nv50_devinit_new_(&gt215_devinit, device, index, pinit);
+       return nv50_devinit_new_(&gt215_devinit, device, type, inst, pinit);
 }
index fbde6828bd38ecc9e6080e877c4eac554d7a800b..b4d1688517d5a5df2ed32b68cfef0e5ed8e5abc3 100644 (file)
@@ -72,8 +72,8 @@ gv100_devinit = {
 };
 
 int
-gv100_devinit_new(struct nvkm_device *device, int index,
-               struct nvkm_devinit **pinit)
+gv100_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+                 struct nvkm_devinit **pinit)
 {
-       return nv50_devinit_new_(&gv100_devinit, device, index, pinit);
+       return nv50_devinit_new_(&gv100_devinit, device, type, inst, pinit);
 }
index ce4f718e98a174fb5b6a982fd3c7b8b90d8079f3..cb74d433ade2c43041bff6144bb1dfbc95eb0e64 100644 (file)
@@ -61,8 +61,8 @@ mcp89_devinit = {
 };
 
 int
-mcp89_devinit_new(struct nvkm_device *device, int index,
-               struct nvkm_devinit **pinit)
+mcp89_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+                 struct nvkm_devinit **pinit)
 {
-       return nv50_devinit_new_(&mcp89_devinit, device, index, pinit);
+       return nv50_devinit_new_(&mcp89_devinit, device, type, inst, pinit);
 }
index 317ce9fb82251caeb9da9e53c94e4ad43d2386e6..88bc890f89a2b44e368eecb7f6565e9756490573 100644 (file)
@@ -434,9 +434,8 @@ nv04_devinit_dtor(struct nvkm_devinit *base)
 }
 
 int
-nv04_devinit_new_(const struct nvkm_devinit_func *func,
-                 struct nvkm_device *device, int index,
-                 struct nvkm_devinit **pinit)
+nv04_devinit_new_(const struct nvkm_devinit_func *func, struct nvkm_device *device,
+                 enum nvkm_subdev_type type, int inst, struct nvkm_devinit **pinit)
 {
        struct nv04_devinit *init;
 
@@ -444,7 +443,7 @@ nv04_devinit_new_(const struct nvkm_devinit_func *func,
                return -ENOMEM;
        *pinit = &init->base;
 
-       nvkm_devinit_ctor(func, device, index, &init->base);
+       nvkm_devinit_ctor(func, device, type, inst, &init->base);
        init->owner = -1;
        return 0;
 }
@@ -459,8 +458,8 @@ nv04_devinit = {
 };
 
 int
-nv04_devinit_new(struct nvkm_device *device, int index,
+nv04_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
                 struct nvkm_devinit **pinit)
 {
-       return nv04_devinit_new_(&nv04_devinit, device, index, pinit);
+       return nv04_devinit_new_(&nv04_devinit, device, type, inst, pinit);
 }
index 15b029ddf6df2e58e78ae964297ef6242f33f59c..06ad8a606bb824066f2992b0eac9a782d9e3365e 100644 (file)
@@ -11,7 +11,7 @@ struct nv04_devinit {
 };
 
 int nv04_devinit_new_(const struct nvkm_devinit_func *, struct nvkm_device *,
-                     int, struct nvkm_devinit **);
+                     enum nvkm_subdev_type, int, struct nvkm_devinit **);
 void *nv04_devinit_dtor(struct nvkm_devinit *);
 void nv04_devinit_preinit(struct nvkm_devinit *);
 void nv04_devinit_fini(struct nvkm_devinit *);
index 9891eadca1ce85545e5ecab77e8d29c79ce30a4c..1410befd2285a3a2f8336b531352519adc748ece 100644 (file)
@@ -136,8 +136,8 @@ nv05_devinit = {
 };
 
 int
-nv05_devinit_new(struct nvkm_device *device, int index,
+nv05_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
                 struct nvkm_devinit **pinit)
 {
-       return nv04_devinit_new_(&nv05_devinit, device, index, pinit);
+       return nv04_devinit_new_(&nv05_devinit, device, type, inst, pinit);
 }
index 570822f83acf5f539fb2322493b5a7c926919b42..a6aa8786d610fd855efc77dafd667adec2ad63f2 100644 (file)
@@ -106,8 +106,8 @@ nv10_devinit = {
 };
 
 int
-nv10_devinit_new(struct nvkm_device *device, int index,
+nv10_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
                 struct nvkm_devinit **pinit)
 {
-       return nv04_devinit_new_(&nv10_devinit, device, index, pinit);
+       return nv04_devinit_new_(&nv10_devinit, device, type, inst, pinit);
 }
index fefafec7e2a7cb7b695dd7b5b6b6b80c1629b97d..4cc5ef9a5a63f3a0910d7b5440093c5cc657839f 100644 (file)
@@ -35,8 +35,8 @@ nv1a_devinit = {
 };
 
 int
-nv1a_devinit_new(struct nvkm_device *device, int index,
+nv1a_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
                 struct nvkm_devinit **pinit)
 {
-       return nv04_devinit_new_(&nv1a_devinit, device, index, pinit);
+       return nv04_devinit_new_(&nv1a_devinit, device, type, inst, pinit);
 }
index 4ef04e0d8826117679bcd91ebb08569f5301db75..67f46df723e43c4b6ddf09c9f82214666650af4f 100644 (file)
@@ -72,8 +72,8 @@ nv20_devinit = {
 };
 
 int
-nv20_devinit_new(struct nvkm_device *device, int index,
+nv20_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
                 struct nvkm_devinit **pinit)
 {
-       return nv04_devinit_new_(&nv20_devinit, device, index, pinit);
+       return nv04_devinit_new_(&nv20_devinit, device, type, inst, pinit);
 }
index d7947c4391dcec107f896d685e558fc074ac8fba..4f25e930339d4827b41355a9f55d98c2f93b6343 100644 (file)
@@ -148,9 +148,8 @@ nv50_devinit_init(struct nvkm_devinit *base)
 }
 
 int
-nv50_devinit_new_(const struct nvkm_devinit_func *func,
-                 struct nvkm_device *device, int index,
-                 struct nvkm_devinit **pinit)
+nv50_devinit_new_(const struct nvkm_devinit_func *func, struct nvkm_device *device,
+                 enum nvkm_subdev_type type, int inst, struct nvkm_devinit **pinit)
 {
        struct nv50_devinit *init;
 
@@ -158,7 +157,7 @@ nv50_devinit_new_(const struct nvkm_devinit_func *func,
                return -ENOMEM;
        *pinit = &init->base;
 
-       nvkm_devinit_ctor(func, device, index, &init->base);
+       nvkm_devinit_ctor(func, device, type, inst, &init->base);
        return 0;
 }
 
@@ -172,8 +171,8 @@ nv50_devinit = {
 };
 
 int
-nv50_devinit_new(struct nvkm_device *device, int index,
+nv50_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
                 struct nvkm_devinit **pinit)
 {
-       return nv50_devinit_new_(&nv50_devinit, device, index, pinit);
+       return nv50_devinit_new_(&nv50_devinit, device, type, inst, pinit);
 }
index e8d37a6145a2645e7903c9756ea96c32c9b2a9e1..987a7f478b84bb11368026780e4f75f0b35b4b1b 100644 (file)
@@ -9,7 +9,7 @@ struct nv50_devinit {
        u32 r001540;
 };
 
-int nv50_devinit_new_(const struct nvkm_devinit_func *, struct nvkm_device *,
+int nv50_devinit_new_(const struct nvkm_devinit_func *, struct nvkm_device *, enum nvkm_subdev_type,
                      int, struct nvkm_devinit **);
 void nv50_devinit_preinit(struct nvkm_devinit *);
 void nv50_devinit_init(struct nvkm_devinit *);
index 05961e624264754078e6bc48bc669db3f978c54f..257ed026b8f568edddc1eed2cbc4fd1865e3c35b 100644 (file)
@@ -16,7 +16,7 @@ struct nvkm_devinit_func {
 };
 
 void nvkm_devinit_ctor(const struct nvkm_devinit_func *, struct nvkm_device *,
-                      int index, struct nvkm_devinit *);
+                      enum nvkm_subdev_type, int inst, struct nvkm_devinit *);
 
 int nv04_devinit_post(struct nvkm_devinit *, bool);
 int tu102_devinit_post(struct nvkm_devinit *, bool);
index 9a469bf482f2f5bb13b270c625d9fc37b476df2c..634f64f88fc8be391f3efba4e0ff8744eed9e94c 100644 (file)
@@ -82,8 +82,8 @@ tu102_devinit = {
 };
 
 int
-tu102_devinit_new(struct nvkm_device *device, int index,
-               struct nvkm_devinit **pinit)
+tu102_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+                 struct nvkm_devinit **pinit)
 {
-       return nv50_devinit_new_(&tu102_devinit, device, index, pinit);
+       return nv50_devinit_new_(&tu102_devinit, device, type, inst, pinit);
 }