drm/radeon/kms: fix quirk for MSI laptop
authorAlex Deucher <alexdeucher@gmail.com>
Wed, 8 Jul 2009 20:15:30 +0000 (16:15 -0400)
committerDave Airlie <airlied@redhat.com>
Wed, 15 Jul 2009 07:13:11 +0000 (17:13 +1000)
The line mux for the connector in the bios tables
is used for enumerating drm connectors.  Since
this laptop has a quirk where the same line much is
listed for both VGA and LVDS, the connectors get
combined.  Setting the line mux on LVDS to an unused
value prevents both encoders from being combined into
the same connector.  This should fix bko bug 13720.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_atombios.c

index 1f5a1a4909844c20d6ced2f9ba174ea5130eb278..fcfe5c02d744ab63eb13b085fcde591b35cae1d9 100644 (file)
@@ -103,7 +103,8 @@ static inline struct radeon_i2c_bus_rec radeon_lookup_gpio(struct drm_device
 static bool radeon_atom_apply_quirks(struct drm_device *dev,
                                     uint32_t supported_device,
                                     int *connector_type,
-                                    struct radeon_i2c_bus_rec *i2c_bus)
+                                    struct radeon_i2c_bus_rec *i2c_bus,
+                                    uint8_t *line_mux)
 {
 
        /* Asus M2A-VM HDMI board lists the DVI port as HDMI */
@@ -127,8 +128,10 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev,
        if ((dev->pdev->device == 0x5653) &&
            (dev->pdev->subsystem_vendor == 0x1462) &&
            (dev->pdev->subsystem_device == 0x0291)) {
-               if (*connector_type == DRM_MODE_CONNECTOR_LVDS)
+               if (*connector_type == DRM_MODE_CONNECTOR_LVDS) {
                        i2c_bus->valid = false;
+                       *line_mux = 53;
+               }
        }
 
        /* Funky macbooks */
@@ -526,7 +529,7 @@ bool radeon_get_atom_connector_info_from_supported_devices_table(struct
 
                if (!radeon_atom_apply_quirks
                    (dev, (1 << i), &bios_connectors[i].connector_type,
-                    &bios_connectors[i].ddc_bus))
+                    &bios_connectors[i].ddc_bus, &bios_connectors[i].line_mux))
                        continue;
 
                bios_connectors[i].valid = true;