]> git.itanic.dy.fi Git - linux-stable/commitdiff
drm/radeon: fix LCD record parsing
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 20 Aug 2013 18:59:01 +0000 (14:59 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Oct 2013 15:55:47 +0000 (08:55 -0700)
commit 95663948ba22a4be8b99acd67fbf83e86ddffba4 upstream.

If the LCD table contains an EDID record, properly account
for the edid size when walking through the records.

This should fix error messages about unknown LCD records.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/radeon/radeon_atombios.c

index b1aade04a127fffd455cf2a508b9698b725137a1..4b2a7f0bef889ee94160a1a1807a1c9b1d54a11b 100644 (file)
@@ -1658,7 +1658,9 @@ struct radeon_encoder_atom_dig *radeon_atombios_get_lvds_info(struct
                                                                kfree(edid);
                                                }
                                        }
-                                       record += sizeof(ATOM_FAKE_EDID_PATCH_RECORD);
+                                       record += fake_edid_record->ucFakeEDIDLength ?
+                                               fake_edid_record->ucFakeEDIDLength + 2 :
+                                               sizeof(ATOM_FAKE_EDID_PATCH_RECORD);
                                        break;
                                case LCD_PANEL_RESOLUTION_RECORD_TYPE:
                                        panel_res_record = (ATOM_PANEL_RESOLUTION_PATCH_RECORD *)record;