diff options
author | jhartmann <jhartmann> | 2000-03-16 03:37:29 +0000 |
---|---|---|
committer | jhartmann <jhartmann> | 2000-03-16 03:37:29 +0000 |
commit | dbfdbdf2daa5f159d7a0e88ac3ec6de3f2915d9f (patch) | |
tree | 0f8c858a1252c25efe22f0105e4e90af90503fdd /xc/programs/Xserver/hw/xfree86/drivers/tdfx | |
parent | 0cf0f696438eca09b6d27cd555bf638227b43c4f (diff) |
Merge with 4.0X_4_0-20000315-merge
Diffstat (limited to 'xc/programs/Xserver/hw/xfree86/drivers/tdfx')
4 files changed, 70 insertions, 24 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/Imakefile b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/Imakefile index fe93a600f..4fe4392cb 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/Imakefile +++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/Imakefile,v 1.10 2000/02/15 19:19:21 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/Imakefile,v 1.12 2000/03/03 01:05:43 dawes Exp $ XCOMM XCOMM This is the Imakefile for the TDFX driver. XCOMM @@ -37,7 +37,7 @@ INCLUDES = -I. -I$(XF86COMSRC) -I$(XF86OSSRC) \ -I$(XF86SRC)/xaa -I$(XF86SRC)/rac -I$(XF86SRC)/int10 \ -I$(SERVERSRC)/cfb -I$(XF86SRC)/xaa -I$(XF86SRC)/ramdac \ -I$(XF86SRC)/vgahw -I$(XF86SRC)/ddc -I$(XF86SRC)/i2c \ - -I$(SERVERSRC)/Xext \ + -I$(XF86SRC)/ddc -I$(XF86OSSRC)/vbe -I$(SERVERSRC)/Xext \ -I$(FONTINCSRC) -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ -I$(EXTINCSRC) \ $(DRIINCLUDES) @@ -55,9 +55,10 @@ ObjectModuleTarget(tdfx,$(OBJS)) InstallObjectModule(tdfx,$(MODULEDIR),drivers) -XCOMM To install a man page remove the x and add these lines -XCOMM xCppManTarget(tdfx,) -XCOMM xInstallModuleManPage(tdfx) +#if !defined(XF86DriverSDK) +CppManTarget(tdfx,) +InstallModuleManPage(tdfx) +#endif DependTarget() diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c index d5cf1cbae..14365b441 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c,v 1.8 2000/02/20 04:12:40 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c,v 1.9 2000/03/02 16:07:52 martin Exp $ */ /* All drivers should typically include these */ #include "xf86.h" diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c index 105e1caee..371b3740c 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c @@ -25,7 +25,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c,v 1.21 2000/02/21 19:23:09 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c,v 1.30 2000/03/06 23:54:13 dawes Exp $ */ /* * Authors: @@ -49,7 +49,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "xf86_OSproc.h" #include "xf86Resources.h" #include "xf86RAC.h" -#include "xf86int10.h" +#include "vbe.h" #include "xf86cmap.h" /* If the driver uses port I/O directly, it needs: */ @@ -254,6 +254,18 @@ static const char *ramdacSymbols[] = { NULL }; +static const char *ddcSymbols[] = { + "xf86PrintEDID", + "xf86DoEDID_DDC1", + NULL +}; + +static const char *vbeSymbols[] = { + "VBEInit", + "vbeDoEDID", + NULL +}; + #ifdef XF86DRI static const char *drmSymbols[] = { "drmAddBufs", @@ -328,7 +340,7 @@ tdfxSetup(pointer module, pointer opts, int *errmaj, int *errmin) * might refer to. */ LoaderRefSymLists(vgahwSymbols, cfbSymbols, xaaSymbols, - xf8_32bppSymbols, ramdacSymbols, + xf8_32bppSymbols, ramdacSymbols, vbeSymbols, #ifdef XF86DRI drmSymbols, driSymbols, #endif @@ -420,9 +432,8 @@ TDFXProbe(DriverPtr drv, int flags) { if (numUsed<=0) return FALSE; if (flags & PROBE_DETECT) - return TRUE; - - for (i=0; i<numUsed; i++) { + foundScreen = TRUE; + else for (i=0; i<numUsed; i++) { ScrnInfoPtr pScrn; /* Allocate new ScrnInfoRec and claim the slot */ @@ -531,6 +542,19 @@ TDFXCountRam(ScrnInfoPtr pScrn) { return memSize*1024; } +extern xf86MonPtr ConfiguredMonitor; + +void +TDFXProbeDDC(ScrnInfoPtr pScrn, int index) +{ + vbeInfoPtr pVbe; + if (xf86LoadSubModule(pScrn, "vbe")) { + pVbe = VBEInit(NULL,index); + ConfiguredMonitor = vbeDoEDID(pVbe); + } +} + + /* * TDFXPreInit -- * @@ -552,14 +576,6 @@ TDFXPreInit(ScrnInfoPtr pScrn, int flags) { TDFXTRACE("TDFXPreInit start\n"); if (pScrn->numEntities != 1) return FALSE; - /* The vgahw module should be loaded here when needed */ - if (!xf86LoadSubModule(pScrn, "vgahw")) return FALSE; - - xf86LoaderReqSymLists(vgahwSymbols, NULL); - - /* Allocate a vgaHWRec */ - if (!vgaHWGetHWRec(pScrn)) return FALSE; - /* Allocate driverPrivate */ if (!TDFXGetRec(pScrn)) { return FALSE; @@ -601,6 +617,11 @@ TDFXPreInit(ScrnInfoPtr pScrn, int flags) { else pScrn->racMemFlags = RAC_FB | RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT; + if (flags & PROBE_DETECT) { + TDFXProbeDDC(pScrn, pTDFX->pEnt->index); + return FALSE; + } + /* Set pScrn->monitor */ pScrn->monitor = pScrn->confScreen->monitor; @@ -641,6 +662,14 @@ TDFXPreInit(ScrnInfoPtr pScrn, int flags) { } } + /* The vgahw module should be loaded here when needed */ + if (!xf86LoadSubModule(pScrn, "vgahw")) return FALSE; + + xf86LoaderReqSymLists(vgahwSymbols, NULL); + + /* Allocate a vgaHWRec */ + if (!vgaHWGetHWRec(pScrn)) return FALSE; + /* We use a programamble clock */ pScrn->progClock = TRUE; @@ -861,6 +890,22 @@ TDFXPreInit(ScrnInfoPtr pScrn, int flags) { xf86LoaderReqSymLists(ramdacSymbols, NULL); } + /* Load DDC if needed */ + /* This gives us DDC1 - we should be able to get DDC2B using i2c */ + if (!xf86LoadSubModule(pScrn, "ddc")) { + TDFXFreeRec(pScrn); + return FALSE; + } + xf86LoaderReqSymLists(ddcSymbols, NULL); + + /* Initialize DDC1 if possible */ + if (xf86LoadSubModule(pScrn, "vbe")) { + xf86MonPtr pMon; + pMon = vbeDoEDID(VBEInit(NULL,pTDFX->pEnt->index)); + xf86SetDDCproperties(pScrn,xf86PrintEDID(pMon)); + } + + /* We wont be using the VGA access after the probe */ if (!xf86ReturnOptValBool(TDFXOptions, OPTION_USE_PIO, FALSE)) { resRange vgaio[] = { {ResShrIoBlock,0x3B0,0x3BB}, @@ -1224,7 +1269,8 @@ TDFXInitVGA(ScrnInfoPtr pScrn) tdfxReg->vidcfg = SST_VIDEO_PROCESSOR_EN | SST_CURSOR_X11 | SST_DESKTOP_EN | (pTDFX->cpp-1)<<SST_DESKTOP_PIXEL_FORMAT_SHIFT; - + tdfxReg->vidcfg |= SST_DESKTOP_CLUT_BYPASS; + tdfxReg->stride = pTDFX->stride; tdfxReg->clip0min = tdfxReg->clip1min = 0; @@ -1714,7 +1760,7 @@ TDFXScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) { XF86VideoAdaptorPtr *ptr; int n; - n = xf86XVListGenericAdaptors(&ptr); + n = xf86XVListGenericAdaptors(pScrn,&ptr); if (n) { xf86XVScreenInit(pScreen, ptr, n); } diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_io.c b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_io.c index fb0efcbf2..62b883a16 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_io.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_io.c @@ -24,13 +24,12 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_io.c,v 1.3 1999/12/03 19:17:36 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_io.c,v 1.4 2000/02/23 04:47:21 martin Exp $ */ /* * Authors: * Daryll Strauss <daryll@precisioninsight.com> * - * $PI$ */ #include "xf86.h" |