aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/ddc
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-11 08:18:52 +0100
committermarha <marha@users.sourceforge.net>2012-01-11 08:18:52 +0100
commit38e661c7d82fa0b34fbe9b3f3261295787bb6427 (patch)
treeef71c86cfe741318555e06dec3e9e2817d731e7a /xorg-server/hw/xfree86/ddc
parenta1e97828c89278770cb249039ec92d959440c640 (diff)
downloadvcxsrv-38e661c7d82fa0b34fbe9b3f3261295787bb6427.tar.gz
vcxsrv-38e661c7d82fa0b34fbe9b3f3261295787bb6427.tar.bz2
vcxsrv-38e661c7d82fa0b34fbe9b3f3261295787bb6427.zip
mesa pixman xserver git update 11 jan 2012
Diffstat (limited to 'xorg-server/hw/xfree86/ddc')
-rw-r--r--xorg-server/hw/xfree86/ddc/ddcProperty.c47
1 files changed, 4 insertions, 43 deletions
diff --git a/xorg-server/hw/xfree86/ddc/ddcProperty.c b/xorg-server/hw/xfree86/ddc/ddcProperty.c
index 5d6eec927..c3aced5c2 100644
--- a/xorg-server/hw/xfree86/ddc/ddcProperty.c
+++ b/xorg-server/hw/xfree86/ddc/ddcProperty.c
@@ -33,7 +33,6 @@
#include <string.h>
#define EDID1_ATOM_NAME "XFree86_DDC_EDID1_RAWDATA"
-#define EDID2_ATOM_NAME "XFree86_DDC_EDID2_RAWDATA"
static void
edidMakeAtom(int i, const char *name, CARD8 *data, int size)
@@ -52,59 +51,21 @@ edidMakeAtom(int i, const char *name, CARD8 *data, int size)
static void
addRootWindowProperties(ScrnInfoPtr pScrn, xf86MonPtr DDC)
{
- int i, scrnIndex = pScrn->scrnIndex;
- Bool makeEDID1prop = FALSE;
- Bool makeEDID2prop = FALSE;
+ int scrnIndex = pScrn->scrnIndex;
if (DDC->flags & MONITOR_DISPLAYID) {
/* Don't bother, use RANDR already */
return;
} else if (DDC->ver.version == 1) {
- makeEDID1prop = TRUE;
- } else if (DDC->ver.version == 2) {
- int checksum1;
- int checksum2;
- makeEDID2prop = TRUE;
+ int size = 128 +
+ (DDC->flags & EDID_COMPLETE_RAWDATA ? DDC->no_sections * 128 : 0);
- /* Some monitors (eg Panasonic PanaSync4)
- * report version==2 because they used EDID v2 spec document,
- * although they use EDID v1 data structure :-(
- *
- * Try using checksum to determine when we have such a monitor.
- */
- checksum2 = 0;
- for (i = 0; i < 256; i++)
- checksum2 += DDC->rawData[i];
- if (checksum2 % 256) {
- xf86DrvMsg(scrnIndex, X_INFO, "Monitor EDID v2 checksum failed\n");
- xf86DrvMsg(scrnIndex, X_INFO,
- "XFree86_DDC_EDID2_RAWDATA property may be bad\n");
- checksum1 = 0;
- for (i = 0; i < 128; i++)
- checksum1 += DDC->rawData[i];
- if (!(checksum1 % 256)) {
- xf86DrvMsg(scrnIndex, X_INFO,
- "Monitor EDID v1 checksum passed,\n");
- xf86DrvMsg(scrnIndex, X_INFO,
- "XFree86_DDC_EDID1_RAWDATA property created\n");
- makeEDID1prop = TRUE;
- }
- }
+ edidMakeAtom(scrnIndex, EDID1_ATOM_NAME, DDC->rawData, size);
} else {
xf86DrvMsg(scrnIndex, X_PROBED, "unexpected EDID version %d.%d\n",
DDC->ver.version, DDC->ver.revision);
return;
}
-
- if (makeEDID1prop) {
- int size = 128 +
- (DDC->flags & EDID_COMPLETE_RAWDATA ? DDC->no_sections * 128 : 0);
-
- edidMakeAtom(scrnIndex, EDID1_ATOM_NAME, DDC->rawData, size);
- }
-
- if (makeEDID2prop)
- edidMakeAtom(scrnIndex, EDID2_ATOM_NAME, DDC->rawData, 256);
}
Bool