/* ** sst1InitDacDetect(): ** Detect type of on-board DAC ** NOTE: sst1InitDacDetect() resets the PCI fifo and the graphics subsystem ** of FBI ** */ FX_EXPORT FxBool FX_CSTYLE sst1InitDacDetect(FxU32 * sstbase) { FxU32 n; FxU32 fbiInit1_save; FxU32 fbiInit2_save; volatile Sstregs *sst = (Sstregs *) sstbase; FxBool retVal = FXFALSE; int helper = (GETENV(("SST_DEBUGDAC"))) ? 1 : 0; if(!sst) return(FXFALSE); if(helper) INIT_PRINTF(("sst1InitDacDetect(): Entered...\n")); sst1InitIdleFBINoNOP(sstbase); /* Save init register states before overwriting them */ fbiInit1_save = IGET(sst->fbiInit1); fbiInit2_save = IGET(sst->fbiInit2); /* Reset video unit to guarantee no contentions on the memory bus */ ISET(sst->fbiInit1, IGET(sst->fbiInit1) | SST_VIDEO_RESET); /* Turn off dram refresh to guarantee no contentions on the memory bus */ ISET(sst->fbiInit2, IGET(sst->fbiInit2) & ~SST_EN_DRAM_REFRESH); sst1InitIdleFBINoNOP(sstbase); /* Enable reads from the DAC (multiplexed on the fbiInit2 address) */ /* Disallow writes to pass through the PCI FIFO */ PCICFG_WR(SST1_PCI_INIT_ENABLE, SST_INITWR_EN | SST_FBIINIT23_REMAP); sst1InitIdleFBINoNOP(sstbase); if(sst1InitUseVoodooFile == FXTRUE) { retVal = sst1InitDacDetectINI(sstbase); } else { if((retVal = sst1InitDacDetectICS(sstbase)) == FXTRUE) goto done; if((retVal = sst1InitDacDetectATT(sstbase)) == FXTRUE) goto done; retVal = sst1InitDacDetectTI(sstbase); } done: /* Disable fbiinit23 address remapping */ PCICFG_WR(SST1_PCI_INIT_ENABLE, SST_INITWR_EN | SST_PCI_FIFOWR_EN); /* Restore init register states */ sst1InitIdleFBINoNOP(sstbase); ISET(sst->fbiInit1, fbiInit1_save); ISET(sst->fbiInit2, fbiInit2_save); sst1InitIdleFBINoNOP(sstbase); return(retVal); }
/* ** sst1InitDacWr(): ** Write to external DAC registers ** NOTE: The video unit of FBI must be in reset before calling this routine. ** The rendering engines of FBI and TREX must be idle before calling ** this routine. ** ** Valid addresses are 0 <= addr <= 3 ** */ FX_EXPORT void FX_CSTYLE sst1InitDacWr(FxU32 *sstbase, FxU32 addr, FxU32 data) { volatile Sstregs *sst = (Sstregs *) sstbase; static FxBool firstPass = FXTRUE; static int helper; if(firstPass == FXTRUE) { firstPass = FXFALSE; helper = (GETENV(("SST_DEBUGDAC"))) ? 1 : 0; } ISET(sst->dacData, (data & SST_DACDATA_DATA) | ((addr) << SST_DACDATA_ADDR_SHIFT) | SST_DACDATA_WR); sst1InitIdleFBINoNOP(sstbase); if(helper) INIT_PRINTF(("dacWr(0x%x,0x%x)\n", addr, data)); }
/* ** sst1InitDacRd(): ** Read external DAC registers ** NOTE: The video unit of FBI must be in reset before calling this routine. ** The rendering engines of FBI and TREX must be idle before calling ** this routine. ** fbiInit23 register remapping (PCI config. initEnable[2]=1) must be ** enabled before calling this routine ** ** Valid addresses are 0 <= addr <= 3 ** */ FX_EXPORT FxU32 FX_CSTYLE sst1InitDacRd(FxU32 *sstbase, FxU32 addr) { volatile Sstregs *sst = (Sstregs *) sstbase; FxU32 retVal; static FxBool firstPass = FXTRUE; static int helper; if(firstPass == FXTRUE) { firstPass = FXFALSE; helper = (GETENV(("SST_DEBUGDAC"))) ? 1 : 0; } ISET(sst->dacData, ((addr) << SST_DACDATA_ADDR_SHIFT) | SST_DACDATA_RD); sst1InitIdleFBINoNOP(sstbase); retVal = IGET(sst->fbiInit2) & SST_DACDATA_DATA; if(helper) INIT_PRINTF(("dacRd(0x%x,0x%x)\n", addr, retVal)); return(retVal); }
@item --default-PCB-height <num> Default height of the canvas. Default value is @code{5000mil}. @end ftable %end-doc */ CSET (MaxHeight, MIL_TO_COORD(5000), "default-PCB-height", "default height of the canvas"), /* %start-doc options "5 Sizes" @ftable @code @item --text-scale <num> Default text scale. This value is in percent. Default value is @code{100}. @end ftable %end-doc */ ISET (TextScale, 100, "text-scale", "default text scale in percent"), /* %start-doc options "5 Sizes" @ftable @code @item --alignment-distance <num> Specifies the distance between the board outline and alignment targets. Default value is @code{2mil}. @end ftable %end-doc */ CSET (AlignmentDistance, MIL_TO_COORD(2), "alignment-distance", "distance between the boards outline and alignment targets"), /* %start-doc options "7 DRC Options" All parameters should be given with an unit. If no unit is given, 1/100 mil (cmil) will be used for backward compability. Valid units are given in section