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.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/xorg-server/hw/xfree86/ddc/ddcProperty.c b/xorg-server/hw/xfree86/ddc/ddcProperty.c
index c3aced5c2..fc63f0e8a 100644
--- a/xorg-server/hw/xfree86/ddc/ddcProperty.c
+++ b/xorg-server/hw/xfree86/ddc/ddcProperty.c
@@ -40,8 +40,8 @@ edidMakeAtom(int i, const char *name, CARD8 *data, int size)
Atom atom;
unsigned char *atom_data;
- if (!(atom_data = malloc(size*sizeof(CARD8))))
- return;
+ if (!(atom_data = malloc(size * sizeof(CARD8))))
+ return;
atom = MakeAtom(name, strlen(name), TRUE);
memcpy(atom_data, data, size);
@@ -54,17 +54,19 @@ addRootWindowProperties(ScrnInfoPtr pScrn, xf86MonPtr DDC)
int scrnIndex = pScrn->scrnIndex;
if (DDC->flags & MONITOR_DISPLAYID) {
- /* Don't bother, use RANDR already */
- return;
- } else if (DDC->ver.version == 1) {
- int size = 128 +
- (DDC->flags & EDID_COMPLETE_RAWDATA ? DDC->no_sections * 128 : 0);
+ /* Don't bother, use RANDR already */
+ return;
+ }
+ else if (DDC->ver.version == 1) {
+ int size = 128 +
+ (DDC->flags & EDID_COMPLETE_RAWDATA ? DDC->no_sections * 128 : 0);
- 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;
+ 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;
}
}
@@ -74,10 +76,9 @@ xf86SetDDCproperties(ScrnInfoPtr pScrn, xf86MonPtr DDC)
if (!pScrn || !pScrn->monitor || !DDC)
return FALSE;
- if (DDC->flags & MONITOR_DISPLAYID)
- ;
+ if (DDC->flags & MONITOR_DISPLAYID);
else
- xf86EdidMonitorSet(pScrn->scrnIndex, pScrn->monitor, DDC);
+ xf86EdidMonitorSet(pScrn->scrnIndex, pScrn->monitor, DDC);
addRootWindowProperties(pScrn, DDC);