summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-12-04 12:05:51 +1000
committerBen Skeggs <bskeggs@redhat.com>2021-02-11 11:49:53 +1000
commitc5f38d67f953da319061f9878473e68b09d4c58a (patch)
tree6b0cddcfe1c89d33e08bb6a5c8692e2410eb7809 /drivers/gpu
parentc6ce0861fe71fe83e51b202ebd2b9f9de7e652a0 (diff)
drm/nouveau/ibus: 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.h2
-rw-r--r--drivers/gpu/drm/nouveau/include/nvkm/core/layout.h1
-rw-r--r--drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h4
-rw-r--r--drivers/gpu/drm/nouveau/include/nvkm/subdev/ibus.h12
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/core/subdev.c8
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/device/base.c79
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf117.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk20a.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gm200.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gp10b.c4
12 files changed, 63 insertions, 67 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h
index 2dc7134718b4..297b308ae65d 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_subdev *ibus;
struct nvkm_iccsense *iccsense;
struct nvkm_instmem *imem;
struct nvkm_ltc *ltc;
@@ -136,7 +135,6 @@ struct nvkm_device_chip {
#include <core/layout.h>
#undef NVKM_LAYOUT_INST
#undef NVKM_LAYOUT_ONCE
- int (*ibus )(struct nvkm_device *, int idx, struct nvkm_subdev **);
int (*iccsense)(struct nvkm_device *, int idx, struct nvkm_iccsense **);
int (*imem )(struct nvkm_device *, int idx, struct nvkm_instmem **);
int (*ltc )(struct nvkm_device *, int idx, struct nvkm_ltc **);
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h b/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h
index 61f8237e137d..ee5946e30dcb 100644
--- a/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h
+++ b/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h
@@ -1,6 +1,7 @@
/* 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_IBUS , struct nvkm_subdev , ibus)
NVKM_LAYOUT_ONCE(NVKM_SUBDEV_GPIO , struct nvkm_gpio , gpio)
NVKM_LAYOUT_ONCE(NVKM_SUBDEV_I2C , struct nvkm_i2c , i2c)
NVKM_LAYOUT_ONCE(NVKM_SUBDEV_FUSE , struct nvkm_fuse , fuse)
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h b/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h
index 8f41393467ce..efde81b9b046 100644
--- a/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h
+++ b/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h
@@ -104,8 +104,8 @@ struct nvkm_subdev_func {
};
extern const char *nvkm_subdev_type[NVKM_SUBDEV_NR];
-int nvkm_subdev_new_(const struct nvkm_subdev_func *, struct nvkm_device *,
- int index, struct nvkm_subdev **);
+int nvkm_subdev_new_(const struct nvkm_subdev_func *, struct nvkm_device *, enum nvkm_subdev_type,
+ int inst, struct nvkm_subdev **);
void nvkm_subdev_ctor_(const struct nvkm_subdev_func *, bool old, struct nvkm_device *,
enum nvkm_subdev_type, int inst, struct nvkm_subdev *);
#define nvkm_subdev_ctor_o(f,d,i, s) nvkm_subdev_ctor_((f), true, (d), (i), -1 , (s))
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/ibus.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/ibus.h
index db791411eaa8..f5da256315cf 100644
--- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/ibus.h
+++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/ibus.h
@@ -3,10 +3,10 @@
#define __NVKM_IBUS_H__
#include <core/subdev.h>
-int gf100_ibus_new(struct nvkm_device *, int, struct nvkm_subdev **);
-int gf117_ibus_new(struct nvkm_device *, int, struct nvkm_subdev **);
-int gk104_ibus_new(struct nvkm_device *, int, struct nvkm_subdev **);
-int gk20a_ibus_new(struct nvkm_device *, int, struct nvkm_subdev **);
-int gm200_ibus_new(struct nvkm_device *, int, struct nvkm_subdev **);
-int gp10b_ibus_new(struct nvkm_device *, int, struct nvkm_subdev **);
+int gf100_ibus_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_subdev **);
+int gf117_ibus_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_subdev **);
+int gk104_ibus_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_subdev **);
+int gk20a_ibus_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_subdev **);
+int gm200_ibus_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_subdev **);
+int gp10b_ibus_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_subdev **);
#endif
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/subdev.c b/drivers/gpu/drm/nouveau/nvkm/core/subdev.c
index cfd4ba06b112..a0c201a4748a 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_IBUS ] = "priv",
[NVKM_SUBDEV_ICCSENSE] = "iccsense",
[NVKM_SUBDEV_INSTMEM ] = "imem",
[NVKM_SUBDEV_LTC ] = "ltc",
@@ -253,12 +252,11 @@ nvkm_subdev_ctor_(const struct nvkm_subdev_func *func, bool old,
}
int
-nvkm_subdev_new_(const struct nvkm_subdev_func *func,
- struct nvkm_device *device, int index,
- struct nvkm_subdev **psubdev)
+nvkm_subdev_new_(const struct nvkm_subdev_func *func, struct nvkm_device *device,
+ enum nvkm_subdev_type type, int inst, struct nvkm_subdev **psubdev)
{
if (!(*psubdev = kzalloc(sizeof(**psubdev), GFP_KERNEL)))
return -ENOMEM;
- nvkm_subdev_ctor(func, device, index, *psubdev);
+ nvkm_subdev_ctor(func, device, type, inst, *psubdev);
return 0;
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
index 2de86304d7a3..c6990b84c273 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
@@ -1347,7 +1347,7 @@ nvc0_chipset = {
.fuse = { 0x00000001, gf100_fuse_new },
.gpio = { 0x00000001, g94_gpio_new },
.i2c = { 0x00000001, g94_i2c_new },
- .ibus = gf100_ibus_new,
+ .ibus = { 0x00000001, gf100_ibus_new },
.iccsense = gf100_iccsense_new,
.imem = nv50_instmem_new,
.ltc = gf100_ltc_new,
@@ -1384,7 +1384,7 @@ nvc1_chipset = {
.fuse = { 0x00000001, gf100_fuse_new },
.gpio = { 0x00000001, g94_gpio_new },
.i2c = { 0x00000001, g94_i2c_new },
- .ibus = gf100_ibus_new,
+ .ibus = { 0x00000001, gf100_ibus_new },
.iccsense = gf100_iccsense_new,
.imem = nv50_instmem_new,
.ltc = gf100_ltc_new,
@@ -1420,7 +1420,7 @@ nvc3_chipset = {
.fuse = { 0x00000001, gf100_fuse_new },
.gpio = { 0x00000001, g94_gpio_new },
.i2c = { 0x00000001, g94_i2c_new },
- .ibus = gf100_ibus_new,
+ .ibus = { 0x00000001, gf100_ibus_new },
.iccsense = gf100_iccsense_new,
.imem = nv50_instmem_new,
.ltc = gf100_ltc_new,
@@ -1456,7 +1456,7 @@ nvc4_chipset = {
.fuse = { 0x00000001, gf100_fuse_new },
.gpio = { 0x00000001, g94_gpio_new },
.i2c = { 0x00000001, g94_i2c_new },
- .ibus = gf100_ibus_new,
+ .ibus = { 0x00000001, gf100_ibus_new },
.iccsense = gf100_iccsense_new,
.imem = nv50_instmem_new,
.ltc = gf100_ltc_new,
@@ -1493,7 +1493,7 @@ nvc8_chipset = {
.fuse = { 0x00000001, gf100_fuse_new },
.gpio = { 0x00000001, g94_gpio_new },
.i2c = { 0x00000001, g94_i2c_new },
- .ibus = gf100_ibus_new,
+ .ibus = { 0x00000001, gf100_ibus_new },
.iccsense = gf100_iccsense_new,
.imem = nv50_instmem_new,
.ltc = gf100_ltc_new,
@@ -1530,7 +1530,7 @@ nvce_chipset = {
.fuse = { 0x00000001, gf100_fuse_new },
.gpio = { 0x00000001, g94_gpio_new },
.i2c = { 0x00000001, g94_i2c_new },
- .ibus = gf100_ibus_new,
+ .ibus = { 0x00000001, gf100_ibus_new },
.iccsense = gf100_iccsense_new,
.imem = nv50_instmem_new,
.ltc = gf100_ltc_new,
@@ -1567,7 +1567,7 @@ nvcf_chipset = {
.fuse = { 0x00000001, gf100_fuse_new },
.gpio = { 0x00000001, g94_gpio_new },
.i2c = { 0x00000001, g94_i2c_new },
- .ibus = gf100_ibus_new,
+ .ibus = { 0x00000001, gf100_ibus_new },
.iccsense = gf100_iccsense_new,
.imem = nv50_instmem_new,
.ltc = gf100_ltc_new,
@@ -1603,7 +1603,7 @@ nvd7_chipset = {
.fuse = { 0x00000001, gf100_fuse_new },
.gpio = { 0x00000001, gf119_gpio_new },
.i2c = { 0x00000001, gf117_i2c_new },
- .ibus = gf117_ibus_new,
+ .ibus = { 0x00000001, gf117_ibus_new },
.iccsense = gf100_iccsense_new,
.imem = nv50_instmem_new,
.ltc = gf100_ltc_new,
@@ -1638,7 +1638,7 @@ nvd9_chipset = {
.fuse = { 0x00000001, gf100_fuse_new },
.gpio = { 0x00000001, gf119_gpio_new },
.i2c = { 0x00000001, gf119_i2c_new },
- .ibus = gf117_ibus_new,
+ .ibus = { 0x00000001, gf117_ibus_new },
.iccsense = gf100_iccsense_new,
.imem = nv50_instmem_new,
.ltc = gf100_ltc_new,
@@ -1674,7 +1674,7 @@ nve4_chipset = {
.fuse = { 0x00000001, gf100_fuse_new },
.gpio = { 0x00000001, gk104_gpio_new },
.i2c = { 0x00000001, gk104_i2c_new },
- .ibus = gk104_ibus_new,
+ .ibus = { 0x00000001, gk104_ibus_new },
.iccsense = gf100_iccsense_new,
.imem = nv50_instmem_new,
.ltc = gk104_ltc_new,
@@ -1713,7 +1713,7 @@ nve6_chipset = {
.fuse = { 0x00000001, gf100_fuse_new },
.gpio = { 0x00000001, gk104_gpio_new },
.i2c = { 0x00000001, gk104_i2c_new },
- .ibus = gk104_ibus_new,
+ .ibus = { 0x00000001, gk104_ibus_new },
.iccsense = gf100_iccsense_new,
.imem = nv50_instmem_new,
.ltc = gk104_ltc_new,
@@ -1752,7 +1752,7 @@ nve7_chipset = {
.fuse = { 0x00000001, gf100_fuse_new },
.gpio = { 0x00000001, gk104_gpio_new },
.i2c = { 0x00000001, gk104_i2c_new },
- .ibus = gk104_ibus_new,
+ .ibus = { 0x00000001, gk104_ibus_new },
.iccsense = gf100_iccsense_new,
.imem = nv50_instmem_new,
.ltc = gk104_ltc_new,
@@ -1787,7 +1787,7 @@ nvea_chipset = {
.clk = { 0x00000001, gk20a_clk_new },
.fb = { 0x00000001, gk20a_fb_new },
.fuse = { 0x00000001, gf100_fuse_new },
- .ibus = gk20a_ibus_new,
+ .ibus = { 0x00000001, gk20a_ibus_new },
.imem = gk20a_instmem_new,
.ltc = gk104_ltc_new,
.mc = gk20a_mc_new,
@@ -1816,7 +1816,7 @@ nvf0_chipset = {
.fuse = { 0x00000001, gf100_fuse_new },
.gpio = { 0x00000001, gk104_gpio_new },
.i2c = { 0x00000001, gk110_i2c_new },
- .ibus = gk104_ibus_new,
+ .ibus = { 0x00000001, gk104_ibus_new },
.iccsense = gf100_iccsense_new,
.imem = nv50_instmem_new,
.ltc = gk104_ltc_new,
@@ -1854,7 +1854,7 @@ nvf1_chipset = {
.fuse = { 0x00000001, gf100_fuse_new },
.gpio = { 0x00000001, gk104_gpio_new },
.i2c = { 0x00000001, gk110_i2c_new },
- .ibus = gk104_ibus_new,
+ .ibus = { 0x00000001, gk104_ibus_new },
.iccsense = gf100_iccsense_new,
.imem = nv50_instmem_new,
.ltc = gk104_ltc_new,
@@ -1892,7 +1892,7 @@ nv106_chipset = {
.fuse = { 0x00000001, gf100_fuse_new },
.gpio = { 0x00000001, gk104_gpio_new },
.i2c = { 0x00000001, gk110_i2c_new },
- .ibus = gk104_ibus_new,
+ .ibus = { 0x00000001, gk104_ibus_new },
.iccsense = gf100_iccsense_new,
.imem = nv50_instmem_new,
.ltc = gk104_ltc_new,
@@ -1930,7 +1930,7 @@ nv108_chipset = {
.fuse = { 0x00000001, gf100_fuse_new },
.gpio = { 0x00000001, gk104_gpio_new },
.i2c = { 0x00000001, gk110_i2c_new },
- .ibus = gk104_ibus_new,
+ .ibus = { 0x00000001, gk104_ibus_new },
.iccsense = gf100_iccsense_new,
.imem = nv50_instmem_new,
.ltc = gk104_ltc_new,
@@ -1968,7 +1968,7 @@ nv117_chipset = {
.fuse = { 0x00000001, gm107_fuse_new },
.gpio = { 0x00000001, gk104_gpio_new },
.i2c = { 0x00000001, gk110_i2c_new },
- .ibus = gk104_ibus_new,
+ .ibus = { 0x00000001, gk104_ibus_new },
.iccsense = gf100_iccsense_new,
.imem = nv50_instmem_new,
.ltc = gm107_ltc_new,
@@ -2004,7 +2004,7 @@ nv118_chipset = {
.fuse = { 0x00000001, gm107_fuse_new },
.gpio = { 0x00000001, gk104_gpio_new },
.i2c = { 0x00000001, gk110_i2c_new },
- .ibus = gk104_ibus_new,
+ .ibus = { 0x00000001, gk104_ibus_new },
.iccsense = gf100_iccsense_new,
.imem = nv50_instmem_new,
.ltc = gm107_ltc_new,
@@ -2038,7 +2038,7 @@ nv120_chipset = {
.fuse = { 0x00000001, gm107_fuse_new },
.gpio = { 0x00000001, gk104_gpio_new },
.i2c = { 0x00000001, gm200_i2c_new },
- .ibus = gm200_ibus_new,
+ .ibus = { 0x00000001, gm200_ibus_new },
.iccsense = gf100_iccsense_new,
.imem = nv50_instmem_new,
.ltc = gm200_ltc_new,
@@ -2076,7 +2076,7 @@ nv124_chipset = {
.fuse = { 0x00000001, gm107_fuse_new },
.gpio = { 0x00000001, gk104_gpio_new },
.i2c = { 0x00000001, gm200_i2c_new },
- .ibus = gm200_ibus_new,
+ .ibus = { 0x00000001, gm200_ibus_new },
.iccsense = gf100_iccsense_new,
.imem = nv50_instmem_new,
.ltc = gm200_ltc_new,
@@ -2114,7 +2114,7 @@ nv126_chipset = {
.fuse = { 0x00000001, gm107_fuse_new },
.gpio = { 0x00000001, gk104_gpio_new },
.i2c = { 0x00000001, gm200_i2c_new },
- .ibus = gm200_ibus_new,
+ .ibus = { 0x00000001, gm200_ibus_new },
.iccsense = gf100_iccsense_new,
.imem = nv50_instmem_new,
.ltc = gm200_ltc_new,
@@ -2148,7 +2148,7 @@ nv12b_chipset = {
.clk = { 0x00000001, gm20b_clk_new },
.fb = { 0x00000001, gm20b_fb_new },
.fuse = { 0x00000001, gm107_fuse_new },
- .ibus = gk20a_ibus_new,
+ .ibus = { 0x00000001, gk20a_ibus_new },
.imem = gk20a_instmem_new,
.ltc = gm200_ltc_new,
.mc = gk20a_mc_new,
@@ -2177,7 +2177,7 @@ nv130_chipset = {
.fuse = { 0x00000001, gm107_fuse_new },
.gpio = { 0x00000001, gk104_gpio_new },
.i2c = { 0x00000001, gm200_i2c_new },
- .ibus = gm200_ibus_new,
+ .ibus = { 0x00000001, gm200_ibus_new },
.imem = nv50_instmem_new,
.ltc = gp100_ltc_new,
.mc = gp100_mc_new,
@@ -2217,7 +2217,7 @@ nv132_chipset = {
.fuse = { 0x00000001, gm107_fuse_new },
.gpio = { 0x00000001, gk104_gpio_new },
.i2c = { 0x00000001, gm200_i2c_new },
- .ibus = gm200_ibus_new,
+ .ibus = { 0x00000001, gm200_ibus_new },
.imem = nv50_instmem_new,
.ltc = gp102_ltc_new,
.mc = gp100_mc_new,
@@ -2255,7 +2255,7 @@ nv134_chipset = {
.fuse = { 0x00000001, gm107_fuse_new },
.gpio = { 0x00000001, gk104_gpio_new },
.i2c = { 0x00000001, gm200_i2c_new },
- .ibus = gm200_ibus_new,
+ .ibus = { 0x00000001, gm200_ibus_new },
.imem = nv50_instmem_new,
.ltc = gp102_ltc_new,
.mc = gp100_mc_new,
@@ -2293,7 +2293,7 @@ nv136_chipset = {
.fuse = { 0x00000001, gm107_fuse_new },
.gpio = { 0x00000001, gk104_gpio_new },
.i2c = { 0x00000001, gm200_i2c_new },
- .ibus = gm200_ibus_new,
+ .ibus = { 0x00000001, gm200_ibus_new },
.imem = nv50_instmem_new,
.ltc = gp102_ltc_new,
.mc = gp100_mc_new,
@@ -2330,7 +2330,7 @@ nv137_chipset = {
.fuse = { 0x00000001, gm107_fuse_new },
.gpio = { 0x00000001, gk104_gpio_new },
.i2c = { 0x00000001, gm200_i2c_new },
- .ibus = gm200_ibus_new,
+ .ibus = { 0x00000001, gm200_ibus_new },
.imem = nv50_instmem_new,
.ltc = gp102_ltc_new,
.mc = gp100_mc_new,
@@ -2368,7 +2368,7 @@ nv138_chipset = {
.fuse = { 0x00000001, gm107_fuse_new },
.gpio = { 0x00000001, gk104_gpio_new },
.i2c = { 0x00000001, gm200_i2c_new },
- .ibus = gm200_ibus_new,
+ .ibus = { 0x00000001, gm200_ibus_new },
.imem = nv50_instmem_new,
.ltc = gp102_ltc_new,
.mc = gp100_mc_new,
@@ -2400,7 +2400,7 @@ nv13b_chipset = {
.fault = { 0x00000001, gp10b_fault_new },
.fb = { 0x00000001, gp10b_fb_new },
.fuse = { 0x00000001, gm107_fuse_new },
- .ibus = gp10b_ibus_new,
+ .ibus = { 0x00000001, gp10b_ibus_new },
.imem = gk20a_instmem_new,
.ltc = gp10b_ltc_new,
.mc = gp10b_mc_new,
@@ -2429,7 +2429,7 @@ nv140_chipset = {
.gpio = { 0x00000001, gk104_gpio_new },
.gsp = { 0x00000001, gv100_gsp_new },
.i2c = { 0x00000001, gm200_i2c_new },
- .ibus = gm200_ibus_new,
+ .ibus = { 0x00000001, gm200_ibus_new },
.imem = nv50_instmem_new,
.ltc = gp102_ltc_new,
.mc = gp100_mc_new,
@@ -2473,7 +2473,7 @@ nv162_chipset = {
.gpio = { 0x00000001, gk104_gpio_new },
.gsp = { 0x00000001, gv100_gsp_new },
.i2c = { 0x00000001, gm200_i2c_new },
- .ibus = gm200_ibus_new,
+ .ibus = { 0x00000001, gm200_ibus_new },
.imem = nv50_instmem_new,
.ltc = gp102_ltc_new,
.mc = tu102_mc_new,
@@ -2511,7 +2511,7 @@ nv164_chipset = {
.gpio = { 0x00000001, gk104_gpio_new },
.gsp = { 0x00000001, gv100_gsp_new },
.i2c = { 0x00000001, gm200_i2c_new },
- .ibus = gm200_ibus_new,
+ .ibus = { 0x00000001, gm200_ibus_new },
.imem = nv50_instmem_new,
.ltc = gp102_ltc_new,
.mc = tu102_mc_new,
@@ -2550,7 +2550,7 @@ nv166_chipset = {
.gpio = { 0x00000001, gk104_gpio_new },
.gsp = { 0x00000001, gv100_gsp_new },
.i2c = { 0x00000001, gm200_i2c_new },
- .ibus = gm200_ibus_new,
+ .ibus = { 0x00000001, gm200_ibus_new },
.imem = nv50_instmem_new,
.ltc = gp102_ltc_new,
.mc = tu102_mc_new,
@@ -2590,7 +2590,7 @@ nv167_chipset = {
.gpio = { 0x00000001, gk104_gpio_new },
.gsp = { 0x00000001, gv100_gsp_new },
.i2c = { 0x00000001, gm200_i2c_new },
- .ibus = gm200_ibus_new,
+ .ibus = { 0x00000001, gm200_ibus_new },
.imem = nv50_instmem_new,
.ltc = gp102_ltc_new,
.mc = tu102_mc_new,
@@ -2628,7 +2628,7 @@ nv168_chipset = {
.gpio = { 0x00000001, gk104_gpio_new },
.gsp = { 0x00000001, gv100_gsp_new },
.i2c = { 0x00000001, gm200_i2c_new },
- .ibus = gm200_ibus_new,
+ .ibus = { 0x00000001, gm200_ibus_new },
.imem = nv50_instmem_new,
.ltc = gp102_ltc_new,
.mc = tu102_mc_new,
@@ -2661,7 +2661,7 @@ nv170_chipset = {
.fb = { 0x00000001, ga100_fb_new },
.gpio = { 0x00000001, gk104_gpio_new },
.i2c = { 0x00000001, gm200_i2c_new },
- .ibus = gm200_ibus_new,
+ .ibus = { 0x00000001, gm200_ibus_new },
.imem = nv50_instmem_new,
.mc = ga100_mc_new,
.mmu = tu102_mmu_new,
@@ -2678,7 +2678,7 @@ nv172_chipset = {
.fb = { 0x00000001, ga102_fb_new },
.gpio = { 0x00000001, ga102_gpio_new },
.i2c = { 0x00000001, gm200_i2c_new },
- .ibus = gm200_ibus_new,
+ .ibus = { 0x00000001, gm200_ibus_new },
.imem = nv50_instmem_new,
.mc = ga100_mc_new,
.mmu = tu102_mmu_new,
@@ -2697,7 +2697,7 @@ nv174_chipset = {
.fb = { 0x00000001, ga102_fb_new },
.gpio = { 0x00000001, ga102_gpio_new },
.i2c = { 0x00000001, gm200_i2c_new },
- .ibus = gm200_ibus_new,
+ .ibus = { 0x00000001, gm200_ibus_new },
.imem = nv50_instmem_new,
.mc = ga100_mc_new,
.mmu = tu102_mmu_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_IBUS , ibus);
_(NVKM_SUBDEV_ICCSENSE, iccsense);
_(NVKM_SUBDEV_INSTMEM , imem);
_(NVKM_SUBDEV_LTC , ltc);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c
index 1115376bc85f..1213f990323e 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c
@@ -115,8 +115,8 @@ gf100_ibus = {
};
int
-gf100_ibus_new(struct nvkm_device *device, int index,
+gf100_ibus_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_subdev **pibus)
{
- return nvkm_subdev_new_(&gf100_ibus, device, index, pibus);
+ return nvkm_subdev_new_(&gf100_ibus, device, type, inst, pibus);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf117.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf117.c
index 1124dadac145..e4e545f4d893 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf117.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf117.c
@@ -40,8 +40,8 @@ gf117_ibus = {
};
int
-gf117_ibus_new(struct nvkm_device *device, int index,
+gf117_ibus_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_subdev **pibus)
{
- return nvkm_subdev_new_(&gf117_ibus, device, index, pibus);
+ return nvkm_subdev_new_(&gf117_ibus, device, type, inst, pibus);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c
index 22e487b493ad..36cae20b3195 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c
@@ -118,8 +118,8 @@ gk104_ibus = {
};
int
-gk104_ibus_new(struct nvkm_device *device, int index,
+gk104_ibus_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_subdev **pibus)
{
- return nvkm_subdev_new_(&gk104_ibus, device, index, pibus);
+ return nvkm_subdev_new_(&gk104_ibus, device, type, inst, pibus);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk20a.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk20a.c
index 187d544378b0..ece073a1cc5a 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk20a.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk20a.c
@@ -78,8 +78,8 @@ gk20a_ibus = {
};
int
-gk20a_ibus_new(struct nvkm_device *device, int index,
+gk20a_ibus_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_subdev **pibus)
{
- return nvkm_subdev_new_(&gk20a_ibus, device, index, pibus);
+ return nvkm_subdev_new_(&gk20a_ibus, device, type, inst, pibus);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gm200.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gm200.c
index 0f1f0ad6377e..7973e603e031 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gm200.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gm200.c
@@ -29,8 +29,8 @@ gm200_ibus = {
};
int
-gm200_ibus_new(struct nvkm_device *device, int index,
+gm200_ibus_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_subdev **pibus)
{
- return nvkm_subdev_new_(&gm200_ibus, device, index, pibus);
+ return nvkm_subdev_new_(&gm200_ibus, device, type, inst, pibus);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gp10b.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gp10b.c
index 0347b367cefe..611341afc685 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gp10b.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gp10b.c
@@ -48,8 +48,8 @@ gp10b_ibus = {
};
int
-gp10b_ibus_new(struct nvkm_device *device, int index,
+gp10b_ibus_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_subdev **pibus)
{
- return nvkm_subdev_new_(&gp10b_ibus, device, index, pibus);
+ return nvkm_subdev_new_(&gp10b_ibus, device, type, inst, pibus);
}