EDID: Publish the whole block on the root window if we've got it.

This commit is contained in:
Adam Jackson 2008-08-25 10:44:45 -04:00
parent 5724f7fb5b
commit 76ed409acd

View File

@ -83,13 +83,18 @@ addRootWindowProperties(ScrnInfoPtr pScrn, xf86MonPtr DDC)
} }
if (makeEDID1prop) { 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; return;
EDID1Atom = MakeAtom(EDID1_ATOM_NAME, sizeof(EDID1_ATOM_NAME) - 1, TRUE); 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, xf86RegisterRootWindowProperty(scrnIndex, EDID1Atom, XA_INTEGER, 8,
128, (unsigned char *)EDID1rawdata); size, (unsigned char *)EDID1rawdata);
} }
if (makeEDID2prop) { if (makeEDID2prop) {