diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-12-04 05:58:05 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2021-02-11 04:49:55 +0300 |
commit | d07be5d788624a14607177dedbd563cda3363141 (patch) | |
tree | 0da71de3cbc57d80f60a9d5cf2a925a59c4086d2 /drivers/gpu/drm/nouveau/include/nvkm | |
parent | 601c2a06d2a6e1ec8549f57c13103ab88efe7a20 (diff) | |
download | linux-d07be5d788624a14607177dedbd563cda3363141.tar.xz |
drm/nouveau/volt: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/include/nvkm')
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/core/layout.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h | 12 |
3 files changed, 7 insertions, 9 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h index 032a38b0604f..9ffec226dcee 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h @@ -60,8 +60,6 @@ struct nvkm_device { struct notifier_block nb; } acpi; - struct nvkm_volt *volt; - struct nvkm_engine *bsp; struct nvkm_engine *ce[9]; struct nvkm_engine *cipher; @@ -124,7 +122,6 @@ struct nvkm_device_chip { #include <core/layout.h> #undef NVKM_LAYOUT_INST #undef NVKM_LAYOUT_ONCE - int (*volt )(struct nvkm_device *, int idx, struct nvkm_volt **); int (*bsp )(struct nvkm_device *, int idx, struct nvkm_engine **); int (*ce[9] )(struct nvkm_device *, int idx, struct nvkm_engine **); diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h b/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h index 4160716d7c60..39bc036d2c59 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h @@ -19,6 +19,7 @@ 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) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_PMU , struct nvkm_pmu , pmu) +NVKM_LAYOUT_ONCE(NVKM_SUBDEV_VOLT , struct nvkm_volt , volt) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_ICCSENSE, struct nvkm_iccsense, iccsense) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_THERM , struct nvkm_therm , therm) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_CLK , struct nvkm_clk , clk) diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h index 45053a280930..0be86d5f0158 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h @@ -36,10 +36,10 @@ int nvkm_volt_get(struct nvkm_volt *); int nvkm_volt_set_id(struct nvkm_volt *, u8 id, u8 min_id, u8 temp, int condition); -int nv40_volt_new(struct nvkm_device *, int, struct nvkm_volt **); -int gf100_volt_new(struct nvkm_device *, int, struct nvkm_volt **); -int gf117_volt_new(struct nvkm_device *, int, struct nvkm_volt **); -int gk104_volt_new(struct nvkm_device *, int, struct nvkm_volt **); -int gk20a_volt_new(struct nvkm_device *, int, struct nvkm_volt **); -int gm20b_volt_new(struct nvkm_device *, int, struct nvkm_volt **); +int nv40_volt_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_volt **); +int gf100_volt_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_volt **); +int gf117_volt_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_volt **); +int gk104_volt_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_volt **); +int gk20a_volt_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_volt **); +int gm20b_volt_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_volt **); #endif |