summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2015-08-04 21:58:12 (GMT)
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 02:40:03 (GMT)
commit7fe882eb90844f79acd9cdd3ccd5d3459c27cf3f (patch)
treef88c2b675964afc08de5c04f299f4d1697a7fb06
parent5a23936129b87833e3f3e90a610c65f73c7bbeaa (diff)
downloadlinux-7fe882eb90844f79acd9cdd3ccd5d3459c27cf3f.tar.xz
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 <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c4
1 files 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 94991d6..48c1ce6 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);