X Strike Force xresprobe SVN commit: r20 - in trunk: . ddcprobe debian tests
Author: otavio
Date: 2005-03-23 20:06:10 -0500 (Wed, 23 Mar 2005)
New Revision: 20
Added:
trunk/bitdepth.sh
trunk/tests/log-i810-no24bpp
Modified:
trunk/COPYING
trunk/Makefile
trunk/ddcprobe.sh
trunk/ddcprobe/of.c
trunk/debian/rules
trunk/lcdsize.sh
trunk/xprobe.sh
trunk/xresprobe
Log:
Merge changes did on 0.4.15 release.
Modified: trunk/COPYING
===================================================================
--- trunk/COPYING 2005-03-24 01:01:34 UTC (rev 19)
+++ trunk/COPYING 2005-03-24 01:06:10 UTC (rev 20)
@@ -1,4 +1,4 @@
-Copyright (C) 2004 Canonical Ltd, written by
+Copyright (C) 2004-2005 Canonical Ltd, written by
Daniel Stone <daniel.stone@ubuntu.com>, and Fabio M. Di Nitto
<fabio.massimo.di.nitto@ubuntu.com>
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2005-03-24 01:01:34 UTC (rev 19)
+++ trunk/Makefile 2005-03-24 01:06:10 UTC (rev 20)
@@ -15,4 +15,5 @@
install -m755 xprobe.sh $(DESTDIR)$(DATADIR)/
install -m755 ddcprobe.sh $(DESTDIR)$(DATADIR)/
install -m755 lcdsize.sh $(DESTDIR)$(DATADIR)/
+ install -m755 bitdepth.sh $(DESTDIR)$(DATADIR)/
install -m644 xorg.conf $(DESTDIR)$(DATADIR)/
Copied: trunk/bitdepth.sh (from rev 19, tags/0.4.15/bitdepth.sh)
Property changes on: trunk/bitdepth.sh
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/ddcprobe/of.c
===================================================================
--- trunk/ddcprobe/of.c 2005-03-24 01:01:34 UTC (rev 19)
+++ trunk/ddcprobe/of.c 2005-03-24 01:06:10 UTC (rev 20)
@@ -76,6 +76,14 @@
for (n = list->result->next; n != list->result; n = n->next)
ret = 1;
+ /* If there is no EDID in /proc/device-tree provided by the OF, maybe
+ * some fbdev driver (like radeonfb) provides the info in /sys */
+ if (ret == 0) {
+ minifind("/sys", "edid1", list);
+ for (n = list->result->next; n != list->result; n = n->next)
+ ret = 1;
+ }
+
/* Clean up and return. */
return ret;
}
@@ -105,6 +113,18 @@
break;
}
+ /* If there is no EDID in /proc/device-tree provided by the OF, maybe
+ * some fbdev driver (like radeonfb) provides the info in /sys */
+ if (!path) {
+ minifind("/sys", "edid1", list);
+ for (n = list->result->next; n != list->result; n = n->next)
+ {
+ path = n->path;
+ break;
+ }
+ }
+
+
if (path)
edid_file = fopen(path, "rb" );
Property changes on: trunk/ddcprobe.sh
___________________________________________________________________
Name: svn:executable
-
+ *
Property changes on: trunk/debian/rules
___________________________________________________________________
Name: svn:executable
-
+ *
Property changes on: trunk/lcdsize.sh
___________________________________________________________________
Name: svn:executable
-
+ *
Copied: trunk/tests/log-i810-no24bpp (from rev 19, tags/0.4.15/tests/log-i810-no24bpp)
Property changes on: trunk/xprobe.sh
___________________________________________________________________
Name: svn:executable
-
+ *
Modified: trunk/xresprobe
===================================================================
--- trunk/xresprobe 2005-03-24 01:01:34 UTC (rev 19)
+++ trunk/xresprobe 2005-03-24 01:06:10 UTC (rev 20)
@@ -77,22 +77,58 @@
fi
}
+forkx() {
+ if [ -z "$FORKEDX" ]; then
+ if [ -n "$XRESPROBE_DEBUG" ]; then
+ echo "forking Xorg" >&2
+ fi
+ XPROBEDIR="$("$DATADIR/xprobe.sh" "$DRIVER")"
+ RETCODE="$?"
+ LOGFILE="$XPROBEDIR/xorg.log"
+ FORKEDX="yes"
+ else
+ if [ -n "$XRESPROBE_DEBUG" ]; then
+ echo "X has already been forked; not reforking" >&2
+ fi
+ fi
+}
+
+cleanx() {
+ if [ -n "$FORKEDX" ]; then
+ if [ -n "$XRESPROBE_DEBUG" ]; then
+ echo "not removing temporary xprobe directory $XPROBEDIR; please do this \
+ by hand" >&2
+ else
+ rm -rf "$XPROBEDIR"
+ fi
+ FORKEDX=""
+ else
+ if [ -n "$XRESPROBE_DEBUG" ]; then
+ echo "not cleaning up after Xorg; not forked" >&2
+ fi
+ fi
+}
+
doprobe() {
if [ -n "$XRESPROBE_DEBUG" ]; then
echo "attempting an X probe" >&2
fi
- XPROBEDIR="$("$DATADIR/xprobe.sh" "$DRIVER")"
- RETCODE="$?"
- LOGFILE="$XPROBEDIR/xorg.log"
+ forkx
RES="$("$DATADIR/lcdsize.sh" $DRIVER $LOGFILE)"
+}
+
+dodepthcheck() {
if [ -n "$XRESPROBE_DEBUG" ]; then
- echo "not removing temporary xprobe directory $XPROBEDIR; please do this \
- by hand" >&2
- else
- rm -rf "$XPROBEDIR"
+ echo "checking for broken i8xx BIOS with no 24bpp modes" >&2
fi
+ forkx
+ FORCEDEPTH="$("$DATADIR/bitdepth.sh" $DRIVER $LOGFILE)"
}
+if [ "$DRIVER" = "i810" ]; then
+ dodepthcheck
+fi
+
if [ "x$LAPTOP" = "xyes" ]; then
if [ "$(uname -m)" = "ppc" ] || [ "$(uname -m)" = "ppc64" ]; then
doddc
@@ -110,10 +146,18 @@
echo "res: $RES" >&2
echo "freq: $FREQ" >&2
echo "disptype: $DISPTYPE" >&2
+ if [ -n "$FORCEDEPTH" ]; then
+ echo "depth: $FORCEDEPTH" >&2
+ fi
fi
echo "id: $IDENTIFIER"
echo "res: $RES"
echo "freq: $FREQ"
echo "disptype: $DISPTYPE"
+if [ -n "$FORCEDEPTH" ]; then
+ echo "depth: $FORCEDEPTH"
+fi
+
+cleanx
exit $RETCODE
Property changes on: trunk/xresprobe
___________________________________________________________________
Name: svn:executable
-
+ *
Reply to: