From 7fe882eb90844f79acd9cdd3ccd5d3459c27cf3f Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 4 Aug 2015 23:58:12 +0200 Subject: [PATCH] drm/nouveau/pm: allow zeroed signals to enable sources Hardware signals index 0x00 are defined for some domains and they have to be allowed to enable sources like the others. Signed-off-by: Samuel Pitoiset Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c index 94991d63640c..48c1ce6e663c 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c @@ -134,7 +134,7 @@ nvkm_perfsrc_enable(struct nvkm_pm *ppm, struct nvkm_perfctr *ctr) u32 mask, value; int i, j; - for (i = 0; i < 4 && ctr->signal[i]; i++) { + for (i = 0; i < 4; i++) { for (j = 0; j < 8 && ctr->source[i][j]; j++) { sig = nvkm_perfsig_find(ppm, ctr->domain, ctr->signal[i], &dom); @@ -170,7 +170,7 @@ nvkm_perfsrc_disable(struct nvkm_pm *ppm, struct nvkm_perfctr *ctr) u32 mask; int i, j; - for (i = 0; i < 4 && ctr->signal[i]; i++) { + for (i = 0; i < 4; i++) { for (j = 0; j < 8 && ctr->source[i][j]; j++) { sig = nvkm_perfsig_find(ppm, ctr->domain, ctr->signal[i], &dom); -- 2.20.1