rpms/xorg-x11-server/F-10 xserver-1.5.3-hdmi.patch, NONE, 1.1 xorg-x11-server.spec, 1.392, 1.393
Adam Jackson
ajax at fedoraproject.org
Sat Feb 21 18:57:13 UTC 2009
- Previous message (by thread): rpms/mingw32-nsis/EL-5 mingw32-nsis.spec,1.1,1.2
- Next message (by thread): rpms/kernel/F-10 patch-2.6.29-rc5-git5.bz2.sign, NONE, 1.1 .cvsignore, 1.986, 1.987 kernel.spec, 1.1267, 1.1268 sources, 1.948, 1.949 upstream, 1.859, 1.860 patch-2.6.29-rc5-git4.bz2.sign, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: ajax
Update of /cvs/pkgs/rpms/xorg-x11-server/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv24120
Modified Files:
xorg-x11-server.spec
Added Files:
xserver-1.5.3-hdmi.patch
Log Message:
* Sat Feb 21 2009 Adam Jackson <ajax at redhat.com> 1.5.3-14
- xserver-1.5.3-hdmi.patch: Add xf86MonitorIsHDMI(). (#485557)
xserver-1.5.3-hdmi.patch:
--- NEW FILE xserver-1.5.3-hdmi.patch ---
>From 0da8fee7b68257fcf60460f2c97cf1ac51c9e4be Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax at redhat.com>
Date: Sat, 21 Feb 2009 13:57:42 -0500
Subject: [PATCH] Add xf86MonitorIsHDMI()
---
hw/xfree86/ddc/interpret_edid.c | 53 +++++++++++++++++++++++++++++++++++++++
hw/xfree86/ddc/xf86DDC.h | 5 ++-
hw/xfree86/loader/xf86sym.c | 1 +
3 files changed, 57 insertions(+), 2 deletions(-)
diff --git a/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c
index f2c94d3..d080bd4 100644
--- a/hw/xfree86/ddc/interpret_edid.c
+++ b/hw/xfree86/ddc/interpret_edid.c
@@ -459,3 +459,56 @@ validate_version(int scrnIndex, struct edid_version *r)
return TRUE;
}
+
+/*
+ * Returns true if HDMI, false if definitely not or unknown.
+ */
+_X_EXPORT Bool
+xf86MonitorIsHDMI(xf86MonPtr mon)
+{
+ int i = 0, version, offset;
+ char *edid = NULL;
+
+ if (!mon)
+ return FALSE;
+
+ if (!(mon->flags & EDID_COMPLETE_RAWDATA))
+ return FALSE;
+
+ if (!mon->no_sections)
+ return FALSE;
+
+ edid = (char *)mon->rawData;
+ if (!edid)
+ return FALSE;
+
+ /* find the CEA extension block */
+ for (i = 1; i <= mon->no_sections; i++)
+ if (edid[i * 128] == 0x02)
+ break;
+ if (i == mon->no_sections + 1)
+ return FALSE;
+ edid += (i * 128);
+
+ version = edid[1];
+ offset = edid[2];
+ if (version < 3 || offset < 4)
+ return FALSE;
+
+ /* walk the cea data blocks */
+ for (i = 4; i < offset; i += (edid[i] & 0x1f) + 1) {
+ char *x = edid + i;
+
+ /* find a vendor specific block */
+ if ((x[0] & 0xe0) >> 5 == 0x03) {
+ int oui = (x[3] << 16) + (x[2] << 8) + x[1];
+
+ /* find the HDMI vendor OUI */
+ if (oui == 0x000c03)
+ return TRUE;
+ }
+ }
+
+ /* guess it's not HDMI after all */
+ return FALSE;
+}
diff --git a/hw/xfree86/ddc/xf86DDC.h b/hw/xfree86/ddc/xf86DDC.h
index 42d9ce6..3172b55 100644
--- a/hw/xfree86/ddc/xf86DDC.h
+++ b/hw/xfree86/ddc/xf86DDC.h
@@ -59,6 +59,7 @@ extern Bool xf86SetDDCproperties(
DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC);
-#endif
-
+extern Bool
+xf86MonitorIsHDMI(xf86MonPtr mon);
+#endif
diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c
index 77d7d45..8a87080 100644
--- a/hw/xfree86/loader/xf86sym.c
+++ b/hw/xfree86/loader/xf86sym.c
@@ -1012,6 +1012,7 @@ _X_HIDDEN void *xfree86LookupTab[] = {
SYMFUNC(xf86DoEEDID)
SYMFUNC(xf86DDCMonitorSet)
SYMFUNC(xf86SetDDCproperties)
+ SYMFUNC(xf86MonitorIsHDMI)
SYMFUNC(xf86CreateI2CBusRec)
SYMFUNC(xf86CreateI2CDevRec)
--
1.6.1.3
Index: xorg-x11-server.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-server/F-10/xorg-x11-server.spec,v
retrieving revision 1.392
retrieving revision 1.393
diff -u -r1.392 -r1.393
--- xorg-x11-server.spec 16 Feb 2009 06:54:10 -0000 1.392
+++ xorg-x11-server.spec 21 Feb 2009 18:56:37 -0000 1.393
@@ -19,7 +19,7 @@
Summary: X.Org X11 X server
Name: xorg-x11-server
Version: 1.5.3
-Release: 13%{?dist}
+Release: 14%{?dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X
@@ -101,6 +101,8 @@
Patch6008: xserver-1.5.3-xinerama-events.patch
# RH 469572, FDO 20081
Patch6009: xserver-1.5.3-xkb-colors.patch
+# #485557
+Patch6010: xserver-1.5.3-hdmi.patch
%define moduledir %{_libdir}/xorg/modules
%define drimoduledir %{_libdir}/dri
@@ -305,20 +307,20 @@
git checkout -b fedora
sed -i 's/git/&+ssh/' .git/config
%else
-git-init-db
+git init-db
git config --add apply.whitespace nowarn
if [ -z "$GIT_COMMITTER_NAME" ]; then
- git-config user.email "x at fedoraproject.org"
- git-config user.name "Fedora X Ninjas"
+ git config user.email "x at fedoraproject.org"
+ git config user.name "Fedora X Ninjas"
fi
cp %{SOURCE1} .gitignore
-git-add .
-git-commit -a -q -m "%{version} baseline."
+git add .
+git commit -a -q -m "%{version} baseline."
%endif
# Apply all the patches.
#git-am -p1 %{patches}
-git-am -p1 $(awk '/^Patch.*:/ { print "%{_sourcedir}/"$2 }' %{_specdir}/%{name}.spec)
+git am -p1 %{lua: for i, p in ipairs(patches) do print(p.." ") end}
%build
@@ -534,6 +536,9 @@
%changelog
+* Sat Feb 21 2009 Adam Jackson <ajax at redhat.com> 1.5.3-14
+- xserver-1.5.3-hdmi.patch: Add xf86MonitorIsHDMI(). (#485557)
+
* Mon Feb 16 2009 Peter Hutterer <peter.hutterer at redhat.com> 1.5.3-13
- Add freetype-devel to build requires.
- Previous message (by thread): rpms/mingw32-nsis/EL-5 mingw32-nsis.spec,1.1,1.2
- Next message (by thread): rpms/kernel/F-10 patch-2.6.29-rc5-git5.bz2.sign, NONE, 1.1 .cvsignore, 1.986, 1.987 kernel.spec, 1.1267, 1.1268 sources, 1.948, 1.949 upstream, 1.859, 1.860 patch-2.6.29-rc5-git4.bz2.sign, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list