aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-05-27 19:39:11 -0400
committerBen Skeggs <bskeggs@redhat.com>2010-05-28 02:06:42 -0400
commit23484874e6bf837704bf1fa61605d33a12b174e3 (patch)
treed66e15d7a699bf98d41b418826de954c52d5f748 /drivers
parent73db4bedc5dde97adf59b5b5a07c6cf0ee56e668 (diff)
drm/nv50: fix duallink_possible calculation for DCB 4.0 cards
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bios.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
index b3c7a87e47d9..9f30fb8eafe8 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bios.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
@@ -5536,12 +5536,6 @@ parse_dcb20_entry(struct drm_device *dev, struct dcb_table *dcb,
5536 entry->bus = (conn >> 16) & 0xf; 5536 entry->bus = (conn >> 16) & 0xf;
5537 entry->location = (conn >> 20) & 0x3; 5537 entry->location = (conn >> 20) & 0x3;
5538 entry->or = (conn >> 24) & 0xf; 5538 entry->or = (conn >> 24) & 0xf;
5539 /*
5540 * Normal entries consist of a single bit, but dual link has the
5541 * next most significant bit set too
5542 */
5543 entry->duallink_possible =
5544 ((1 << (ffs(entry->or) - 1)) * 3 == entry->or);
5545 5539
5546 switch (entry->type) { 5540 switch (entry->type) {
5547 case OUTPUT_ANALOG: 5541 case OUTPUT_ANALOG:
@@ -5625,6 +5619,16 @@ parse_dcb20_entry(struct drm_device *dev, struct dcb_table *dcb,
5625 break; 5619 break;
5626 } 5620 }
5627 5621
5622 if (dcb->version < 0x40) {
5623 /* Normal entries consist of a single bit, but dual link has
5624 * the next most significant bit set too
5625 */
5626 entry->duallink_possible =
5627 ((1 << (ffs(entry->or) - 1)) * 3 == entry->or);
5628 } else {
5629 entry->duallink_possible = (entry->sorconf.link == 3);
5630 }
5631
5628 /* unsure what DCB version introduces this, 3.0? */ 5632 /* unsure what DCB version introduces this, 3.0? */
5629 if (conf & 0x100000) 5633 if (conf & 0x100000)
5630 entry->i2c_upper_default = true; 5634 entry->i2c_upper_default = true;