drm/nouveau/pm: allow zeroed signals to enable sources
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 4 Aug 2015 21:58:12 +0000 (23:58 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 28 Aug 2015 02:40:03 +0000 (12:40 +1000)
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 <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c

index 94991d63640ce5882ac2660ad4ac0f144847642c..48c1ce6e663c07d14caa3f2139eaacc81e3aed83 100644 (file)
@@ -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);