]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/radeon: fix regression on atom cards with hardcoded EDID record.
authorDave Airlie <airlied@redhat.com>
Sun, 1 May 2011 10:16:30 +0000 (20:16 +1000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 9 May 2011 22:06:41 +0000 (15:06 -0700)
commit eaa4f5e1d0b816291a59a47917e569c0384f2b6f upstream.

Since fafcf94e2b5732d1e13b440291c53115d2b172e9 introduced an edid size, it seems to have broken this path.

This manifest as oops on T500 Lenovo laptops with dual graphics primarily.

Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=33812
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/radeon/radeon_atombios.c

index 99768d9d91dacb4db763c6ecee074c64ba24bed9..a73f0e62a078287f6dfceed4017fcda89b4bdbf7 100644 (file)
@@ -1599,9 +1599,10 @@ struct radeon_encoder_atom_dig *radeon_atombios_get_lvds_info(struct
                                                        memcpy((u8 *)edid, (u8 *)&fake_edid_record->ucFakeEDIDString[0],
                                                               fake_edid_record->ucFakeEDIDLength);
 
-                                                       if (drm_edid_is_valid(edid))
+                                                       if (drm_edid_is_valid(edid)) {
                                                                rdev->mode_info.bios_hardcoded_edid = edid;
-                                                       else
+                                                               rdev->mode_info.bios_hardcoded_edid_size = edid_size;
+                                                       } else
                                                                kfree(edid);
                                                }
                                        }