drm/nv50: fix dp_set_tmds to work on the right OR
authorBen Skeggs <bskeggs@redhat.com>
Thu, 8 Jul 2010 22:40:49 +0000 (08:40 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 13 Jul 2010 00:13:51 +0000 (10:13 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nv50_display.c

index 6a293c818b61dcf4683fbcecb550b90865a003fe..ec1ccf680ddf09d44c8238071d1051ed2097e710 100644 (file)
@@ -809,7 +809,8 @@ nv50_display_unk20_dp_set_tmds(struct drm_device *dev, struct dcb_entry *dcb)
        list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
                struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
 
-               if (nv_encoder->dcb->type == OUTPUT_DP) {
+               if (nv_encoder->dcb->type == OUTPUT_DP &&
+                   nv_encoder->dcb->or & (1 << or)) {
                        tmp  = nv_rd32(dev, NV50_SOR_DP_CTRL(or, link));
                        tmp &= ~NV50_SOR_DP_CTRL_ENABLED;
                        nv_wr32(dev, NV50_SOR_DP_CTRL(or, link), tmp);