drm/nouveau/disp/gm200-: allow non-identity mapping of SOR <-> macro links
authorBen Skeggs <bskeggs@redhat.com>
Fri, 19 May 2017 13:59:35 +0000 (23:59 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 16 Jun 2017 04:05:01 +0000 (14:05 +1000)
Finally, everything should be in place to handle this.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c

index ef201f1..85aff85 100644 (file)
@@ -137,7 +137,7 @@ nvkm_outp_acquire(struct nvkm_outp *outp, u8 user)
        /* Failing that, a completely unused OR is the next best thing. */
        list_for_each_entry(ior, &outp->disp->ior, head) {
                if (!ior->asy.outp && ior->type == type && !ior->arm.outp &&
-                   ior->id == __ffs(outp->info.or))
+                   (ior->func->route.set || ior->id == __ffs(outp->info.or)))
                        return nvkm_outp_acquire_ior(outp, user, ior);
        }
 
@@ -146,7 +146,7 @@ nvkm_outp_acquire(struct nvkm_outp *outp, u8 user)
         */
        list_for_each_entry(ior, &outp->disp->ior, head) {
                if (!ior->asy.outp && ior->type == type &&
-                   ior->id == __ffs(outp->info.or))
+                   (ior->func->route.set || ior->id == __ffs(outp->info.or)))
                        return nvkm_outp_acquire_ior(outp, user, ior);
        }