So I have no idea what I'm doing, but the following patch (pretty much copied
from 3.3's driver) makes XFree 4 work on an ancient X terminal (with an ISA
ET4000/W32i) here. Would it be possible for this to be included?
BTW, can anyone point me to a spec for this thing?
--- patch begins here
--- xc/programs/Xserver/hw/xfree86/drivers/tseng/tseng_driver.c~ Tue Jan 29
06:22:35 2002
+++ xc/programs/Xserver/hw/xfree86/drivers/tseng/tseng_driver.c Thu Jan 31 18:58:01
+2002
@@ -94,6 +94,7 @@
static void TsengLock(void);
static Bool ET4000DetailedProbe(t_tseng_type * chiptype, t_w32_revid * rev);
+static Bool ET4000MinimalProbe(void);
/*
* This is intentionally screen-independent. It indicates the binding
@@ -459,7 +460,6 @@
* This code is only called when the chipset is not given beforehand,
* and if the PCI code hasn't detected one previously.
*/
-#if 0
static Bool
ET4000MinimalProbe(void)
{
@@ -499,13 +499,47 @@
}
return TRUE;
}
-#endif
static int
TsengFindIsaDevice(GDevPtr dev)
{
- /* XXX Need to implement this */
- return -1;
+ int found;
+ int origVal, newVal;
+
+ if (!ET4000MinimalProbe())
+ return -1;
+
+ /*
+ * Now check for an ET4000/W32.
+ * Test for writability of 0x3cb.
+ */
+
+ origVal = inb(0x3cb);
+ outb(0x3cb, origVal ^ 0x33); /* Arbitrary value */
+ newVal = inb(0x3cb);
+ outb(0x3cb, origVal);
+ if (newVal != origVal ^ 0x33) {
+ found = TYPE_ET4000;
+ } else {
+ int temp;
+ outb(0x217a, 0xec);
+ temp = inb(0x217b) >> 4;
+ switch(temp) {
+ case 0: /* ET4000/W32 */
+ found = TYPE_ET4000W32;
+ break;
+ case 1: /* ET4000/W32i */
+ case 3: /* ET4000/W32i rev b */
+ case 11: /* ET4000/W32I rev c */
+ found = TYPE_ET4000W32I;
+ break;
+ default:
+ found = -1;
+ xf86Msg(X_ERROR, "%s: Unknown ET4000 Chip ID: %d\n",
+ TSENG_NAME, temp);
+ }
+ }
+ return found;
}
static Bool
@@ -578,23 +612,26 @@
}
}
- /* Check for non-PCI cards */
- numUsed = xf86MatchIsaInstances(TSENG_NAME, TsengChipsets,
- TsengIsaChipsets,drv, TsengFindIsaDevice, devSections,
- numDevSections, &usedChips);
- if (numUsed > 0) {
- if (flags & PROBE_DETECT)
- foundScreen = TRUE;
- else for (i = 0; i < numUsed; i++) {
+ if (!foundScreen) {
+ /* Check for non-PCI cards */
+ numUsed = xf86MatchIsaInstances(TSENG_NAME, TsengChipsets,
+ TsengIsaChipsets,drv,
+ TsengFindIsaDevice, devSections,
+ numDevSections, &usedChips);
+ if (numUsed > 0) {
+ if (flags & PROBE_DETECT)
+ foundScreen = TRUE;
+ else for (i = 0; i < numUsed; i++) {
ScrnInfoPtr pScrn = NULL;
if ((pScrn = xf86ConfigIsaEntity(pScrn,0,usedChips[i],
- TsengIsaChipsets,NULL,
- NULL,NULL,NULL,NULL))) {
+ TsengIsaChipsets,NULL,
+ NULL,NULL,NULL,NULL))) {
TsengAssignFPtr(pScrn);
foundScreen = TRUE;
}
+ }
+ xfree(usedChips);
}
- xfree(usedChips);
}
xfree(devSections);
return foundScreen;
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert