summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/therm
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2021-02-04 14:28:06 +1000
committerBen Skeggs <bskeggs@redhat.com>2021-02-11 10:14:32 +1000
commitefe2a9eccd720d93d3ea6271bc5e2245344daadb (patch)
tree41a651549ae6e90f6ba04526b0d142d6b670e961 /drivers/gpu/drm/nouveau/nvkm/subdev/therm
parent65a279c1a9709edc00a5859737d0abd50c029ca0 (diff)
downloadlinux-efe2a9eccd720d93d3ea6271bc5e2245344daadb.tar.bz2
drm/nouveau/device: pass instance id when looking up a subdev/engine
This switches to using the subdev list for lookup, and otherwise should be a no-op aside from switching the function signatures. Callers will be transitioned to split type+inst individually. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/therm')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/therm/gk104.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gk104.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gk104.c
index 4e03971d2e3d..f6f7db2a3db7 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gk104.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gk104.c
@@ -36,7 +36,7 @@ gk104_clkgate_enable(struct nvkm_therm *base)
/* Program ENG_MANT, ENG_FILTER */
for (i = 0; order[i].engine != NVKM_SUBDEV_NR; i++) {
- if (!nvkm_device_subdev(dev, order[i].engine))
+ if (!nvkm_device_subdev(dev, order[i].engine, 0))
continue;
nvkm_mask(dev, 0x20200 + order[i].offset, 0xff00, 0x4500);
@@ -48,7 +48,7 @@ gk104_clkgate_enable(struct nvkm_therm *base)
/* Enable clockgating (ENG_CLK = RUN->AUTO) */
for (i = 0; order[i].engine != NVKM_SUBDEV_NR; i++) {
- if (!nvkm_device_subdev(dev, order[i].engine))
+ if (!nvkm_device_subdev(dev, order[i].engine, 0))
continue;
nvkm_mask(dev, 0x20200 + order[i].offset, 0x00ff, 0x0045);
@@ -65,7 +65,7 @@ gk104_clkgate_fini(struct nvkm_therm *base, bool suspend)
/* ENG_CLK = AUTO->RUN, ENG_PWR = RUN->AUTO */
for (i = 0; order[i].engine != NVKM_SUBDEV_NR; i++) {
- if (!nvkm_device_subdev(dev, order[i].engine))
+ if (!nvkm_device_subdev(dev, order[i].engine, 0))
continue;
nvkm_mask(dev, 0x20200 + order[i].offset, 0xff, 0x54);