xserver: Branch 'server-1.5-branch' - 2 commits
Adam Jackson
ajax at kemper.freedesktop.org
Fri Oct 10 12:27:26 PDT 2008
configure.ac | 4 +--
hw/xfree86/ddc/interpret_edid.c | 41 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+), 2 deletions(-)
New commits:
commit 6dcfa994b0777bf0cabeb71672f13e650b340817
Author: Adam Jackson <ajax at redhat.com>
Date: Fri Oct 10 15:26:32 2008 -0400
xserver 1.5.2
diff --git a/configure.ac b/configure.ac
index ef276cc..88749a5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,8 +26,8 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.5.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="23 September 2008"
+AC_INIT([xorg-server], 1.5.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="10 October 2008"
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([dist-bzip2 foreign])
AM_MAINTAINER_MODE
commit 75504517a30f1bdd593c2a32af81084b59b398a5
Author: Adam Jackson <ajax at redhat.com>
Date: Fri Oct 10 13:41:50 2008 -0400
EDID: Catch monitors that encode aspect ratio for physical size.
This is not legal in either EDID 1.3 or 1.4, but hey, when did a little
thing like legality stop anyone.
(cherry picked from commit 0660dd9d7009147c395b9ea904539f76f55b9a7f)
diff --git a/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c
index 21391dd..958247c 100644
--- a/hw/xfree86/ddc/interpret_edid.c
+++ b/hw/xfree86/ddc/interpret_edid.c
@@ -85,6 +85,47 @@ handle_edid_quirks(xf86MonPtr m)
}
}
}
+
+ /*
+ * some monitors encode the aspect ratio instead of the physical size.
+ * try to find the largest detailed timing that matches that aspect
+ * ratio and use that to fill in the feature section.
+ */
+ if ((m->features.hsize == 16 && m->features.vsize == 9) ||
+ (m->features.hsize == 16 && m->features.vsize == 10) ||
+ (m->features.hsize == 4 && m->features.vsize == 3) ||
+ (m->features.hsize == 5 && m->features.vsize == 4)) {
+ int real_hsize = 0, real_vsize = 0;
+ float target_aspect, timing_aspect;
+
+ target_aspect = (float)m->features.hsize / (float)m->features.vsize;
+ for (i = 0; i < 4; i++) {
+ if (m->det_mon[i].type == DT) {
+ struct detailed_timings *timing;
+ timing = &m->det_mon[i].section.d_timings;
+
+ if (!timing->v_size)
+ continue;
+
+ timing_aspect = (float)timing->h_size / (float)timing->v_size;
+ if (fabs(1 - (timing_aspect / target_aspect)) < 0.05) {
+ real_hsize = max(real_hsize, timing->h_size);
+ real_vsize = max(real_vsize, timing->v_size);
+ }
+ }
+ }
+
+ if (real_hsize && real_vsize) {
+ /* convert mm to cm */
+ m->features.hsize = (real_hsize + 5) / 10;
+ m->features.vsize = (real_vsize + 5) / 10;
+ } else {
+ m->features.hsize = m->features.vsize = 0;
+ }
+
+ xf86Msg(X_INFO, "Quirked EDID physical size to %dx%d cm\n",
+ m->features.hsize, m->features.vsize);
+ }
}
xf86MonPtr
More information about the xorg-commit
mailing list