pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/x11 Add xf86-video-tdfx-1.3.0 for modular-xorg, packag...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ee11d1a13c61
branches:  trunk
changeset: 527503:ee11d1a13c61
user:      xtraeme <xtraeme%pkgsrc.org@localhost>
date:      Mon Apr 09 14:28:00 2007 +0000

description:
Add xf86-video-tdfx-1.3.0 for modular-xorg, packaged by jmcneill@.

This is the 3Dfx video driver for the modular Xorg server.
Supported video cards: Voodoo Banshee, Voodoo3, Voodoo4 and Voodoo5.

diffstat:

 x11/Makefile                         |    3 +-
 x11/xf86-video-tdfx/DESCR            |    2 +
 x11/xf86-video-tdfx/Makefile         |   25 +++
 x11/xf86-video-tdfx/PLIST            |    6 +
 x11/xf86-video-tdfx/distinfo         |    7 +
 x11/xf86-video-tdfx/patches/patch-aa |   33 ++++
 x11/xf86-video-tdfx/patches/patch-ab |  235 +++++++++++++++++++++++++++++++++++
 7 files changed, 310 insertions(+), 1 deletions(-)

diffs (truncated from 349 to 300 lines):

diff -r b11df60dd7d9 -r ee11d1a13c61 x11/Makefile
--- a/x11/Makefile      Mon Apr 09 12:53:33 2007 +0000
+++ b/x11/Makefile      Mon Apr 09 14:28:00 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.488 2007/03/23 20:21:57 kristerw Exp $
+# $NetBSD: Makefile,v 1.489 2007/04/09 14:28:00 xtraeme Exp $
 #
 
 COMMENT=       Packages to support the X window system
@@ -376,6 +376,7 @@
 SUBDIR+=       xf86-video-savage
 SUBDIR+=       xf86-video-siliconmotion
 SUBDIR+=       xf86-video-sis
+SUBDIR+=       xf86-video-tdfx
 SUBDIR+=       xf86-video-tga
 SUBDIR+=       xf86-video-trident
 SUBDIR+=       xf86-video-tseng
diff -r b11df60dd7d9 -r ee11d1a13c61 x11/xf86-video-tdfx/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/xf86-video-tdfx/DESCR Mon Apr 09 14:28:00 2007 +0000
@@ -0,0 +1,2 @@
+This is the 3Dfx video driver for the modular Xorg server.
+Supported video cards: Voodoo Banshee, Voodoo3, Voodoo4 and Voodoo5.
diff -r b11df60dd7d9 -r ee11d1a13c61 x11/xf86-video-tdfx/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/xf86-video-tdfx/Makefile      Mon Apr 09 14:28:00 2007 +0000
@@ -0,0 +1,25 @@
+# $NetBSD: Makefile,v 1.1 2007/04/09 14:28:00 xtraeme Exp $
+#
+
+DISTNAME=      xf86-video-tdfx-1.3.0
+CATEGORIES=    x11
+MASTER_SITES=  http://xorg.freedesktop.org/releases/individual/driver/
+EXTRACT_SUFX=  .tar.bz2
+
+MAINTAINER=    joerg%NetBSD.org@localhost
+COMMENT=       Modular Xorg 3Dfx video driver
+
+PKG_DESTDIR_SUPPORT=    user-destdir
+
+USE_LIBTOOL=    yes
+GNU_CONFIGURE=  yes
+USE_TOOLS+=     pkg-config
+
+.include "../../x11/modular-xorg-server/buildlink3.mk"
+.include "../../x11/randrproto/buildlink3.mk"
+.include "../../x11/renderproto/buildlink3.mk"
+.include "../../x11/videoproto/buildlink3.mk"
+.include "../../x11/xextproto/buildlink3.mk"
+.include "../../x11/glproto/buildlink3.mk"
+.include "../../graphics/MesaLib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r b11df60dd7d9 -r ee11d1a13c61 x11/xf86-video-tdfx/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/xf86-video-tdfx/PLIST Mon Apr 09 14:28:00 2007 +0000
@@ -0,0 +1,6 @@
+@comment $NetBSD: PLIST,v 1.1 2007/04/09 14:28:00 xtraeme Exp $
+lib/xorg/modules/drivers/tdfx_drv.la
+man/man4/tdfx.4
+@comment @dirrm lib/xorg/modules/drivers
+@comment @dirrm lib/xorg/modules
+@comment @dirrm lib/xorg
diff -r b11df60dd7d9 -r ee11d1a13c61 x11/xf86-video-tdfx/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/xf86-video-tdfx/distinfo      Mon Apr 09 14:28:00 2007 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2007/04/09 14:28:00 xtraeme Exp $
+
+SHA1 (xf86-video-tdfx-1.3.0.tar.bz2) = 8089883c87b64c2876b9152b4820901cc6273f57
+RMD160 (xf86-video-tdfx-1.3.0.tar.bz2) = 31fc8fa884ad669278344164bc7118b1f5edcec8
+Size (xf86-video-tdfx-1.3.0.tar.bz2) = 261448 bytes
+SHA1 (patch-aa) = c6a83f95062b7e7cdf4eedab6dfb1112def41bb9
+SHA1 (patch-ab) = c6167275098624bc3542306f10bfde81f3e9ff7f
diff -r b11df60dd7d9 -r ee11d1a13c61 x11/xf86-video-tdfx/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/xf86-video-tdfx/patches/patch-aa      Mon Apr 09 14:28:00 2007 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-aa,v 1.1 2007/04/09 14:28:01 xtraeme Exp $
+
+--- src/tdfxdefs.h.orig        2007-03-27 07:50:42.000000000 -0400
++++ src/tdfxdefs.h     2007-03-27 08:14:29.000000000 -0400
+@@ -384,4 +384,28 @@
+ 
+ #define SST_POWERDOWN_DAC               BIT(8)
+ 
++/* VIDSERIALPARALELPORT */
++#define VSP_TVOUT_RESET 0x80000000      /* 0 forces TVout reset */
++#define VSP_GPIO2_IN    0x40000000
++#define VSP_GPIO1_OUT   0x20000000
++#define VSP_VMI_RESET_N 0x10000000      /* 0 forces a VMI reset */
++#define VSP_SDA1_IN     0x08000000      /* i2c bus on the feature connector */
++#define VSP_SCL1_IN     0x04000000
++#define VSP_SDA1_OUT    0x02000000
++#define VSP_SCL1_OUT    0x01000000
++#define VSP_ENABLE_IIC1 0x00800000      /* 1 enables I2C bus 1 */
++#define VSP_SDA0_IN     0x00400000      /* i2c bus on the monitor connector */
++#define VSP_SCL0_IN     0x00200000
++#define VSP_SDA0_OUT    0x00100000
++#define VSP_SCL0_OUT    0x00080000
++#define VSP_ENABLE_IIC0 0x00040000      /* 1 enables I2C bus 0 */
++#define VSP_VMI_ADDRESS 0x0003c000      /* mask */
++#define VSP_VMI_DATA    0x00003fc0      /* mask */
++#define VSP_VMI_DISABLE 0x00000020      /* 0 enables VMI output */
++#define VSP_VMI_RDY_N   0x00000010
++#define VSP_RW_N        0x00000008
++#define VSP_DS_N        0x00000004
++#define VSP_CS_N        0x00000002
++#define VSP_HOST_ENABLE 0x00000001      /* 1 enables VMI host control*/
++
+ #endif
diff -r b11df60dd7d9 -r ee11d1a13c61 x11/xf86-video-tdfx/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/xf86-video-tdfx/patches/patch-ab      Mon Apr 09 14:28:00 2007 +0000
@@ -0,0 +1,235 @@
+$NetBSD: patch-ab,v 1.1 2007/04/09 14:28:01 xtraeme Exp $
+
+--- src/tdfx_driver.c.orig     2006-09-02 14:03:07.000000000 -0400
++++ src/tdfx_driver.c  2007-03-27 23:19:20.000000000 -0400
+@@ -141,6 +141,8 @@
+ static void TDFXDisplayPowerManagementSet(ScrnInfoPtr pScrn, 
+                                       int PowerManagermentMode, int flags);
+ 
++static xf86MonPtr doTDFXDDC(ScrnInfoPtr pScrn);
++
+ _X_EXPORT DriverRec TDFX = {
+   TDFX_VERSION,
+   TDFX_DRIVER_NAME,
+@@ -217,6 +219,13 @@
+ static const char *ddcSymbols[] = {
+     "xf86PrintEDID",
+     "xf86SetDDCproperties",
++    "xf86DoEDID_DDC2",
++    NULL
++};
++
++static const char *i2cSymbols[] = {
++    "xf86CreateI2CBusRec",
++    "xf86I2CBusInit",
+     NULL
+ };
+ 
+@@ -677,6 +686,7 @@
+ {
+   TDFXPtr pTDFX;
+   ClockRangePtr clockRanges;
++  xf86MonPtr pMon;
+   int i;
+   MessageType from;
+   int flags24;
+@@ -978,32 +988,6 @@
+   availableMem = pScrn->videoRam - 4096 -
+                (((255 <= CMDFIFO_PAGES) ? 255 : CMDFIFO_PAGES) << 12);
+ 
+-  i = xf86ValidateModes(pScrn, pScrn->monitor->Modes,
+-                      pScrn->display->modes, clockRanges,
+-                      0, 320, 2048, 16*pScrn->bitsPerPixel, 
+-                      200, 2047,
+-                      pScrn->display->virtualX, pScrn->display->virtualY,
+-                      availableMem, LOOKUP_BEST_REFRESH);
+-
+-  if (i==-1) {
+-    TDFXFreeRec(pScrn);
+-    return FALSE;
+-  }
+-
+-  xf86PruneDriverModes(pScrn);
+-
+-  if (!i || !pScrn->modes) {
+-    xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid modes found\n");
+-    TDFXFreeRec(pScrn);
+-    return FALSE;
+-  }
+-
+-  xf86SetCrtcForModes(pScrn, 0);
+-
+-  pScrn->currentMode = pScrn->modes;
+-
+-  xf86PrintModes(pScrn);
+-
+   xf86SetDpi(pScrn, 0, 0);
+ 
+   if (!xf86LoadSubModule(pScrn, "fb")) {
+@@ -1046,18 +1030,26 @@
+     xf86LoaderReqSymLists(ramdacSymbols, NULL);
+   }
+ 
+-#if USE_INT10
+-#if !defined(__powerpc__)
+-  /* Load DDC if needed */
+-  /* This gives us DDC1 - we should be able to get DDC2B using i2c */
++  if (!xf86LoadSubModule(pScrn, "i2c")) {
++    TDFXFreeRec(pScrn);
++    return FALSE;
++  }
++  xf86LoaderReqSymLists(i2cSymbols, NULL);
++
+   if (!xf86LoadSubModule(pScrn, "ddc")) {
+     TDFXFreeRec(pScrn);
+     return FALSE;
+   }
+   xf86LoaderReqSymLists(ddcSymbols, NULL);
+ 
+-  /* Initialize DDC1 if possible */
+-  if (xf86LoadSubModule(pScrn, "vbe")) {
++  pMon = doTDFXDDC(pScrn);
++  if (pMon != NULL) {
++    xf86SetDDCproperties(pScrn, xf86PrintEDID(pMon));
++  } else {
++    /* Initialize DDC1 if possible */
++#if USE_INT10
++#if !defined(__powerpc__)
++    if (xf86LoadSubModule(pScrn, "vbe")) {
+       xf86MonPtr pMon;
+       vbeInfoPtr pVbe = VBEInit(NULL,pTDFX->pEnt->index);
+ 
+@@ -1065,14 +1057,40 @@
+       pMon = vbeDoEDID(pVbe, NULL);
+       vbeFree(pVbe);
+       xf86SetDDCproperties(pScrn,xf86PrintEDID(pMon));
+-  }
++    }
+ #endif
+ #endif
++  }
+ 
+   if (xf86ReturnOptValBool(pTDFX->Options, OPTION_USE_PIO, FALSE)) {
+     pTDFX->usePIO=TRUE;
+   }
+ 
++  i = xf86ValidateModes(pScrn, pScrn->monitor->Modes,
++              pScrn->display->modes, clockRanges,
++              0, 320, 2048, 16*pScrn->bitsPerPixel,
++              200, 2047,
++              pScrn->display->virtualX, pScrn->display->virtualY,
++              availableMem, LOOKUP_BEST_REFRESH);
++  if (i==-1) {
++    TDFXFreeRec(pScrn);
++    return FALSE;
++  }
++
++  xf86PruneDriverModes(pScrn);
++
++  if (!i || !pScrn->modes) {
++    xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid modes found\n");
++    TDFXFreeRec(pScrn);
++    return FALSE;
++  }
++
++  xf86SetCrtcForModes(pScrn, 0);
++
++  pScrn->currentMode = pScrn->modes;
++
++  xf86PrintModes(pScrn);
++
+ #if X_BYTE_ORDER == X_BIG_ENDIAN
+   pTDFX->ModeReg.miscinit0 = pTDFX->readLong(pTDFX, MISCINIT0);
+   pTDFX->SavedReg.miscinit0 = pTDFX->ModeReg.miscinit0;
+@@ -1640,8 +1658,8 @@
+ 
+   /* Calculate the CRTC values */
+   hd = (mode->CrtcHDisplay>>3)-1;
+-  hss = (mode->CrtcHSyncStart>>3);
+-  hse = (mode->CrtcHSyncEnd>>3);
++  hss = (mode->CrtcHSyncStart>>3)-1;
++  hse = (mode->CrtcHSyncEnd>>3)-1;
+   ht = (mode->CrtcHTotal>>3)-5;
+   hbs = (mode->CrtcHBlankStart>>3)-1;
+   hbe = (mode->CrtcHBlankEnd>>3)-1;
+@@ -2524,3 +2542,80 @@
+   dacmode|=state;
+   pTDFX->writeLong(pTDFX, DACMODE, dacmode);
+ }
++
++void
++TDFXPutBits(I2CBusPtr b, int  scl, int  sda)
++{
++  TDFXPtr pTDFX;
++  CARD32 reg;
++
++  pTDFX = b->DriverPrivate.ptr;
++  reg = pTDFX->readLong(pTDFX, VIDSERIALPARALLELPORT);
++  reg = (reg & ~(VSP_SDA0_OUT | VSP_SCL0_OUT)) |
++        (scl ? VSP_SCL0_OUT : 0) |
++        (sda ? VSP_SDA0_OUT : 0);
++  pTDFX->writeLong(pTDFX, VIDSERIALPARALLELPORT, reg);
++  (void)pTDFX->readLong(pTDFX, VIDSERIALPARALLELPORT); /* flush */
++}
++
++void
++TDFXGetBits(I2CBusPtr b, int *scl, int *sda)
++{
++  TDFXPtr pTDFX;
++  CARD32 reg;
++
++  pTDFX = b->DriverPrivate.ptr;
++
++  reg = pTDFX->readLong(pTDFX, VIDSERIALPARALLELPORT);
++  *sda = (reg & VSP_SDA0_IN) ? 1 : 0;
++  *scl = (reg & VSP_SCL0_IN) ? 1 : 0;
++}



Home | Main Index | Thread Index | Old Index