[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

X Strike Force xresprobe SVN commit: r23 - in vendor: . ddcprobe debian



Author: otavio
Date: 2005-03-23 20:24:27 -0500 (Wed, 23 Mar 2005)
New Revision: 23

Added:
   vendor/rigprobe.sh
Modified:
   vendor/Makefile
   vendor/ddcprobe/Makefile
   vendor/ddcprobe/common.c
   vendor/ddcprobe/ddcprobe.c
   vendor/ddcprobe/lrmi.c
   vendor/ddcprobe/vesamode.c
   vendor/debian/changelog
   vendor/debian/control
   vendor/xresprobe
Log:
Load xresprobe-0.4.16 into vendor/.


Modified: vendor/Makefile
===================================================================
--- vendor/Makefile	2005-03-24 01:15:06 UTC (rev 22)
+++ vendor/Makefile	2005-03-24 01:24:27 UTC (rev 23)
@@ -16,4 +16,5 @@
 	install -m755 ddcprobe.sh $(DESTDIR)$(DATADIR)/
 	install -m755 lcdsize.sh $(DESTDIR)$(DATADIR)/
 	install -m755 bitdepth.sh $(DESTDIR)$(DATADIR)/
+	install -m755 rigprobe.sh $(DESTDIR)$(DATADIR)/
 	install -m644 xorg.conf $(DESTDIR)$(DATADIR)/

Modified: vendor/ddcprobe/Makefile
===================================================================
--- vendor/ddcprobe/Makefile	2005-03-24 01:15:06 UTC (rev 22)
+++ vendor/ddcprobe/Makefile	2005-03-24 01:24:27 UTC (rev 23)
@@ -3,7 +3,7 @@
 ARCH := $(patsubst ppc%,ppc,$(ARCH))
 
 CC = gcc
-CFLAGS = -Wall -O2 -g# -DDEBUG
+CFLAGS = -W -Wall -O2 -g# -DDEBUG
 TARGETS = ddcprobe ddcxinfo 
 DDC_OBJS = vesamode.o common.o
 DDC_LIBS =

Modified: vendor/ddcprobe/common.c
===================================================================
--- vendor/ddcprobe/common.c	2005-03-24 01:15:06 UTC (rev 22)
+++ vendor/ddcprobe/common.c	2005-03-24 01:24:27 UTC (rev 23)
@@ -49,7 +49,8 @@
 	struct edid1_info *edid;
 	struct modeline *ret;
 	char buf[LINE_MAX];
-	int modeline_count = 0, i, j;
+	int modeline_count = 0, j;
+	unsigned int i;
 
 	if((edid = get_edid_info()) == NULL) {
 		return NULL;

Modified: vendor/ddcprobe/ddcprobe.c
===================================================================
--- vendor/ddcprobe/ddcprobe.c	2005-03-24 01:15:06 UTC (rev 22)
+++ vendor/ddcprobe/ddcprobe.c	2005-03-24 01:24:27 UTC (rev 23)
@@ -45,6 +45,13 @@
 	struct edid1_info *edid_info = NULL;
 	char manufacturer[4];
 	int i;
+	struct vbe_info *vbe_info = NULL;
+#if defined (__i386__)
+	u_int16_t *mode_list = NULL;
+#endif /* __i386__ */
+	unsigned char *timings;
+	struct edid_monitor_descriptor *monitor;
+	unsigned char *timing;
 
 #if defined (__i386__) || defined (__powerpc__)
 	assert(sizeof(struct edid1_info) == 256);
@@ -52,12 +59,7 @@
 	assert(sizeof(struct edid_monitor_descriptor) == 18);
 	assert(sizeof(struct vbe_info) == 512);
 #endif
-	struct vbe_info *vbe_info = NULL;
 
-#if defined (__i386__)
-	u_int16_t *mode_list = NULL;
-#endif /* __i386__ */
-
 	vbe_info = vbe_get_vbe_info();
 	if(vbe_info == NULL) {
 		fprintf(stderr, "VESA BIOS Extensions not detected.\n");
@@ -237,9 +239,8 @@
 	 * removed it and replaced it with my own dtiming code, which is derived
 	 * from the VESA spec and parse-edid.c. How well it works on monitors
 	 * with multiple dtimings is unknown, since I don't have one. -daniels */
-	unsigned char *timings = (unsigned char *)&edid_info->monitor_details.detailed_timing;
-	struct edid_monitor_descriptor *monitor = NULL;
-	unsigned char *timing;
+	timings = (unsigned char *)&edid_info->monitor_details.detailed_timing;
+	monitor = NULL;
 	for(i = 0; i < 4; i++) {
 		timing = &(timings[i*18]);
 		if (timing[0] == 0 && timing[1] == 0) {

Modified: vendor/ddcprobe/lrmi.c
===================================================================
--- vendor/ddcprobe/lrmi.c	2005-03-24 01:15:06 UTC (rev 22)
+++ vendor/ddcprobe/lrmi.c	2005-03-24 01:24:27 UTC (rev 23)
@@ -47,7 +47,7 @@
 	int ready;
 	int count;
 	struct mem_block blocks[REAL_MEM_BLOCKS];
-	} mem_info = { 0 };
+	} mem_info;
 
 static int
 real_mem_init(void)
@@ -185,7 +185,7 @@
 	unsigned short ret_seg, ret_off;
 	unsigned short stack_seg, stack_off;
 	struct vm86_struct vm;
-	} context = { 0 };
+	} context;
 
 
 static inline void

Modified: vendor/ddcprobe/vesamode.c
===================================================================
--- vendor/ddcprobe/vesamode.c	2005-03-24 01:15:06 UTC (rev 22)
+++ vendor/ddcprobe/vesamode.c	2005-03-24 01:24:27 UTC (rev 23)
@@ -4,40 +4,40 @@
 /* Known standard VESA modes. */
 struct vesa_mode_t known_vesa_modes[] = {
 	/* VESA 1.0/1.1 ? */
-	{0x100,	640, 400, 256,	"640x400x256"},
-	{0x101,	640, 480, 256,	"640x480x256"},
-	{0x102,	800, 600, 16,	"800x600x16"},
-	{0x103,	800, 600, 256,	"800x600x256"},
-	{0x104,	1024, 768, 16,	"1024x768x16"},
-	{0x105,	1024, 768, 256,	"1024x768x256"},
-	{0x106,	1280, 1024, 16,	"1280x1024x16"},
-	{0x107,	1280, 1024, 256,"1280x1024x256"},
-	{0x108,	80, 60, 16,	"80x60 (text)"},
-	{0x109,	132, 25, 16,	"132x25 (text)"},
-	{0x10a,	132, 43, 16,	"132x43 (text)"},
-	{0x10b,	132, 50, 16,	"132x50 (text)"},
-	{0x10c,	132, 60, 16,	"132x60 (text)"},
+	{0x100,	640, 400, 256,	"640x400x256", 0},
+	{0x101,	640, 480, 256,	"640x480x256", 0},
+	{0x102,	800, 600, 16,	"800x600x16", 0},
+	{0x103,	800, 600, 256,	"800x600x256", 0},
+	{0x104,	1024, 768, 16,	"1024x768x16", 0},
+	{0x105,	1024, 768, 256,	"1024x768x256", 0},
+	{0x106,	1280, 1024, 16,	"1280x1024x16", 0},
+	{0x107,	1280, 1024, 256,"1280x1024x256", 0},
+	{0x108,	80, 60, 16,	"80x60 (text)", 0},
+	{0x109,	132, 25, 16,	"132x25 (text)", 0},
+	{0x10a,	132, 43, 16,	"132x43 (text)", 0},
+	{0x10b,	132, 50, 16,	"132x50 (text)", 0},
+	{0x10c,	132, 60, 16,	"132x60 (text)", 0},
 	/* VESA 1.2+ */
-	{0x10d,	320, 200, 32768,	"320x200x32k"},
-	{0x10e,	320, 200, 65536,	"320x200x64k"},
-	{0x10f,	320, 200, 16777216,	"320x200x16m"},
-	{0x110,	640, 480, 32768,	"640x480x32k"},
-	{0x111,	640, 480, 65536,	"640x480x64k"},
-	{0x112,	640, 480, 16777216,	"640x480x16m"},
-	{0x113,	800, 600, 32768,	"800x600x32k"},
-	{0x114,	800, 600, 65536,	"800x600x64k"},
-	{0x115,	800, 600, 16777216,	"800x600x16m"},
-	{0x116,	1024, 768, 32768,	"1024x768x32k"},
-	{0x117,	1024, 768, 65536,	"1024x768x64k"},
-	{0x118,	1024, 768, 16777216,	"1024x768x16m"},
-	{0x119,	1280, 1024, 32768,	"1280x1024x32k"},
-	{0x11a,	1280, 1024, 65536,	"1280x1024x64k"},
-	{0x11b,	1280, 1024, 16777216,	"1280x1024x16m"},
+	{0x10d,	320, 200, 32768,	"320x200x32k", 0},
+	{0x10e,	320, 200, 65536,	"320x200x64k", 0},
+	{0x10f,	320, 200, 16777216,	"320x200x16m", 0},
+	{0x110,	640, 480, 32768,	"640x480x32k", 0},
+	{0x111,	640, 480, 65536,	"640x480x64k", 0},
+	{0x112,	640, 480, 16777216,	"640x480x16m", 0},
+	{0x113,	800, 600, 32768,	"800x600x32k", 0},
+	{0x114,	800, 600, 65536,	"800x600x64k", 0},
+	{0x115,	800, 600, 16777216,	"800x600x16m", 0},
+	{0x116,	1024, 768, 32768,	"1024x768x32k", 0},
+	{0x117,	1024, 768, 65536,	"1024x768x64k", 0},
+	{0x118,	1024, 768, 16777216,	"1024x768x16m", 0},
+	{0x119,	1280, 1024, 32768,	"1280x1024x32k", 0},
+	{0x11a,	1280, 1024, 65536,	"1280x1024x64k", 0},
+	{0x11b,	1280, 1024, 16777216,	"1280x1024x16m", 0},
 	/* VESA 2.0+ */
-	{0x120,	1600, 1200, 256,	"1600x1200x256"},
-	{0x121,	1600, 1200, 32768,	"1600x1200x32k"},
-	{0x122,	1600, 1200, 65536,	"1600x1200x64k"},
-	{    0,    0,    0, 0,		""},
+	{0x120,	1600, 1200, 256,	"1600x1200x256", 0},
+	{0x121,	1600, 1200, 32768,	"1600x1200x32k", 0},
+	{0x122,	1600, 1200, 65536,	"1600x1200x64k", 0},
+	{    0,    0,    0, 0,		"", 0},
 };
 
 struct vesa_timing_t known_vesa_timings[] = {

Modified: vendor/debian/changelog
===================================================================
--- vendor/debian/changelog	2005-03-24 01:15:06 UTC (rev 22)
+++ vendor/debian/changelog	2005-03-24 01:24:27 UTC (rev 23)
@@ -1,3 +1,17 @@
+xresprobe (0.4.16) hoary; urgency=low
+
+  * Merge from unreleased 0.5 branch: add support for 'rigging' xresprobe
+    results.  XRESPROBE_RIG=noddc results in a null result being returned
+    (f.e. a desktop where DDC fails) and XRESPROBE_RIG=log results in
+    lcdsize.sh and bitdepth.sh being run across $XRESPROBE_RIG_LOG.
+    XRESPROBE_RIG=ddc results in ddcprobe.sh being run across
+    $XRESPROBE_RIG_DDC.  Driver will be taken from $XRESPROBE_DRIVER; bit
+    depth check is run across $XRESPROBE_RIG_LOG, if it exists.
+  * Add Replaces on kudzu-vesa (thanks, Otavio Salvador).
+  * Add patch from Petter Reinholdtsen to fix compilation with gcc 2.95.
+
+ -- Daniel Stone <daniel.stone@ubuntu.com>  Thu, 17 Mar 2005 10:58:01 +1100
+
 xresprobe (0.4.15) hoary; urgency=low
 
   * Add patch from Sven Luther to walk /sys looking for EDID data exported by

Modified: vendor/debian/control
===================================================================
--- vendor/debian/control	2005-03-24 01:15:06 UTC (rev 22)
+++ vendor/debian/control	2005-03-24 01:24:27 UTC (rev 23)
@@ -9,6 +9,9 @@
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Recommends: laptop-detect
+Replaces: kudzu-vesa
+Conflicts: kudzu-vesa
+Provides: kudzu-vesa
 Description: X Resolution Probe
  xresprobe is a package that probes both laptop and DDC-compliant screens for
  their standard resolutions, and returns a specifically-formatted, easy-to-parse

Added: vendor/rigprobe.sh
===================================================================
--- vendor/rigprobe.sh	2005-03-24 01:15:06 UTC (rev 22)
+++ vendor/rigprobe.sh	2005-03-24 01:24:27 UTC (rev 23)
@@ -0,0 +1,109 @@
+#!/bin/sh
+# Usage: rigprobe.sh driver screentype laptop
+# Copyright (C) 2005 Canonical Ltd
+# Author: Daniel Stone <daniel.stone@ubuntu.com>
+# 
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; version 2 of the License.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License with
+#  the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL-2;
+#  if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+#  Suite 330, Boston, MA  02111-1307  USA
+#
+# On Debian systems, the complete text of the GNU General Public
+# License, version 2, can be found in /usr/share/common-licenses/GPL-2.
+
+DATADIR="/usr/share/xresprobe"
+
+if [ -n "$XRESPROBE_DRIVER" ]; then
+  DRIVER="$XRESPROBE_DRIVER"
+else
+  DRIVER="$1"
+fi
+if [ -n "$XRESPROBE_DEBUG" ]; then
+  echo "rigprobe: assuming $DRIVER as driver" >&2
+fi
+
+SCREENTYPE="$2"
+LAPTOP="$3"
+
+rignoddc() {
+  if [ -n "$XRESPROBE_DEBUG" ]; then
+    echo "rigprobe: returning failed DDC" >&2
+  fi
+  if [ -n "$LAPTOP" ]; then
+    DISPTYPE="lcd/lvds"
+  fi
+}
+
+rigddc() {
+  if [ -n "$XRESPROBE_DEBUG" ]; then
+    echo "rigprobe: returning DDC from $XRESPROBE_RIG_DDC" >&2
+  fi
+  DDCOUT="$("$DATADIR/ddcprobe.sh" "$XRESPROBE_RIG_DDC")"
+  RETCODE="$?"
+  RES="$(echo "$DDCOUT" | grep "^res:" | sed -e 's/^res: *//;')"
+  IDENTIFIER="$(echo "$DDCOUT" | grep "^name:" | sed -e 's/^name: *//;')"
+  FREQ="$(echo "$DDCOUT" | grep "^freq:" | sed -e 's/^freq: *//;')"
+  DISPTYPE="$(echo "$DDCOUT" | grep "^disptype:" | sed -e 's/^disptype: *//;')"
+
+  # well, not necessarily, but it's a pretty good guess
+  if [ -n "$DISPTYPE" ] && [ "$DISPTYPE" = "lcd" ]; then
+    DISPTYPE="lcd/tmds"
+  fi
+}
+
+rigprobe() {
+  if [ -n "$XRESPROBE_DEBUG" ]; then
+    echo "rigprobe: returning LCD size from $XRESPROBE_RIG_LOG" >&2
+  fi
+  RES="$("$DATADIR/lcdsize.sh" $DRIVER $XRESPROBE_RIG_LOG)"
+}
+
+rigdepth() {
+  if [ -n "$XRESPROBE_DEBUG" ]; then
+    echo "rigprobe: checking for broken i8xx BIOS with no 24bpp modes" >&2
+    echo "          from $XRESPROBE_RIG_LOG" >&2
+  fi
+  FORCEDEPTH="$("$DATADIR/bitdepth.sh" $DRIVER $XRESPROBE_RIG_LOG)"
+}
+
+if [ "$XRESPROBE_RIG" = "noddc" ]; then
+  rignoddc
+elif [ "$XRESPROBE_RIG" = "ddc" ]; then
+  rigddc
+elif [ "$XRESPROBE_RIG" = "probe" ]; then
+  rigprobe
+fi
+
+if [ "$DRIVER" = "i810" ] && [ -n "$XRESPROBE_RIG_LOG" ] && \
+   [ -e "$XRESPROBE_RIG_LOG" ]; then
+  rigdepth
+fi
+
+if [ -n "$XRESPROBE_DEBUG" ]; then
+  echo "id: $IDENTIFIER" >&2
+  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
+
+exit 0


Property changes on: vendor/rigprobe.sh
___________________________________________________________________
Name: svn:executable
   + *

Modified: vendor/xresprobe
===================================================================
--- vendor/xresprobe	2005-03-24 01:15:06 UTC (rev 22)
+++ vendor/xresprobe	2005-03-24 01:24:27 UTC (rev 23)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Usage: xresprobe driver
+# Usage: xresprobe driver [screentype]
 # Copyright (C) 2004 Canonical Ltd
 # Author: Daniel Stone <daniel.stone@ubuntu.com>
 # 
@@ -60,6 +60,13 @@
   echo "laptop: $LAPTOP; ddc: $DDC" >&2
 fi
 
+if [ -n "$XRESPROBE_RIG" ]; then
+  if [ -n "$XRESPROBE_DEBUG" ]; then
+    echo "xresprobe: rigging results for $XRESPROBE_RIG" >&2
+  fi
+  exec "$DATADIR/rigprobe.sh" $DRIVER $SCREENTYPE $LAPTOP
+fi
+
 doddc() {
   if [ -n "$XRESPROBE_DEBUG" ]; then
     echo "attempting DDC detection" >&2



Reply to: