diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-12-04 03:24:17 +0100 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2021-02-11 02:49:53 +0100 |
commit | 0afc1c4caa001e71615fbc6a53f05119ea502fc8 (patch) | |
tree | b94236d59dcf80ab049b53a971923e72440808c1 | |
parent | drm/nouveau/instmem: switch to instanced constructor (diff) | |
download | linux-0afc1c4caa001e71615fbc6a53f05119ea502fc8.tar.xz linux-0afc1c4caa001e71615fbc6a53f05119ea502fc8.zip |
drm/nouveau/ltc: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
-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/ltc.h | 15 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/core/subdev.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 73 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gf100.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gk104.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm107.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm200.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp100.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp102.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp10b.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/ltc/priv.h | 4 |
14 files changed, 69 insertions, 66 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h index 54a224634c85..8c11f4e19750 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_ltc *ltc; struct nvkm_mc *mc; struct nvkm_mmu *mmu; struct nvkm_subdev *mxm; @@ -133,7 +132,6 @@ struct nvkm_device_chip { #include <core/layout.h> #undef NVKM_LAYOUT_INST #undef NVKM_LAYOUT_ONCE - int (*ltc )(struct nvkm_device *, int idx, struct nvkm_ltc **); int (*mc )(struct nvkm_device *, int idx, struct nvkm_mc **); int (*mmu )(struct nvkm_device *, int idx, struct nvkm_mmu **); int (*mxm )(struct nvkm_device *, int idx, struct nvkm_subdev **); diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h b/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h index 798e5a0fbbc9..d2f30c080e7e 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h @@ -8,6 +8,7 @@ NVKM_LAYOUT_ONCE(NVKM_SUBDEV_FUSE , struct nvkm_fuse , fuse) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_BUS , struct nvkm_bus , bus) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_INSTMEM , struct nvkm_instmem , imem) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_FB , struct nvkm_fb , fb) +NVKM_LAYOUT_ONCE(NVKM_SUBDEV_LTC , struct nvkm_ltc , ltc) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_BAR , struct nvkm_bar , bar) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_FAULT , struct nvkm_fault , fault) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_ACR , struct nvkm_acr , acr) diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h index 18fc5eac3a1a..d32a326a9290 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h @@ -34,12 +34,11 @@ int nvkm_ltc_zbc_stencil_get(struct nvkm_ltc *, int index, const u32); void nvkm_ltc_invalidate(struct nvkm_ltc *); void nvkm_ltc_flush(struct nvkm_ltc *); -int gf100_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); -int gk104_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); -int gk20a_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); -int gm107_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); -int gm200_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); -int gp100_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); -int gp102_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); -int gp10b_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); +int gf100_ltc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_ltc **); +int gk104_ltc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_ltc **); +int gm107_ltc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_ltc **); +int gm200_ltc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_ltc **); +int gp100_ltc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_ltc **); +int gp102_ltc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_ltc **); +int gp10b_ltc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_ltc **); #endif diff --git a/drivers/gpu/drm/nouveau/nvkm/core/subdev.c b/drivers/gpu/drm/nouveau/nvkm/core/subdev.c index c984fc6a2341..ac78135c34b0 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_LTC ] = "ltc", [NVKM_SUBDEV_MC ] = "mc", [NVKM_SUBDEV_MMU ] = "mmu", [NVKM_SUBDEV_MXM ] = "mxm", diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c index 24f949a419c5..766d4be1103e 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c @@ -1350,7 +1350,7 @@ nvc0_chipset = { .ibus = { 0x00000001, gf100_ibus_new }, .iccsense = { 0x00000001, gf100_iccsense_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gf100_ltc_new, + .ltc = { 0x00000001, gf100_ltc_new }, .mc = gf100_mc_new, .mmu = gf100_mmu_new, .mxm = nv50_mxm_new, @@ -1387,7 +1387,7 @@ nvc1_chipset = { .ibus = { 0x00000001, gf100_ibus_new }, .iccsense = { 0x00000001, gf100_iccsense_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gf100_ltc_new, + .ltc = { 0x00000001, gf100_ltc_new }, .mc = gf100_mc_new, .mmu = gf100_mmu_new, .mxm = nv50_mxm_new, @@ -1423,7 +1423,7 @@ nvc3_chipset = { .ibus = { 0x00000001, gf100_ibus_new }, .iccsense = { 0x00000001, gf100_iccsense_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gf100_ltc_new, + .ltc = { 0x00000001, gf100_ltc_new }, .mc = gf100_mc_new, .mmu = gf100_mmu_new, .mxm = nv50_mxm_new, @@ -1459,7 +1459,7 @@ nvc4_chipset = { .ibus = { 0x00000001, gf100_ibus_new }, .iccsense = { 0x00000001, gf100_iccsense_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gf100_ltc_new, + .ltc = { 0x00000001, gf100_ltc_new }, .mc = gf100_mc_new, .mmu = gf100_mmu_new, .mxm = nv50_mxm_new, @@ -1496,7 +1496,7 @@ nvc8_chipset = { .ibus = { 0x00000001, gf100_ibus_new }, .iccsense = { 0x00000001, gf100_iccsense_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gf100_ltc_new, + .ltc = { 0x00000001, gf100_ltc_new }, .mc = gf100_mc_new, .mmu = gf100_mmu_new, .mxm = nv50_mxm_new, @@ -1533,7 +1533,7 @@ nvce_chipset = { .ibus = { 0x00000001, gf100_ibus_new }, .iccsense = { 0x00000001, gf100_iccsense_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gf100_ltc_new, + .ltc = { 0x00000001, gf100_ltc_new }, .mc = gf100_mc_new, .mmu = gf100_mmu_new, .mxm = nv50_mxm_new, @@ -1570,7 +1570,7 @@ nvcf_chipset = { .ibus = { 0x00000001, gf100_ibus_new }, .iccsense = { 0x00000001, gf100_iccsense_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gf100_ltc_new, + .ltc = { 0x00000001, gf100_ltc_new }, .mc = gf100_mc_new, .mmu = gf100_mmu_new, .mxm = nv50_mxm_new, @@ -1606,7 +1606,7 @@ nvd7_chipset = { .ibus = { 0x00000001, gf117_ibus_new }, .iccsense = { 0x00000001, gf100_iccsense_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gf100_ltc_new, + .ltc = { 0x00000001, gf100_ltc_new }, .mc = gf100_mc_new, .mmu = gf100_mmu_new, .mxm = nv50_mxm_new, @@ -1641,7 +1641,7 @@ nvd9_chipset = { .ibus = { 0x00000001, gf117_ibus_new }, .iccsense = { 0x00000001, gf100_iccsense_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gf100_ltc_new, + .ltc = { 0x00000001, gf100_ltc_new }, .mc = gf100_mc_new, .mmu = gf100_mmu_new, .mxm = nv50_mxm_new, @@ -1677,7 +1677,7 @@ nve4_chipset = { .ibus = { 0x00000001, gk104_ibus_new }, .iccsense = { 0x00000001, gf100_iccsense_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gk104_ltc_new, + .ltc = { 0x00000001, gk104_ltc_new }, .mc = gk104_mc_new, .mmu = gk104_mmu_new, .mxm = nv50_mxm_new, @@ -1716,7 +1716,7 @@ nve6_chipset = { .ibus = { 0x00000001, gk104_ibus_new }, .iccsense = { 0x00000001, gf100_iccsense_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gk104_ltc_new, + .ltc = { 0x00000001, gk104_ltc_new }, .mc = gk104_mc_new, .mmu = gk104_mmu_new, .mxm = nv50_mxm_new, @@ -1755,7 +1755,7 @@ nve7_chipset = { .ibus = { 0x00000001, gk104_ibus_new }, .iccsense = { 0x00000001, gf100_iccsense_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gk104_ltc_new, + .ltc = { 0x00000001, gk104_ltc_new }, .mc = gk104_mc_new, .mmu = gk104_mmu_new, .mxm = nv50_mxm_new, @@ -1789,7 +1789,7 @@ nvea_chipset = { .fuse = { 0x00000001, gf100_fuse_new }, .ibus = { 0x00000001, gk20a_ibus_new }, .imem = { 0x00000001, gk20a_instmem_new }, - .ltc = gk104_ltc_new, + .ltc = { 0x00000001, gk104_ltc_new }, .mc = gk20a_mc_new, .mmu = gk20a_mmu_new, .pmu = gk20a_pmu_new, @@ -1819,7 +1819,7 @@ nvf0_chipset = { .ibus = { 0x00000001, gk104_ibus_new }, .iccsense = { 0x00000001, gf100_iccsense_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gk104_ltc_new, + .ltc = { 0x00000001, gk104_ltc_new }, .mc = gk104_mc_new, .mmu = gk104_mmu_new, .mxm = nv50_mxm_new, @@ -1857,7 +1857,7 @@ nvf1_chipset = { .ibus = { 0x00000001, gk104_ibus_new }, .iccsense = { 0x00000001, gf100_iccsense_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gk104_ltc_new, + .ltc = { 0x00000001, gk104_ltc_new }, .mc = gk104_mc_new, .mmu = gk104_mmu_new, .mxm = nv50_mxm_new, @@ -1895,7 +1895,7 @@ nv106_chipset = { .ibus = { 0x00000001, gk104_ibus_new }, .iccsense = { 0x00000001, gf100_iccsense_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gk104_ltc_new, + .ltc = { 0x00000001, gk104_ltc_new }, .mc = gk20a_mc_new, .mmu = gk104_mmu_new, .mxm = nv50_mxm_new, @@ -1933,7 +1933,7 @@ nv108_chipset = { .ibus = { 0x00000001, gk104_ibus_new }, .iccsense = { 0x00000001, gf100_iccsense_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gk104_ltc_new, + .ltc = { 0x00000001, gk104_ltc_new }, .mc = gk20a_mc_new, .mmu = gk104_mmu_new, .mxm = nv50_mxm_new, @@ -1971,7 +1971,7 @@ nv117_chipset = { .ibus = { 0x00000001, gk104_ibus_new }, .iccsense = { 0x00000001, gf100_iccsense_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gm107_ltc_new, + .ltc = { 0x00000001, gm107_ltc_new }, .mc = gk20a_mc_new, .mmu = gk104_mmu_new, .mxm = nv50_mxm_new, @@ -2007,7 +2007,7 @@ nv118_chipset = { .ibus = { 0x00000001, gk104_ibus_new }, .iccsense = { 0x00000001, gf100_iccsense_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gm107_ltc_new, + .ltc = { 0x00000001, gm107_ltc_new }, .mc = gk20a_mc_new, .mmu = gk104_mmu_new, .mxm = nv50_mxm_new, @@ -2041,7 +2041,7 @@ nv120_chipset = { .ibus = { 0x00000001, gm200_ibus_new }, .iccsense = { 0x00000001, gf100_iccsense_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gm200_ltc_new, + .ltc = { 0x00000001, gm200_ltc_new }, .mc = gk20a_mc_new, .mmu = gm200_mmu_new, .mxm = nv50_mxm_new, @@ -2079,7 +2079,7 @@ nv124_chipset = { .ibus = { 0x00000001, gm200_ibus_new }, .iccsense = { 0x00000001, gf100_iccsense_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gm200_ltc_new, + .ltc = { 0x00000001, gm200_ltc_new }, .mc = gk20a_mc_new, .mmu = gm200_mmu_new, .mxm = nv50_mxm_new, @@ -2117,7 +2117,7 @@ nv126_chipset = { .ibus = { 0x00000001, gm200_ibus_new }, .iccsense = { 0x00000001, gf100_iccsense_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gm200_ltc_new, + .ltc = { 0x00000001, gm200_ltc_new }, .mc = gk20a_mc_new, .mmu = gm200_mmu_new, .mxm = nv50_mxm_new, @@ -2150,7 +2150,7 @@ nv12b_chipset = { .fuse = { 0x00000001, gm107_fuse_new }, .ibus = { 0x00000001, gk20a_ibus_new }, .imem = { 0x00000001, gk20a_instmem_new }, - .ltc = gm200_ltc_new, + .ltc = { 0x00000001, gm200_ltc_new }, .mc = gk20a_mc_new, .mmu = gm20b_mmu_new, .pmu = gm20b_pmu_new, @@ -2179,7 +2179,7 @@ nv130_chipset = { .i2c = { 0x00000001, gm200_i2c_new }, .ibus = { 0x00000001, gm200_ibus_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gp100_ltc_new, + .ltc = { 0x00000001, gp100_ltc_new }, .mc = gp100_mc_new, .mmu = gp100_mmu_new, .therm = gp100_therm_new, @@ -2219,7 +2219,7 @@ nv132_chipset = { .i2c = { 0x00000001, gm200_i2c_new }, .ibus = { 0x00000001, gm200_ibus_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gp102_ltc_new, + .ltc = { 0x00000001, gp102_ltc_new }, .mc = gp100_mc_new, .mmu = gp100_mmu_new, .therm = gp100_therm_new, @@ -2257,7 +2257,7 @@ nv134_chipset = { .i2c = { 0x00000001, gm200_i2c_new }, .ibus = { 0x00000001, gm200_ibus_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gp102_ltc_new, + .ltc = { 0x00000001, gp102_ltc_new }, .mc = gp100_mc_new, .mmu = gp100_mmu_new, .therm = gp100_therm_new, @@ -2295,7 +2295,7 @@ nv136_chipset = { .i2c = { 0x00000001, gm200_i2c_new }, .ibus = { 0x00000001, gm200_ibus_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gp102_ltc_new, + .ltc = { 0x00000001, gp102_ltc_new }, .mc = gp100_mc_new, .mmu = gp100_mmu_new, .therm = gp100_therm_new, @@ -2332,7 +2332,7 @@ nv137_chipset = { .i2c = { 0x00000001, gm200_i2c_new }, .ibus = { 0x00000001, gm200_ibus_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gp102_ltc_new, + .ltc = { 0x00000001, gp102_ltc_new }, .mc = gp100_mc_new, .mmu = gp100_mmu_new, .therm = gp100_therm_new, @@ -2370,7 +2370,7 @@ nv138_chipset = { .i2c = { 0x00000001, gm200_i2c_new }, .ibus = { 0x00000001, gm200_ibus_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gp102_ltc_new, + .ltc = { 0x00000001, gp102_ltc_new }, .mc = gp100_mc_new, .mmu = gp100_mmu_new, .therm = gp100_therm_new, @@ -2402,7 +2402,7 @@ nv13b_chipset = { .fuse = { 0x00000001, gm107_fuse_new }, .ibus = { 0x00000001, gp10b_ibus_new }, .imem = { 0x00000001, gk20a_instmem_new }, - .ltc = gp10b_ltc_new, + .ltc = { 0x00000001, gp10b_ltc_new }, .mc = gp10b_mc_new, .mmu = gp10b_mmu_new, .pmu = gp10b_pmu_new, @@ -2431,7 +2431,7 @@ nv140_chipset = { .i2c = { 0x00000001, gm200_i2c_new }, .ibus = { 0x00000001, gm200_ibus_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gp102_ltc_new, + .ltc = { 0x00000001, gp102_ltc_new }, .mc = gp100_mc_new, .mmu = gv100_mmu_new, .pci = gp100_pci_new, @@ -2475,7 +2475,7 @@ nv162_chipset = { .i2c = { 0x00000001, gm200_i2c_new }, .ibus = { 0x00000001, gm200_ibus_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gp102_ltc_new, + .ltc = { 0x00000001, gp102_ltc_new }, .mc = tu102_mc_new, .mmu = tu102_mmu_new, .pci = gp100_pci_new, @@ -2513,7 +2513,7 @@ nv164_chipset = { .i2c = { 0x00000001, gm200_i2c_new }, .ibus = { 0x00000001, gm200_ibus_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gp102_ltc_new, + .ltc = { 0x00000001, gp102_ltc_new }, .mc = tu102_mc_new, .mmu = tu102_mmu_new, .pci = gp100_pci_new, @@ -2552,7 +2552,7 @@ nv166_chipset = { .i2c = { 0x00000001, gm200_i2c_new }, .ibus = { 0x00000001, gm200_ibus_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gp102_ltc_new, + .ltc = { 0x00000001, gp102_ltc_new }, .mc = tu102_mc_new, .mmu = tu102_mmu_new, .pci = gp100_pci_new, @@ -2592,7 +2592,7 @@ nv167_chipset = { .i2c = { 0x00000001, gm200_i2c_new }, .ibus = { 0x00000001, gm200_ibus_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gp102_ltc_new, + .ltc = { 0x00000001, gp102_ltc_new }, .mc = tu102_mc_new, .mmu = tu102_mmu_new, .pci = gp100_pci_new, @@ -2630,7 +2630,7 @@ nv168_chipset = { .i2c = { 0x00000001, gm200_i2c_new }, .ibus = { 0x00000001, gm200_ibus_new }, .imem = { 0x00000001, nv50_instmem_new }, - .ltc = gp102_ltc_new, + .ltc = { 0x00000001, gp102_ltc_new }, .mc = tu102_mc_new, .mmu = tu102_mmu_new, .pci = gp100_pci_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_LTC , ltc); _(NVKM_SUBDEV_MC , mc); _(NVKM_SUBDEV_MMU , mmu); _(NVKM_SUBDEV_MXM , mxm); diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c index d54957f817bd..fa683c190795 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c @@ -127,14 +127,14 @@ nvkm_ltc = { int nvkm_ltc_new_(const struct nvkm_ltc_func *func, struct nvkm_device *device, - int index, struct nvkm_ltc **pltc) + enum nvkm_subdev_type type, int inst, struct nvkm_ltc **pltc) { struct nvkm_ltc *ltc; if (!(ltc = *pltc = kzalloc(sizeof(*ltc), GFP_KERNEL))) return -ENOMEM; - nvkm_subdev_ctor(&nvkm_ltc, device, index, <c->subdev); + nvkm_subdev_ctor(&nvkm_ltc, device, type, inst, <c->subdev); ltc->func = func; mutex_init(<c->mutex); ltc->zbc_min = 1; /* reserve 0 for disabled */ diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gf100.c index 1d453566fa3d..fd8aeafc812d 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gf100.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gf100.c @@ -249,7 +249,8 @@ gf100_ltc = { }; int -gf100_ltc_new(struct nvkm_device *device, int index, struct nvkm_ltc **pltc) +gf100_ltc_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, + struct nvkm_ltc **pltc) { - return nvkm_ltc_new_(&gf100_ltc, device, index, pltc); + return nvkm_ltc_new_(&gf100_ltc, device, type, inst, pltc); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gk104.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gk104.c index b4f6e0034d58..94aa09244d67 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gk104.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gk104.c @@ -50,7 +50,8 @@ gk104_ltc = { }; int -gk104_ltc_new(struct nvkm_device *device, int index, struct nvkm_ltc **pltc) +gk104_ltc_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, + struct nvkm_ltc **pltc) { - return nvkm_ltc_new_(&gk104_ltc, device, index, pltc); + return nvkm_ltc_new_(&gk104_ltc, device, type, inst, pltc); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm107.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm107.c index ec0a3844b2d1..54d1d65d5a85 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm107.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm107.c @@ -145,7 +145,8 @@ gm107_ltc = { }; int -gm107_ltc_new(struct nvkm_device *device, int index, struct nvkm_ltc **pltc) +gm107_ltc_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, + struct nvkm_ltc **pltc) { - return nvkm_ltc_new_(&gm107_ltc, device, index, pltc); + return nvkm_ltc_new_(&gm107_ltc, device, type, inst, pltc); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm200.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm200.c index e18e0dc19ec8..8cfdbbdd8e8d 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm200.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm200.c @@ -57,7 +57,8 @@ gm200_ltc = { }; int -gm200_ltc_new(struct nvkm_device *device, int index, struct nvkm_ltc **pltc) +gm200_ltc_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, + struct nvkm_ltc **pltc) { - return nvkm_ltc_new_(&gm200_ltc, device, index, pltc); + return nvkm_ltc_new_(&gm200_ltc, device, type, inst, pltc); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp100.c index e923ed76d37a..a4a6cd9b435a 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp100.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp100.c @@ -69,7 +69,8 @@ gp100_ltc = { }; int -gp100_ltc_new(struct nvkm_device *device, int index, struct nvkm_ltc **pltc) +gp100_ltc_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, + struct nvkm_ltc **pltc) { - return nvkm_ltc_new_(&gp100_ltc, device, index, pltc); + return nvkm_ltc_new_(&gp100_ltc, device, type, inst, pltc); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp102.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp102.c index 601747ada655..ff05d617e7f4 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp102.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp102.c @@ -45,7 +45,8 @@ gp102_ltc = { }; int -gp102_ltc_new(struct nvkm_device *device, int index, struct nvkm_ltc **pltc) +gp102_ltc_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, + struct nvkm_ltc **pltc) { - return nvkm_ltc_new_(&gp102_ltc, device, index, pltc); + return nvkm_ltc_new_(&gp102_ltc, device, type, inst, pltc); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp10b.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp10b.c index c0063c7caa50..dfebd796cb4b 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp10b.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp10b.c @@ -59,7 +59,8 @@ gp10b_ltc = { }; int -gp10b_ltc_new(struct nvkm_device *device, int index, struct nvkm_ltc **pltc) +gp10b_ltc_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, + struct nvkm_ltc **pltc) { - return nvkm_ltc_new_(&gp10b_ltc, device, index, pltc); + return nvkm_ltc_new_(&gp10b_ltc, device, type, inst, pltc); } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/priv.h b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/priv.h index eca5a711b1b8..2bebe139005d 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/priv.h +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/priv.h @@ -5,8 +5,8 @@ #include <subdev/ltc.h> #include <core/enum.h> -int nvkm_ltc_new_(const struct nvkm_ltc_func *, struct nvkm_device *, - int index, struct nvkm_ltc **); +int nvkm_ltc_new_(const struct nvkm_ltc_func *, struct nvkm_device *, enum nvkm_subdev_type, int, + struct nvkm_ltc **); struct nvkm_ltc_func { int (*oneinit)(struct nvkm_ltc *); |