Merge tag 'v2.6.35-rc6' into drm-radeon-next
[sfrench/cifs-2.6.git] / drivers / gpu / drm / radeon / radeon_combios.c
index 08e156a7e4d43357398dbde9fa6d1a538069ce15..5e45cb27eb988cc5f38268adc86fef3ede1a59b2 100644 (file)
@@ -1938,15 +1938,6 @@ static bool radeon_apply_legacy_quirks(struct drm_device *dev,
                        return false;
        }
 
-       /* Some RV100 cards with 2 VGA ports show up with DVI+VGA */
-       if (dev->pdev->device == 0x5159 &&
-           dev->pdev->subsystem_vendor == 0x1002 &&
-           dev->pdev->subsystem_device == 0x013a) {
-               if (*legacy_connector == CONNECTOR_DVI_I_LEGACY)
-                       *legacy_connector = CONNECTOR_CRT_LEGACY;
-
-       }
-
        /* X300 card with extra non-existent DVI port */
        if (dev->pdev->device == 0x5B60 &&
            dev->pdev->subsystem_vendor == 0x17af &&
@@ -2950,9 +2941,8 @@ static void combios_write_ram_size(struct drm_device *dev)
                if (rev < 3) {
                        mem_cntl = RBIOS32(offset + 1);
                        mem_size = RBIOS16(offset + 5);
-                       if (((rdev->flags & RADEON_FAMILY_MASK) < CHIP_R200) &&
-                           ((dev->pdev->device != 0x515e)
-                            && (dev->pdev->device != 0x5969)))
+                       if ((rdev->family < CHIP_R200) &&
+                           !ASIC_IS_RN50(rdev))
                                WREG32(RADEON_MEM_CNTL, mem_cntl);
                }
        }
@@ -2963,10 +2953,8 @@ static void combios_write_ram_size(struct drm_device *dev)
                if (offset) {
                        rev = RBIOS8(offset - 1);
                        if (rev < 1) {
-                               if (((rdev->flags & RADEON_FAMILY_MASK) <
-                                    CHIP_R200)
-                                   && ((dev->pdev->device != 0x515e)
-                                       && (dev->pdev->device != 0x5969))) {
+                               if ((rdev->family < CHIP_R200)
+                                   && !ASIC_IS_RN50(rdev)) {
                                        int ram = 0;
                                        int mem_addr_mapping = 0;
 
@@ -3051,6 +3039,22 @@ void radeon_combios_asic_init(struct drm_device *dev)
                combios_write_ram_size(dev);
        }
 
+       /* quirk for rs4xx HP nx6125 laptop to make it resume
+        * - it hangs on resume inside the dynclk 1 table.
+        */
+       if (rdev->family == CHIP_RS480 &&
+           rdev->pdev->subsystem_vendor == 0x103c &&
+           rdev->pdev->subsystem_device == 0x308b)
+               return;
+
+       /* quirk for rs4xx HP dv5000 laptop to make it resume
+        * - it hangs on resume inside the dynclk 1 table.
+        */
+       if (rdev->family == CHIP_RS480 &&
+           rdev->pdev->subsystem_vendor == 0x103c &&
+           rdev->pdev->subsystem_device == 0x30a4)
+               return;
+
        /* DYN CLK 1 */
        table = combios_get_table_offset(dev, COMBIOS_DYN_CLK_1_TABLE);
        if (table)