/************************************************************************/ /* */ /* QUERY_M.C */ /* */ /* Copyright (c) 1992, ATI Technologies Incorporated. */ /************************************************************************/ /********************** PolyTron RCS Utilities $Revision: 1.24 $ $Date: 01 May 1996 14:11:40 $ $Author: RWolff $ $Log: S:/source/wnt/ms11/miniport/archive/query_m.c_v $ * * Rev 1.24 01 May 1996 14:11:40 RWolff * Locked out 24BPP on Alpha. * * Rev 1.23 23 Apr 1996 17:27:24 RWolff * Expanded lockout of 800x600 16BPP 72Hz to all Mach 32 cards, since * some VRAM cards are also affected. * * Rev 1.22 12 Apr 1996 16:16:36 RWolff * Now rejects 24BPP modes if linear aperture is not present, since new * source stream display driver can't do 24BPP in a paged aperture. This * rejection should be done in the display driver (the card still supports * the mode, but the display driver doesn't want to handle it), but at * the point where the display driver must decide to either accept or reject * modes, it doesn't have access to the aperture information. * * Rev 1.21 10 Apr 1996 17:02:04 RWolff * Locked out 800x600 16BPP 72Hz on DRAM cards, fix for checking * resolution-dependent special cases against a value which is * only set if the mode is installed. * * * Rev 1.20 23 Jan 1996 11:48:12 RWolff * Eliminated level 3 warnings, protected against false values of * TARGET_BUILD, added debug print statements, now assumes DEC Alpha * has a 2M card since the memory size check routine generates a * false value (4M) on this platform. * * Rev 1.19 11 Jan 1996 19:37:10 RWolff * Added maximum pixel clock rate to all calls to SetFixedModes(). * This is required as part of a Mach 64 fix. * * Rev 1.18 20 Jul 1995 17:58:56 mgrubac * Added support for VDIF files. * * Rev 1.17 31 Mar 1995 11:52:36 RWOLFF * Changed from all-or-nothing debug print statements to thresholds * depending on importance of the message. * * Rev 1.16 14 Mar 1995 15:59:58 ASHANMUG * Check wait for idle status before continuing block write test. * This fixes an Intel AX problem where the engine was hanging. * * Rev 1.15 23 Dec 1994 10:47:42 ASHANMUG * ALPHA/Chrontel-DAC * * Rev 1.14 18 Nov 1994 11:44:22 RWOLFF * Now detects STG1702/1703 DACs in native mode, added support for * split rasters. * * Rev 1.13 19 Aug 1994 17:13:16 RWOLFF * Added support for SC15026 DAC, Graphics Wonder, non-standard pixel * clock generators, and 1280x1024 70Hz and 74Hz. * * Rev 1.12 22 Jul 1994 17:48:24 RWOLFF * Merged with Richard's non-x86 code stream. * * Rev 1.11 30 Jun 1994 18:21:06 RWOLFF * Removed routine IsApertureConflict_m() (moved to SETUP_M.C), no longer * enables aperture while querying the card (aperture is now enabled in * IsApertureConflict_m() after we find that there is no conflict). * * Rev 1.10 15 Jun 1994 11:08:34 RWOLFF * Now lists block write as unavailable on DRAM cards, gives correct * vertical resolution if CRT parameters are stored in skip-1-2 format * (as is the case on some Graphics Ultra cards which were upgraded from * 512k to 1M) instead of the normal skip-2 format. * * Rev 1.9 20 May 1994 19:19:38 RWOLFF * No longer inserts phantom 16BPP mode table for resolutions where * 16BPP can be supported but which are not configured. * * Rev 1.8 20 May 1994 16:08:44 RWOLFF * Fix for 800x600 screen tearing on Intel BATMAN PCI motherboards. * * Rev 1.7 20 May 1994 14:02:58 RWOLFF * Ajith's change: no longer falsely detects NCR dual Pentium MCA card * as being susceptible to MIO bug. * * Rev 1.6 12 May 1994 11:17:44 RWOLFF * For Mach 32, now lists predefined refresh rates as available instead of * only the refresh rate stored in EEPROM, no longer makes 1024x768 87Hz * interlaced available if no 1024x768 mode configured, since the predefined * rates will allow all resolutions even on uninstalled cards. * For all cards, writes refresh rate to mode tables. * * Rev 1.5 27 Apr 1994 13:56:30 RWOLFF * Added routine IsMioBug_m() which checks to see if card has multiple * input/output bug. * * Rev 1.4 26 Apr 1994 12:43:44 RWOLFF * Put back use of 1024x768 interlaced when no 1024 resolution installed, * no longer uses 32BPP. * * Rev 1.3 31 Mar 1994 15:07:16 RWOLFF * Added debugging code. * * Rev 1.2 08 Feb 1994 19:01:32 RWOLFF * Removed unused routine get_num_modes_m(), no longer makes 1024x768 87Hz * interlaced available if Mach 32 card is configured with 1024x768 * set to "Not installed". * * Rev 1.1 07 Feb 1994 14:03:26 RWOLFF * Added alloc_text() pragmas to allow miniport to be swapped out when * not needed, removed routine GetMemoryNeeded_m() which was only called * by LookForSubstitute(), a routine removed from ATIMP.C. * * Rev 1.0 31 Jan 1994 11:12:34 RWOLFF * Initial revision. * * Rev 1.7 24 Jan 1994 18:08:16 RWOLFF * Now fills in 16 and 24 BPP mode tables for BT48x and AT&T 49[123] DACs * using dedicated (and undocumented) mode tables in the EEPROM rather * than expecting the mode set routine to multiply the pixel clock from * the 8BPP mode tables. * * Rev 1.6 14 Jan 1994 15:25:32 RWOLFF * Uses defined values for bus types, added routine to see if block write * mode is available. * * Rev 1.5 15 Dec 1993 15:28:14 RWOLFF * Added support for SC15021 DAC, hardcoded aperture location for * DEC ALPHA (BIOS can't initialize the registers). * * Rev 1.4 30 Nov 1993 18:28:44 RWOLFF * Added support for AT&T 498 DAC, removed dead code. * * Rev 1.3 10 Nov 1993 19:26:00 RWOLFF * GetTrueMemSize_m() now handles 1M cards correctly, doesn't depend on the * VGA aperture being available. * * Rev 1.2 05 Nov 1993 13:26:34 RWOLFF * Added support for PCI bus and STG1700 DAC. * * Rev 1.1 08 Oct 1993 11:13:40 RWOLFF * Added routine to get true amount of memory needed for a particular mode * on 8514/A-compatible ATI accelerators, and fix for BIOS bug that reports * less than the true amount of memory in MEM_SIZE_ALIAS field of MISC_OPTIONS. * * Rev 1.0 24 Sep 1993 11:52:28 RWOLFF * Initial revision. * * Rev 1.0 03 Sep 1993 14:24:08 RWOLFF * Initial revision. Rev 1.0 16 Aug 1993 13:28:54 Robert_Wolff Initial revision. Rev 1.31 06 Jul 1993 15:52:08 RWOLFF No longer sets mach32_split_fixup (support for non-production hardware). Rev 1.30 24 Jun 1993 16:18:18 RWOLFF Now inverts COMPOSITE_SYNC bit of m_clock_select field on Mach 8 cards, since the EEPROM holds the value to use when using the shadow sets and we use the primrary CRT register set. Now takes the proper byte of EEPROM word 0x13 when calculating the clock select for 1280x1024 on an 8514/ULTRA. Rev 1.29 18 Jun 1993 16:09:40 RWOLFF Fix for 68800 Rev. 3 hardware problem (screen pitch must be a multiple of 128 pixels, but no symptoms exhibited except at high colour depths with fast pixel clock). Rev 1.28 10 Jun 1993 15:55:18 RWOLFF Now uses static buffer rather than dynamic allocation for CRT parameter read by BIOS function call. Change originated by Andre Vachon at Microsoft. Rev 1.27 07 Jun 1993 11:44:00 BRADES Rev 6 split transfer fixup. Rev 1.25 12 May 1993 16:33:42 RWOLFF Changed test order for aperture calculations to avoid trouble due to undefined bits being 1 instead of 0. Rev 1.24 10 May 1993 16:39:28 RWOLFF Now recognizes maximum pixel depth of each possible DAC at all supported resolutions rather than assuming that TI34075 can handle 32 BPP at all resolutions while all other DACs can do 16 BPP at all resolutions but can't do 24 BPP. Rev 1.23 30 Apr 1993 16:42:24 RWOLFF Buffer for CRT parameter read via BIOS call is now dynamically allocated. Rev 1.22 24 Apr 1993 16:32:24 RWOLFF Now recognizes that 800x600 8BPP is not available on Mach 8 cards with 512k of accelerator memory, Mach 32 ASIC revision number is now recorded as the value read from the "revision code" register rather than the chip revision (i.e. Rev. 3 chip is recorded as Rev. 0), no longer falls back to 56Hz in 800x600 16BPP on 1M Mach 32 cards. Rev 1.21 21 Apr 1993 17:33:38 RWOLFF Now uses AMACH.H instead of 68800.H/68801.H. Added include file for error definitions. Added function to fill in the CRT tables on a Mach 32 using the BIOS function call