aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/ddc/ddcProperty.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/ddc/ddcProperty.c')
-rw-r--r--xorg-server/hw/xfree86/ddc/ddcProperty.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/xorg-server/hw/xfree86/ddc/ddcProperty.c b/xorg-server/hw/xfree86/ddc/ddcProperty.c
index 02125dff7..a4384f1d3 100644
--- a/xorg-server/hw/xfree86/ddc/ddcProperty.c
+++ b/xorg-server/hw/xfree86/ddc/ddcProperty.c
@@ -83,13 +83,18 @@ addRootWindowProperties(ScrnInfoPtr pScrn, xf86MonPtr DDC)
}
if (makeEDID1prop) {
- if ((EDID1rawdata = xalloc(128*sizeof(CARD8)))==NULL)
+ int size = 128;
+
+ if (DDC->flags & EDID_COMPLETE_RAWDATA)
+ size += DDC->no_sections * 128;
+
+ if ((EDID1rawdata = xalloc(size*sizeof(CARD8)))==NULL)
return;
EDID1Atom = MakeAtom(EDID1_ATOM_NAME, sizeof(EDID1_ATOM_NAME) - 1, TRUE);
- memcpy(EDID1rawdata, DDC->rawData, 128);
+ memcpy(EDID1rawdata, DDC->rawData, size);
xf86RegisterRootWindowProperty(scrnIndex, EDID1Atom, XA_INTEGER, 8,
- 128, (unsigned char *)EDID1rawdata);
+ size, (unsigned char *)EDID1rawdata);
}
if (makeEDID2prop) {