diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-12-04 10:52:28 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2021-02-11 11:49:52 +1000 |
commit | d37766e560c9a8cf4fd428da8d2a0cbe9ad2c2d4 (patch) | |
tree | f95d4ddefaa8ba35686f79777a0aad9f6b5454a1 /drivers/gpu | |
parent | e07f50d3558a83b5c92a7b768447a092a282472c (diff) |
drm/nouveau/bus: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/core/layout.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/subdev/bus.h | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/core/subdev.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 169 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/bus/base.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/bus/g94.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/bus/gf100.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv04.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv31.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv50.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/bus/priv.h | 2 |
12 files changed, 108 insertions, 106 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h index b1872fa3b883..17ea654a8a01 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_bus *bus; struct nvkm_clk *clk; struct nvkm_devinit *devinit; struct nvkm_fault *fault; @@ -145,7 +144,6 @@ struct nvkm_device_chip { #include <core/layout.h> #undef NVKM_LAYOUT_INST #undef NVKM_LAYOUT_ONCE - int (*bus )(struct nvkm_device *, int idx, struct nvkm_bus **); int (*clk )(struct nvkm_device *, int idx, struct nvkm_clk **); int (*devinit )(struct nvkm_device *, int idx, struct nvkm_devinit **); int (*fault )(struct nvkm_device *, int idx, struct nvkm_fault **); diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h b/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h index 73252f0ef604..5bdc836642c6 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h @@ -1,4 +1,5 @@ /* SPDX-License-Identifier: MIT */ NVKM_LAYOUT_ONCE(NVKM_SUBDEV_VBIOS , struct nvkm_bios , bios) +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/bus.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bus.h index ae9ad6c034fb..2ac03bbc6133 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bus.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bus.h @@ -18,9 +18,9 @@ void nvkm_hwsq_wait(struct nvkm_hwsq *, u8 flag, u8 data); void nvkm_hwsq_wait_vblank(struct nvkm_hwsq *); void nvkm_hwsq_nsec(struct nvkm_hwsq *, u32 nsec); -int nv04_bus_new(struct nvkm_device *, int, struct nvkm_bus **); -int nv31_bus_new(struct nvkm_device *, int, struct nvkm_bus **); -int nv50_bus_new(struct nvkm_device *, int, struct nvkm_bus **); -int g94_bus_new(struct nvkm_device *, int, struct nvkm_bus **); -int gf100_bus_new(struct nvkm_device *, int, struct nvkm_bus **); +int nv04_bus_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_bus **); +int nv31_bus_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_bus **); +int nv50_bus_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_bus **); +int g94_bus_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_bus **); +int gf100_bus_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_bus **); #endif diff --git a/drivers/gpu/drm/nouveau/nvkm/core/subdev.c b/drivers/gpu/drm/nouveau/nvkm/core/subdev.c index 5e13e09baf29..bb2d88bf0edf 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_BUS ] = "bus", [NVKM_SUBDEV_CLK ] = "clk", [NVKM_SUBDEV_DEVINIT ] = "devinit", [NVKM_SUBDEV_FAULT ] = "fault", diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c index ff3539799750..5368df219739 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c @@ -78,7 +78,7 @@ static const struct nvkm_device_chip nv4_chipset = { .name = "NV04", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv04_bus_new, + .bus = { 0x00000001, nv04_bus_new }, .clk = nv04_clk_new, .devinit = nv04_devinit_new, .fb = nv04_fb_new, @@ -99,7 +99,7 @@ static const struct nvkm_device_chip nv5_chipset = { .name = "NV05", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv04_bus_new, + .bus = { 0x00000001, nv04_bus_new }, .clk = nv04_clk_new, .devinit = nv05_devinit_new, .fb = nv04_fb_new, @@ -120,7 +120,7 @@ static const struct nvkm_device_chip nv10_chipset = { .name = "NV10", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv04_bus_new, + .bus = { 0x00000001, nv04_bus_new }, .clk = nv04_clk_new, .devinit = nv10_devinit_new, .fb = nv10_fb_new, @@ -140,7 +140,7 @@ static const struct nvkm_device_chip nv11_chipset = { .name = "NV11", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv04_bus_new, + .bus = { 0x00000001, nv04_bus_new }, .clk = nv04_clk_new, .devinit = nv10_devinit_new, .fb = nv10_fb_new, @@ -162,7 +162,7 @@ static const struct nvkm_device_chip nv15_chipset = { .name = "NV15", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv04_bus_new, + .bus = { 0x00000001, nv04_bus_new }, .clk = nv04_clk_new, .devinit = nv10_devinit_new, .fb = nv10_fb_new, @@ -184,7 +184,7 @@ static const struct nvkm_device_chip nv17_chipset = { .name = "NV17", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv04_bus_new, + .bus = { 0x00000001, nv04_bus_new }, .clk = nv04_clk_new, .devinit = nv10_devinit_new, .fb = nv10_fb_new, @@ -206,7 +206,7 @@ static const struct nvkm_device_chip nv18_chipset = { .name = "NV18", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv04_bus_new, + .bus = { 0x00000001, nv04_bus_new }, .clk = nv04_clk_new, .devinit = nv10_devinit_new, .fb = nv10_fb_new, @@ -228,7 +228,7 @@ static const struct nvkm_device_chip nv1a_chipset = { .name = "nForce", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv04_bus_new, + .bus = { 0x00000001, nv04_bus_new }, .clk = nv04_clk_new, .devinit = nv1a_devinit_new, .fb = nv1a_fb_new, @@ -250,7 +250,7 @@ static const struct nvkm_device_chip nv1f_chipset = { .name = "nForce2", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv04_bus_new, + .bus = { 0x00000001, nv04_bus_new }, .clk = nv04_clk_new, .devinit = nv1a_devinit_new, .fb = nv1a_fb_new, @@ -272,7 +272,7 @@ static const struct nvkm_device_chip nv20_chipset = { .name = "NV20", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv04_bus_new, + .bus = { 0x00000001, nv04_bus_new }, .clk = nv04_clk_new, .devinit = nv20_devinit_new, .fb = nv20_fb_new, @@ -294,7 +294,7 @@ static const struct nvkm_device_chip nv25_chipset = { .name = "NV25", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv04_bus_new, + .bus = { 0x00000001, nv04_bus_new }, .clk = nv04_clk_new, .devinit = nv20_devinit_new, .fb = nv25_fb_new, @@ -316,7 +316,7 @@ static const struct nvkm_device_chip nv28_chipset = { .name = "NV28", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv04_bus_new, + .bus = { 0x00000001, nv04_bus_new }, .clk = nv04_clk_new, .devinit = nv20_devinit_new, .fb = nv25_fb_new, @@ -338,7 +338,7 @@ static const struct nvkm_device_chip nv2a_chipset = { .name = "NV2A", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv04_bus_new, + .bus = { 0x00000001, nv04_bus_new }, .clk = nv04_clk_new, .devinit = nv20_devinit_new, .fb = nv25_fb_new, @@ -360,7 +360,7 @@ static const struct nvkm_device_chip nv30_chipset = { .name = "NV30", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv04_bus_new, + .bus = { 0x00000001, nv04_bus_new }, .clk = nv04_clk_new, .devinit = nv20_devinit_new, .fb = nv30_fb_new, @@ -382,7 +382,7 @@ static const struct nvkm_device_chip nv31_chipset = { .name = "NV31", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv31_bus_new, + .bus = { 0x00000001, nv31_bus_new }, .clk = nv04_clk_new, .devinit = nv20_devinit_new, .fb = nv30_fb_new, @@ -405,7 +405,7 @@ static const struct nvkm_device_chip nv34_chipset = { .name = "NV34", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv31_bus_new, + .bus = { 0x00000001, nv31_bus_new }, .clk = nv04_clk_new, .devinit = nv10_devinit_new, .fb = nv10_fb_new, @@ -428,7 +428,7 @@ static const struct nvkm_device_chip nv35_chipset = { .name = "NV35", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv04_bus_new, + .bus = { 0x00000001, nv04_bus_new }, .clk = nv04_clk_new, .devinit = nv20_devinit_new, .fb = nv35_fb_new, @@ -450,7 +450,7 @@ static const struct nvkm_device_chip nv36_chipset = { .name = "NV36", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv31_bus_new, + .bus = { 0x00000001, nv31_bus_new }, .clk = nv04_clk_new, .devinit = nv20_devinit_new, .fb = nv36_fb_new, @@ -473,7 +473,7 @@ static const struct nvkm_device_chip nv40_chipset = { .name = "NV40", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv31_bus_new, + .bus = { 0x00000001, nv31_bus_new }, .clk = nv40_clk_new, .devinit = nv1a_devinit_new, .fb = nv40_fb_new, @@ -499,7 +499,7 @@ static const struct nvkm_device_chip nv41_chipset = { .name = "NV41", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv31_bus_new, + .bus = { 0x00000001, nv31_bus_new }, .clk = nv40_clk_new, .devinit = nv1a_devinit_new, .fb = nv41_fb_new, @@ -525,7 +525,7 @@ static const struct nvkm_device_chip nv42_chipset = { .name = "NV42", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv31_bus_new, + .bus = { 0x00000001, nv31_bus_new }, .clk = nv40_clk_new, .devinit = nv1a_devinit_new, .fb = nv41_fb_new, @@ -551,7 +551,7 @@ static const struct nvkm_device_chip nv43_chipset = { .name = "NV43", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv31_bus_new, + .bus = { 0x00000001, nv31_bus_new }, .clk = nv40_clk_new, .devinit = nv1a_devinit_new, .fb = nv41_fb_new, @@ -577,7 +577,7 @@ static const struct nvkm_device_chip nv44_chipset = { .name = "NV44", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv31_bus_new, + .bus = { 0x00000001, nv31_bus_new }, .clk = nv40_clk_new, .devinit = nv1a_devinit_new, .fb = nv44_fb_new, @@ -603,7 +603,7 @@ static const struct nvkm_device_chip nv45_chipset = { .name = "NV45", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv31_bus_new, + .bus = { 0x00000001, nv31_bus_new }, .clk = nv40_clk_new, .devinit = nv1a_devinit_new, .fb = nv40_fb_new, @@ -629,7 +629,7 @@ static const struct nvkm_device_chip nv46_chipset = { .name = "G72", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv31_bus_new, + .bus = { 0x00000001, nv31_bus_new }, .clk = nv40_clk_new, .devinit = nv1a_devinit_new, .fb = nv46_fb_new, @@ -655,7 +655,7 @@ static const struct nvkm_device_chip nv47_chipset = { .name = "G70", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv31_bus_new, + .bus = { 0x00000001, nv31_bus_new }, .clk = nv40_clk_new, .devinit = nv1a_devinit_new, .fb = nv47_fb_new, @@ -681,7 +681,7 @@ static const struct nvkm_device_chip nv49_chipset = { .name = "G71", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv31_bus_new, + .bus = { 0x00000001, nv31_bus_new }, .clk = nv40_clk_new, .devinit = nv1a_devinit_new, .fb = nv49_fb_new, @@ -707,7 +707,7 @@ static const struct nvkm_device_chip nv4a_chipset = { .name = "NV44A", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv31_bus_new, + .bus = { 0x00000001, nv31_bus_new }, .clk = nv40_clk_new, .devinit = nv1a_devinit_new, .fb = nv44_fb_new, @@ -733,7 +733,7 @@ static const struct nvkm_device_chip nv4b_chipset = { .name = "G73", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv31_bus_new, + .bus = { 0x00000001, nv31_bus_new }, .clk = nv40_clk_new, .devinit = nv1a_devinit_new, .fb = nv49_fb_new, @@ -759,7 +759,7 @@ static const struct nvkm_device_chip nv4c_chipset = { .name = "C61", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv31_bus_new, + .bus = { 0x00000001, nv31_bus_new }, .clk = nv40_clk_new, .devinit = nv1a_devinit_new, .fb = nv46_fb_new, @@ -785,7 +785,7 @@ static const struct nvkm_device_chip nv4e_chipset = { .name = "C51", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv31_bus_new, + .bus = { 0x00000001, nv31_bus_new }, .clk = nv40_clk_new, .devinit = nv1a_devinit_new, .fb = nv4e_fb_new, @@ -812,7 +812,7 @@ nv50_chipset = { .name = "G80", .bar = { 0x00000001, nv50_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv50_bus_new, + .bus = { 0x00000001, nv50_bus_new }, .clk = nv50_clk_new, .devinit = nv50_devinit_new, .fb = nv50_fb_new, @@ -840,7 +840,7 @@ static const struct nvkm_device_chip nv63_chipset = { .name = "C73", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv31_bus_new, + .bus = { 0x00000001, nv31_bus_new }, .clk = nv40_clk_new, .devinit = nv1a_devinit_new, .fb = nv46_fb_new, @@ -866,7 +866,7 @@ static const struct nvkm_device_chip nv67_chipset = { .name = "C67", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv31_bus_new, + .bus = { 0x00000001, nv31_bus_new }, .clk = nv40_clk_new, .devinit = nv1a_devinit_new, .fb = nv46_fb_new, @@ -892,7 +892,7 @@ static const struct nvkm_device_chip nv68_chipset = { .name = "C68", .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv31_bus_new, + .bus = { 0x00000001, nv31_bus_new }, .clk = nv40_clk_new, .devinit = nv1a_devinit_new, .fb = nv46_fb_new, @@ -919,7 +919,7 @@ nv84_chipset = { .name = "G84", .bar = { 0x00000001, g84_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv50_bus_new, + .bus = { 0x00000001, nv50_bus_new }, .clk = g84_clk_new, .devinit = g84_devinit_new, .fb = g84_fb_new, @@ -951,7 +951,7 @@ nv86_chipset = { .name = "G86", .bar = { 0x00000001, g84_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv50_bus_new, + .bus = { 0x00000001, nv50_bus_new }, .clk = g84_clk_new, .devinit = g84_devinit_new, .fb = g84_fb_new, @@ -983,7 +983,7 @@ nv92_chipset = { .name = "G92", .bar = { 0x00000001, g84_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = nv50_bus_new, + .bus = { 0x00000001, nv50_bus_new }, .clk = g84_clk_new, .devinit = g84_devinit_new, .fb = g84_fb_new, @@ -1015,7 +1015,7 @@ nv94_chipset = { .name = "G94", .bar = { 0x00000001, g84_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = g94_bus_new, + .bus = { 0x00000001, g94_bus_new }, .clk = g84_clk_new, .devinit = g84_devinit_new, .fb = g84_fb_new, @@ -1047,7 +1047,7 @@ nv96_chipset = { .name = "G96", .bar = { 0x00000001, g84_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = g94_bus_new, + .bus = { 0x00000001, g94_bus_new }, .clk = g84_clk_new, .devinit = g84_devinit_new, .fb = g84_fb_new, @@ -1079,7 +1079,7 @@ nv98_chipset = { .name = "G98", .bar = { 0x00000001, g84_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = g94_bus_new, + .bus = { 0x00000001, g94_bus_new }, .clk = g84_clk_new, .devinit = g98_devinit_new, .fb = g84_fb_new, @@ -1111,7 +1111,7 @@ nva0_chipset = { .name = "GT200", .bar = { 0x00000001, g84_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = g94_bus_new, + .bus = { 0x00000001, g94_bus_new }, .clk = g84_clk_new, .devinit = g84_devinit_new, .fb = g84_fb_new, @@ -1143,7 +1143,7 @@ nva3_chipset = { .name = "GT215", .bar = { 0x00000001, g84_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = g94_bus_new, + .bus = { 0x00000001, g94_bus_new }, .clk = gt215_clk_new, .devinit = gt215_devinit_new, .fb = gt215_fb_new, @@ -1177,7 +1177,7 @@ nva5_chipset = { .name = "GT216", .bar = { 0x00000001, g84_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = g94_bus_new, + .bus = { 0x00000001, g94_bus_new }, .clk = gt215_clk_new, .devinit = gt215_devinit_new, .fb = gt215_fb_new, @@ -1210,7 +1210,7 @@ nva8_chipset = { .name = "GT218", .bar = { 0x00000001, g84_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = g94_bus_new, + .bus = { 0x00000001, g94_bus_new }, .clk = gt215_clk_new, .devinit = gt215_devinit_new, .fb = gt215_fb_new, @@ -1243,7 +1243,7 @@ nvaa_chipset = { .name = "MCP77/MCP78", .bar = { 0x00000001, g84_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = g94_bus_new, + .bus = { 0x00000001, g94_bus_new }, .clk = mcp77_clk_new, .devinit = g98_devinit_new, .fb = mcp77_fb_new, @@ -1275,7 +1275,7 @@ nvac_chipset = { .name = "MCP79/MCP7A", .bar = { 0x00000001, g84_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = g94_bus_new, + .bus = { 0x00000001, g94_bus_new }, .clk = mcp77_clk_new, .devinit = g98_devinit_new, .fb = mcp77_fb_new, @@ -1307,7 +1307,7 @@ nvaf_chipset = { .name = "MCP89", .bar = { 0x00000001, g84_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = g94_bus_new, + .bus = { 0x00000001, g94_bus_new }, .clk = gt215_clk_new, .devinit = mcp89_devinit_new, .fb = mcp89_fb_new, @@ -1340,7 +1340,7 @@ nvc0_chipset = { .name = "GF100", .bar = { 0x00000001, gf100_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .clk = gf100_clk_new, .devinit = gf100_devinit_new, .fb = gf100_fb_new, @@ -1377,7 +1377,7 @@ nvc1_chipset = { .name = "GF108", .bar = { 0x00000001, gf100_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .clk = gf100_clk_new, .devinit = gf100_devinit_new, .fb = gf108_fb_new, @@ -1413,7 +1413,7 @@ nvc3_chipset = { .name = "GF106", .bar = { 0x00000001, gf100_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .clk = gf100_clk_new, .devinit = gf100_devinit_new, .fb = gf100_fb_new, @@ -1449,7 +1449,7 @@ nvc4_chipset = { .name = "GF104", .bar = { 0x00000001, gf100_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .clk = gf100_clk_new, .devinit = gf100_devinit_new, .fb = gf100_fb_new, @@ -1486,7 +1486,7 @@ nvc8_chipset = { .name = "GF110", .bar = { 0x00000001, gf100_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .clk = gf100_clk_new, .devinit = gf100_devinit_new, .fb = gf100_fb_new, @@ -1523,7 +1523,7 @@ nvce_chipset = { .name = "GF114", .bar = { 0x00000001, gf100_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .clk = gf100_clk_new, .devinit = gf100_devinit_new, .fb = gf100_fb_new, @@ -1560,7 +1560,7 @@ nvcf_chipset = { .name = "GF116", .bar = { 0x00000001, gf100_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .clk = gf100_clk_new, .devinit = gf100_devinit_new, .fb = gf100_fb_new, @@ -1596,7 +1596,7 @@ nvd7_chipset = { .name = "GF117", .bar = { 0x00000001, gf100_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .clk = gf100_clk_new, .devinit = gf100_devinit_new, .fb = gf100_fb_new, @@ -1631,7 +1631,7 @@ nvd9_chipset = { .name = "GF119", .bar = { 0x00000001, gf100_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .clk = gf100_clk_new, .devinit = gf100_devinit_new, .fb = gf100_fb_new, @@ -1667,7 +1667,7 @@ nve4_chipset = { .name = "GK104", .bar = { 0x00000001, gf100_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .clk = gk104_clk_new, .devinit = gf100_devinit_new, .fb = gk104_fb_new, @@ -1706,7 +1706,7 @@ nve6_chipset = { .name = "GK106", .bar = { 0x00000001, gf100_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .clk = gk104_clk_new, .devinit = gf100_devinit_new, .fb = gk104_fb_new, @@ -1745,7 +1745,7 @@ nve7_chipset = { .name = "GK107", .bar = { 0x00000001, gf100_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .clk = gk104_clk_new, .devinit = gf100_devinit_new, .fb = gk104_fb_new, @@ -1783,7 +1783,7 @@ static const struct nvkm_device_chip nvea_chipset = { .name = "GK20A", .bar = { 0x00000001, gk20a_bar_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .clk = gk20a_clk_new, .fb = gk20a_fb_new, .fuse = gf100_fuse_new, @@ -1809,7 +1809,7 @@ nvf0_chipset = { .name = "GK110", .bar = { 0x00000001, gf100_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .clk = gk104_clk_new, .devinit = gf100_devinit_new, .fb = gk110_fb_new, @@ -1847,7 +1847,7 @@ nvf1_chipset = { .name = "GK110B", .bar = { 0x00000001, gf100_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .clk = gk104_clk_new, .devinit = gf100_devinit_new, .fb = gk110_fb_new, @@ -1885,7 +1885,7 @@ nv106_chipset = { .name = "GK208B", .bar = { 0x00000001, gf100_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .clk = gk104_clk_new, .devinit = gf100_devinit_new, .fb = gk110_fb_new, @@ -1923,7 +1923,7 @@ nv108_chipset = { .name = "GK208", .bar = { 0x00000001, gf100_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .clk = gk104_clk_new, .devinit = gf100_devinit_new, .fb = gk110_fb_new, @@ -1961,7 +1961,7 @@ nv117_chipset = { .name = "GM107", .bar = { 0x00000001, gm107_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .clk = gk104_clk_new, .devinit = gm107_devinit_new, .fb = gm107_fb_new, @@ -1997,7 +1997,7 @@ nv118_chipset = { .name = "GM108", .bar = { 0x00000001, gm107_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .clk = gk104_clk_new, .devinit = gm107_devinit_new, .fb = gm107_fb_new, @@ -2032,7 +2032,7 @@ nv120_chipset = { .acr = { 0x00000001, gm200_acr_new }, .bar = { 0x00000001, gm107_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .devinit = gm200_devinit_new, .fb = gm200_fb_new, .fuse = gm107_fuse_new, @@ -2070,7 +2070,7 @@ nv124_chipset = { .acr = { 0x00000001, gm200_acr_new }, .bar = { 0x00000001, gm107_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .devinit = gm200_devinit_new, .fb = gm200_fb_new, .fuse = gm107_fuse_new, @@ -2108,7 +2108,7 @@ nv126_chipset = { .acr = { 0x00000001, gm200_acr_new }, .bar = { 0x00000001, gm107_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .devinit = gm200_devinit_new, .fb = gm200_fb_new, .fuse = gm107_fuse_new, @@ -2144,7 +2144,7 @@ nv12b_chipset = { .name = "GM20B", .acr = { 0x00000001, gm20b_acr_new }, .bar = { 0x00000001, gm20b_bar_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .clk = gm20b_clk_new, .fb = gm20b_fb_new, .fuse = gm107_fuse_new, @@ -2170,7 +2170,7 @@ nv130_chipset = { .acr = { 0x00000001, gm200_acr_new }, .bar = { 0x00000001, gm107_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .devinit = gm200_devinit_new, .fault = gp100_fault_new, .fb = gp100_fb_new, @@ -2210,7 +2210,7 @@ nv132_chipset = { .acr = { 0x00000001, gp102_acr_new }, .bar = { 0x00000001, gm107_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .devinit = gm200_devinit_new, .fault = gp100_fault_new, .fb = gp102_fb_new, @@ -2248,7 +2248,7 @@ nv134_chipset = { .acr = { 0x00000001, gp102_acr_new }, .bar = { 0x00000001, gm107_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .devinit = gm200_devinit_new, .fault = gp100_fault_new, .fb = gp102_fb_new, @@ -2286,7 +2286,7 @@ nv136_chipset = { .acr = { 0x00000001, gp102_acr_new }, .bar = { 0x00000001, gm107_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .devinit = gm200_devinit_new, .fault = gp100_fault_new, .fb = gp102_fb_new, @@ -2323,7 +2323,7 @@ nv137_chipset = { .acr = { 0x00000001, gp102_acr_new }, .bar = { 0x00000001, gm107_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .devinit = gm200_devinit_new, .fault = gp100_fault_new, .fb = gp102_fb_new, @@ -2361,7 +2361,7 @@ nv138_chipset = { .acr = { 0x00000001, gp108_acr_new }, .bar = { 0x00000001, gm107_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .devinit = gm200_devinit_new, .fault = gp100_fault_new, .fb = gp102_fb_new, @@ -2396,7 +2396,7 @@ nv13b_chipset = { .name = "GP10B", .acr = { 0x00000001, gp10b_acr_new }, .bar = { 0x00000001, gm20b_bar_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .fault = gp10b_fault_new, .fb = gp10b_fb_new, .fuse = gm107_fuse_new, @@ -2421,7 +2421,7 @@ nv140_chipset = { .acr = { 0x00000001, gp108_acr_new }, .bar = { 0x00000001, gm107_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .devinit = gv100_devinit_new, .fault = gv100_fault_new, .fb = gv100_fb_new, @@ -2465,7 +2465,7 @@ nv162_chipset = { .acr = { 0x00000001, tu102_acr_new }, .bar = { 0x00000001, tu102_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .devinit = tu102_devinit_new, .fault = tu102_fault_new, .fb = gv100_fb_new, @@ -2503,7 +2503,7 @@ nv164_chipset = { .acr = { 0x00000001, tu102_acr_new }, .bar = { 0x00000001, tu102_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .devinit = tu102_devinit_new, .fault = tu102_fault_new, .fb = gv100_fb_new, @@ -2542,7 +2542,7 @@ nv166_chipset = { .acr = { 0x00000001, tu102_acr_new }, .bar = { 0x00000001, tu102_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .devinit = tu102_devinit_new, .fault = tu102_fault_new, .fb = gv100_fb_new, @@ -2582,7 +2582,7 @@ nv167_chipset = { .acr = { 0x00000001, tu102_acr_new }, .bar = { 0x00000001, tu102_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .devinit = tu102_devinit_new, .fault = tu102_fault_new, .fb = gv100_fb_new, @@ -2620,7 +2620,7 @@ nv168_chipset = { .acr = { 0x00000001, tu102_acr_new }, .bar = { 0x00000001, tu102_bar_new }, .bios = { 0x00000001, nvkm_bios_new }, - .bus = gf100_bus_new, + .bus = { 0x00000001, gf100_bus_new }, .devinit = tu102_devinit_new, .fault = tu102_fault_new, .fb = gv100_fb_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_BUS , bus); _(NVKM_SUBDEV_CLK , clk); _(NVKM_SUBDEV_DEVINIT , devinit); _(NVKM_SUBDEV_FAULT , fault); diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/base.c index 52ad73bce5fe..0e5a46db52ea 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/base.c @@ -53,12 +53,12 @@ nvkm_bus = { int nvkm_bus_new_(const struct nvkm_bus_func *func, struct nvkm_device *device, - int index, struct nvkm_bus **pbus) + enum nvkm_subdev_type type, int inst, struct nvkm_bus **pbus) { struct nvkm_bus *bus; if (!(bus = *pbus = kzalloc(sizeof(*bus), GFP_KERNEL))) return -ENOMEM; - nvkm_subdev_ctor(&nvkm_bus, device, index, &bus->subdev); + nvkm_subdev_ctor(&nvkm_bus, device, type, inst, &bus->subdev); bus->func = func; return 0; } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/g94.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/g94.c index 9700b5c01cc6..a0d6e2d3f804 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/g94.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/g94.c @@ -58,7 +58,8 @@ g94_bus = { }; int -g94_bus_new(struct nvkm_device *device, int index, struct nvkm_bus **pbus) +g94_bus_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, + struct nvkm_bus **pbus) { - return nvkm_bus_new_(&g94_bus, device, index, pbus); + return nvkm_bus_new_(&g94_bus, device, type, inst, pbus); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/gf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/gf100.c index e0930d5fdfb1..7f35bb87445d 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/gf100.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/gf100.c @@ -69,7 +69,8 @@ gf100_bus = { }; int -gf100_bus_new(struct nvkm_device *device, int index, struct nvkm_bus **pbus) +gf100_bus_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, + struct nvkm_bus **pbus) { - return nvkm_bus_new_(&gf100_bus, device, index, pbus); + return nvkm_bus_new_(&gf100_bus, device, type, inst, pbus); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv04.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv04.c index 2b44ba5cf4b0..cfed17c062ea 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv04.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv04.c @@ -68,7 +68,8 @@ nv04_bus = { }; int -nv04_bus_new(struct nvkm_device *device, int index, struct nvkm_bus **pbus) +nv04_bus_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, + struct nvkm_bus **pbus) { - return nvkm_bus_new_(&nv04_bus, device, index, pbus); + return nvkm_bus_new_(&nv04_bus, device, type, inst, pbus); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv31.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv31.c index 5153d89e1f0b..ad8da523bb22 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv31.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv31.c @@ -82,7 +82,8 @@ nv31_bus = { }; int -nv31_bus_new(struct nvkm_device *device, int index, struct nvkm_bus **pbus) +nv31_bus_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, + struct nvkm_bus **pbus) { - return nvkm_bus_new_(&nv31_bus, device, index, pbus); + return nvkm_bus_new_(&nv31_bus, device, type, inst, pbus); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv50.c index 19e10fdc9291..3a1e45adeedc 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv50.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv50.c @@ -99,7 +99,8 @@ nv50_bus = { }; int -nv50_bus_new(struct nvkm_device *device, int index, struct nvkm_bus **pbus) +nv50_bus_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, + struct nvkm_bus **pbus) { - return nvkm_bus_new_(&nv50_bus, device, index, pbus); + return nvkm_bus_new_(&nv50_bus, device, type, inst, pbus); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/priv.h b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/priv.h index 76f7ba1c6494..2e9345b17cf8 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/priv.h +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/priv.h @@ -11,7 +11,7 @@ struct nvkm_bus_func { u32 hwsq_size; }; -int nvkm_bus_new_(const struct nvkm_bus_func *, struct nvkm_device *, int, +int nvkm_bus_new_(const struct nvkm_bus_func *, struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_bus **); void nv50_bus_init(struct nvkm_bus *); |