From efe2a9eccd720d93d3ea6271bc5e2245344daadb Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Thu, 4 Feb 2021 14:28:06 +1000 Subject: 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 Reviewed-by: Lyude Paul --- drivers/gpu/drm/nouveau/nvkm/subdev/therm/gk104.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/therm') 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); -- cgit v1.2.3