diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-12-04 04:04:41 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2021-02-11 04:49:52 +0300 |
commit | 4a34fd0e88d8e10f6a6779f0200c6454b305c89c (patch) | |
tree | fda11f89cb788c51d5705b8558bd8dcf4c807651 /drivers/gpu | |
parent | 98fd7f83665a9294665b700c4eb0e670c296f1be (diff) | |
download | linux-4a34fd0e88d8e10f6a6779f0200c6454b305c89c.tar.xz |
drm/nouveau/devinit: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers/gpu')
25 files changed, 153 insertions, 158 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h index 42ae6c5cf0e1..01e653f16edc 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h @@ -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 **); diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h b/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h index 1b79b4e812ae..47cb81c6e129 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h @@ -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) diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/devinit.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/devinit.h index 50cc7c05eac4..d22d7239c272 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/devinit.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/devinit.h @@ -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 diff --git a/drivers/gpu/drm/nouveau/nvkm/core/subdev.c b/drivers/gpu/drm/nouveau/nvkm/core/subdev.c index 8f8853a5bac6..2aa0dc6c32d3 100644 --- a/drivers/gpu/drm/nouveau/nvkm/core/subdev.c +++ b/drivers/gpu/drm/nouveau/nvkm/core/subdev.c @@ -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", diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c index bb0aefc65f7e..d334bcc6d5bb 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c @@ -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); diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/base.c index 4756019ddf3f..1ccccc212d94 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/base.c @@ -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); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/g84.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/g84.c index e895289bf3c1..44513a474f74 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/g84.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/g84.c @@ -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); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/g98.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/g98.c index a9d45844df5a..ba810cb1f386 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/g98.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/g98.c @@ -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); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/ga100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/ga100.c index 636a92128f6c..6b280b05c4ca 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/ga100.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/ga100.c @@ -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); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c index 8b1b34c3ad26..54735a6a01cb 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c @@ -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); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm107.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm107.c index 28ca01be3d38..f5eb88bffe3b 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm107.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm107.c @@ -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); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm200.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm200.c index 59940dacc2ba..a308b9bde449 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm200.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm200.c @@ -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); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c index 9a8522fa9c65..f93ab872395f 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c @@ -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_(>215_devinit, device, index, pinit); + return nv50_devinit_new_(>215_devinit, device, type, inst, pinit); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gv100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gv100.c index fbde6828bd38..b4d1688517d5 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gv100.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gv100.c @@ -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); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/mcp89.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/mcp89.c index ce4f718e98a1..cb74d433ade2 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/mcp89.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/mcp89.c @@ -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); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c index 317ce9fb8225..88bc890f89a2 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c @@ -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); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.h b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.h index 15b029ddf6df..06ad8a606bb8 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.h +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.h @@ -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 *); diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv05.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv05.c index 9891eadca1ce..1410befd2285 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv05.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv05.c @@ -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); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv10.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv10.c index 570822f83acf..a6aa8786d610 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv10.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv10.c @@ -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); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv1a.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv1a.c index fefafec7e2a7..4cc5ef9a5a63 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv1a.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv1a.c @@ -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); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv20.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv20.c index 4ef04e0d8826..67f46df723e4 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv20.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv20.c @@ -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); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c index d7947c4391dc..4f25e930339d 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c @@ -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); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.h b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.h index e8d37a6145a2..987a7f478b84 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.h +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.h @@ -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 *); diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/priv.h b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/priv.h index 05961e624264..257ed026b8f5 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/priv.h +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/priv.h @@ -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); diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/tu102.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/tu102.c index 9a469bf482f2..634f64f88fc8 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/tu102.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/tu102.c @@ -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); } |