drm/nouveau/ltc: switch to instanced constructor

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
This commit is contained in:
Ben Skeggs 2020-12-04 12:24:17 +10:00
parent d9691a2245
commit 0afc1c4caa
14 changed files with 69 additions and 66 deletions

View File

@ -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 **);

View File

@ -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)

View File

@ -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

View File

@ -33,7 +33,6 @@ nvkm_subdev_type[NVKM_SUBDEV_NR] = {
#include <core/layout.h>
#undef NVKM_LAYOUT_ONCE
#undef NVKM_LAYOUT_INST
[NVKM_SUBDEV_LTC ] = "ltc",
[NVKM_SUBDEV_MC ] = "mc",
[NVKM_SUBDEV_MMU ] = "mmu",
[NVKM_SUBDEV_MXM ] = "mxm",

View File

@ -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);

View File

@ -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, &ltc->subdev);
nvkm_subdev_ctor(&nvkm_ltc, device, type, inst, &ltc->subdev);
ltc->func = func;
mutex_init(&ltc->mutex);
ltc->zbc_min = 1; /* reserve 0 for disabled */

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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 *);