aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_combios.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-04-19 23:14:38 -0400
committerDave Airlie <airlied@redhat.com>2010-04-19 23:14:38 -0400
commitc9c2625ff4fc4ce652e686f895059d2902c01ca0 (patch)
tree243c07b0380d60d15566064843acb2213b0cacdf /drivers/gpu/drm/radeon/radeon_combios.c
parentc2b41276da65481d36311a13d69020d150861c43 (diff)
parent522032da7ed3068cf79f733fb836118d908b7719 (diff)
Merge branch 'drm-edid-fixes' into drm-core-next
* drm-edid-fixes: drm/edid: When checking duplicate standard modes, walked the probed list drm/edid: Fix sync polarity for secondary GTF curve drm/modes: Fix interlaced mode names drm/edid: Add secondary GTF curve support drm/edid: Strengthen the algorithm for standard mode codes drm/edid: Fix the HDTV hack. drm/edid: Extend range-based mode addition for EDID 1.4 drm/edid: Add test for monitor reduced blanking support. drm/edid: Fix preferred mode parse for EDID 1.4 drm/edid: Remove some silly comments drm/edid: Remove arbitrary EDID extension limit drm/edid: Add modes for Established Timings III section drm/edid: Reshuffle mode list construction to closer match the spec drm/edid: Remove a redundant check drm/edid: Remove some misleading comments drm/edid: Fix secondary block fetch.
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_combios.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_combios.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index 37db8adb2748..0f1fd9254e30 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -450,17 +450,17 @@ bool radeon_combios_check_hardcoded_edid(struct radeon_device *rdev)
450{ 450{
451 int edid_info; 451 int edid_info;
452 struct edid *edid; 452 struct edid *edid;
453 unsigned char *raw;
453 edid_info = combios_get_table_offset(rdev->ddev, COMBIOS_HARDCODED_EDID_TABLE); 454 edid_info = combios_get_table_offset(rdev->ddev, COMBIOS_HARDCODED_EDID_TABLE);
454 if (!edid_info) 455 if (!edid_info)
455 return false; 456 return false;
456 457
457 edid = kmalloc(EDID_LENGTH * (DRM_MAX_EDID_EXT_NUM + 1), 458 raw = rdev->bios + edid_info;
458 GFP_KERNEL); 459 edid = kmalloc(EDID_LENGTH * (raw[0x7e] + 1), GFP_KERNEL);
459 if (edid == NULL) 460 if (edid == NULL)
460 return false; 461 return false;
461 462
462 memcpy((unsigned char *)edid, 463 memcpy((unsigned char *)edid, raw, EDID_LENGTH * (raw[0x7e] + 1));
463 (unsigned char *)(rdev->bios + edid_info), EDID_LENGTH);
464 464
465 if (!drm_edid_is_valid(edid)) { 465 if (!drm_edid_is_valid(edid)) {
466 kfree(edid); 466 kfree(edid);