summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2014-02-10 00:33:51 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2014-02-10 00:33:51 +0000
commit3470edbc214fdde34b001a2872bd0ede881d722b (patch)
tree99dd578d039b569468a0ddedfdb43b229f6c92c9 /sys/dev
parentc713d514d56ef88397e440c107be426ab156baf4 (diff)
drm/radeon: fix LCD record parsing
From Alex Deucher ebfd981ed41114cc659e5cefa3d00a88e43c2813 in ubuntu 3.8 95663948ba22a4be8b99acd67fbf83e86ddffba4 in mainline linux
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/drm/radeon/radeon_atombios.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/radeon/radeon_atombios.c b/sys/dev/pci/drm/radeon/radeon_atombios.c
index 09fa40f4418..883cd724284 100644
--- a/sys/dev/pci/drm/radeon/radeon_atombios.c
+++ b/sys/dev/pci/drm/radeon/radeon_atombios.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: radeon_atombios.c,v 1.2 2014/02/09 11:03:31 jsg Exp $ */
+/* $OpenBSD: radeon_atombios.c,v 1.3 2014/02/10 00:33:50 jsg Exp $ */
/*
* Copyright 2007-8 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -1660,7 +1660,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;