Skip to content

Commit

Permalink
drm/nouveau/volt: switch to instanced constructor
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
  • Loading branch information
Ben Skeggs committed Feb 11, 2021
1 parent 601c2a0 commit d07be5d
Show file tree
Hide file tree
Showing 14 changed files with 91 additions and 90 deletions.
3 changes: 0 additions & 3 deletions drivers/gpu/drm/nouveau/include/nvkm/core/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 **);
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/nouveau/include/nvkm/core/layout.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion drivers/gpu/drm/nouveau/nvkm/core/subdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ nvkm_subdev_type[NVKM_SUBDEV_NR] = {
#include <core/layout.h>
#undef NVKM_LAYOUT_ONCE
#undef NVKM_LAYOUT_INST
[NVKM_SUBDEV_VOLT ] = "volt",
[NVKM_ENGINE_BSP ] = "bsp",
[NVKM_ENGINE_CE0 ] = "ce0",
[NVKM_ENGINE_CE1 ] = "ce1",
Expand Down
Loading

0 comments on commit d07be5d

Please sign in to comment.