diff options
author | Roland Mainz <roland.mainz@nrubsig.org> | 2005-01-13 00:03:59 +0000 |
---|---|---|
committer | Roland Mainz <roland.mainz@nrubsig.org> | 2005-01-13 00:03:59 +0000 |
commit | 731fc608cb6995470346936706a2b51c63ab8418 (patch) | |
tree | 0e556594fb0a5f12e730ace94ff80fffd209e676 | |
parent | 6c3e568f4bbf18c85071af83ebde3294231cddb1 (diff) |
//bugs.freedesktop.org/show_bug.cgi?id=1490) attachment #1576
(https://bugs.freedesktop.org/attachment.cgi?id=1576): Refix for
previous patch (updating to EDID 1.3), this syncs the X11R6.8.x stable
branch with todays Xorg trunk. Patch by Jay Cotton
<jay.cotton@sun.com>, Alan Coopersmith <alan.coopersmith@sun.com> and
Egbert Eich <eich@freedesktop.org>.
-rw-r--r-- | hw/xfree86/ddc/edid.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/hw/xfree86/ddc/edid.h b/hw/xfree86/ddc/edid.h index e40492c4c..939b4d351 100644 --- a/hw/xfree86/ddc/edid.h +++ b/hw/xfree86/ddc/edid.h @@ -160,9 +160,10 @@ #define T_MANU GET(E_TMANU) /* extract information from estabished timing section */ -#define _VALID_TIMING(x) ((x[0] != 0x01 && x[1] != 0x01) \ - && (x[0] != 0x00 && x[1] != 0x00) \ - && (x[0] != 0x20 && x[1] != 0x20) ) +#define _VALID_TIMING(x) !(((x[0] == 0x01) && (x[1] == 0x01)) \ + || ((x[0] == 0x00) && (x[1] == 0x00)) \ + || ((x[0] == 0x20) && (x[1] == 0x20)) ) + #define VALID_TIMING _VALID_TIMING(c) #define _HSIZE1(x) ((x[0] + 31) * 8) #define HSIZE1 _HSIZE1(c) @@ -174,8 +175,8 @@ #define RATIO5_4 2 #define RATIO16_9 3 #define _VSIZE1(x,y,r) switch(RATIO(x)){ \ - case RATIO1_1: y = _HSIZE1(x) * ((v->version>1||v->revision>2) ? 10/16 : 1); \ - break; \ + case RATIO1_1: y = ((v->version > 1 || v->revision > 2) \ + ? (_HSIZE1(x) * 10) / 16 : _HSIZE1(x)); break; \ case RATIO4_3: y = _HSIZE1(x) * 3 / 4; break; \ case RATIO5_4: y = _HSIZE1(x) * 4 / 5; break; \ case RATIO16_9: y = _HSIZE1(x) * 9 / 16; break; \ |