summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/clk
diff options
context:
space:
mode:
authorKarol Herbst <karolherbst@gmail.com>2016-07-12 22:36:08 +0300
committerBen Skeggs <bskeggs@redhat.com>2016-10-12 10:29:22 +0300
commit761c8f69afdf34c100ccdde1df01163cda4f25e8 (patch)
tree3ef03a90768f62312950625775cf6c1a372be455 /drivers/gpu/drm/nouveau/nvkm/subdev/clk
parentfa6c4d8e2c614817c956a4ab59ab8bb24fb3653f (diff)
downloadlinux-761c8f69afdf34c100ccdde1df01163cda4f25e8.tar.xz
drm/nouveau/clk: Add index field to nvkm_cstate
It is better to read out the id out of the cstate struct directly instead of iterating over the list of cstates over and over again. Especially when we start saving pointers to a nvkm_cstate struct, it makes things easier. v5: Rename field to id. Signed-off-by: Karol Herbst <karolherbst@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/clk')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
index 9ee24ec2869b..23cc04c37c07 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
@@ -160,6 +160,7 @@ nvkm_cstate_new(struct nvkm_clk *clk, int idx, struct nvkm_pstate *pstate)
*cstate = pstate->base;
cstate->voltage = cstepX.voltage;
+ cstate->id = idx;
while (domain && domain->name != nv_clk_src_max) {
if (domain->flags & NVKM_CLK_DOM_FLAG_CORE) {