亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? atipreinit.c

?? x.org上有關ati系列顯卡最新驅動
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atipreinit.c,v 1.74 2003/12/22 17:48:09 tsi Exp $ *//* $XdotOrg: driver/xf86-video-ati/src/atipreinit.c,v 1.9 2005/08/28 18:10:34 ajax Exp $ *//* * Copyright 1999 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission.  Marc Aurele La France makes no representations * about the suitability of this software for any purpose.  It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */#ifdef HAVE_CONFIG_H#include "config.h"#endif#include <string.h>#include <stdio.h>#include "ati.h"#include "atiadapter.h"#include "atiadjust.h"#include "atiaudio.h"#include "atibus.h"#include "atichip.h"#include "aticonfig.h"#include "aticursor.h"#include "atidac.h"#include "atidsp.h"#include "atii2c.h"#include "atiident.h"#include "atiload.h"#include "atilock.h"#include "atimach64.h"#include "atimach64accel.h"#include "atimach64io.h"#include "atimode.h"#include "atipreinit.h"#include "atiprint.h"#include "atividmem.h"#include "atiwonderio.h"#include "atixv.h"#include "vbe.h"#include "xf86RAC.h"#ifndef AVOID_CPIOtypedef CARD16 Colour;          /* The correct spelling should be OK :-) *//* * Bit patterns which are extremely unlikely to show up when reading from * nonexistant memory (which normally shows up as either all bits set or all * bits clear). */static const Colour Test_Pixel[] = {0x5AA5U, 0x55AAU, 0xA55AU, 0xCA53U};static const struct{    int videoRamSize;    int Miscellaneous_Options_Setting;    struct    {        short int x, y;    }    Coordinates[NumberOf(Test_Pixel) + 1];}Test_Case[] ={    /*     * Given the engine settings used, only a 4M card will have enough memory     * to back up the 1025th line of the display.  Since the pixel coordinates     * are zero-based, line 1024 will be the first one which is only backed on     * 4M cards.     *     * <Mark_Weaver@brown.edu>:     * In case memory is being wrapped, (0,0) and (0,1024) to make sure they     * can each hold a unique value.     */    {4096, MEM_SIZE_4M, {{0,0}, {0,1024}, {-1,-1}}},    /*     * This card has 2M or less.  On a 1M card, the first 2M of the card's     * memory will have even doublewords backed by physical memory and odd     * doublewords unbacked.     *     * Pixels 0 and 1 of a row will be in the zeroth doubleword, while pixels 2     * and 3 will be in the first.  Check both pixels 2 and 3 in case this is a     * pseudo-1M card (one chip pulled to turn a 2M card into a 1M card).     *     * <Mark_Weaver@brown.edu>:     * I don't have a 1M card, so I'm taking a stab in the dark.  Maybe memory     * wraps every 512 lines, or maybe odd doublewords are aliases of their     * even doubleword counterparts.  I try everything here.     */    {2048, MEM_SIZE_2M, {{0,0}, {0,512}, {2,0}, {3,0}, {-1,-1}}},    /*     * This is a either a 1M card or a 512k card.  Test pixel 1, since it is an     * odd word in an even doubleword.     *     * <Mark_Weaver@brown.edu>:     * This is the same idea as the test above.     */    {1024, MEM_SIZE_1M, {{0,0}, {0,256}, {1,0}, {-1,-1}}},    /*     * Assume it is a 512k card by default, since that is the minimum     * configuration.     */    {512, MEM_SIZE_512K, {{-1,-1}}}};/* * ATIMach32ReadPixel -- * * Return the colour of the specified screen location.  Called from * ATIMach32videoRam function below. */static ColourATIMach32ReadPixel(    const short int X,    const short int Y){    Colour Pixel_Colour;    /* Wait for idle engine */    ProbeWaitIdleEmpty();    /* Set up engine for pixel read */    ATIWaitQueue(7);    outw(RD_MASK, (CARD16)(~0));    outw(DP_CONFIG, FG_COLOR_SRC_BLIT | DATA_WIDTH | DRAW | DATA_ORDER);    outw(CUR_X, X);    outw(CUR_Y, Y);    outw(DEST_X_START, X);    outw(DEST_X_END, X + 1);    outw(DEST_Y_END, Y + 1);    /* Wait for data to become ready */    ATIWaitQueue(16);    WaitDataReady();    /* Read pixel colour */    Pixel_Colour = inw(PIX_TRANS);    ProbeWaitIdleEmpty();    return Pixel_Colour;}/* * ATIMach32WritePixel -- * * Set the colour of the specified screen location.  Called from * ATIMach32videoRam function below. */static voidATIMach32WritePixel(    const short int X,    const short int Y,    const Colour    Pixel_Colour){    /* Set up engine for pixel write */    ATIWaitQueue(9);    outw(WRT_MASK, (CARD16)(~0));    outw(DP_CONFIG, FG_COLOR_SRC_FG | DRAW | READ_WRITE);    outw(ALU_FG_FN, MIX_FN_PAINT);    outw(FRGD_COLOR, Pixel_Colour);    outw(CUR_X, X);    outw(CUR_Y, Y);    outw(DEST_X_START, X);    outw(DEST_X_END, X + 1);    outw(DEST_Y_END, Y + 1);}/* * ATIMach32videoRam -- * * Determine the amount of video memory installed on an 68800-6 based adapter. * This is done because these chips exhibit a bug that causes their * MISC_OPTIONS register to report 1M rather than the true amount of memory. * * This function is adapted from a similar function in mach32mem.c written by * Robert Wolff, David Dawes and Mark Weaver. */static intATIMach32videoRam(    void){    CARD16 clock_sel, mem_bndry, misc_options, ext_ge_config;    Colour saved_Pixel[NumberOf(Test_Pixel)];    unsigned int Case_Number, Pixel_Number;    Bool AllPixelsOK;    /* Save register values to be modified */    clock_sel = inw(CLOCK_SEL);    mem_bndry = inw(MEM_BNDRY);    misc_options = inw(MISC_OPTIONS) & ~MEM_SIZE_ALIAS;    ext_ge_config = inw(R_EXT_GE_CONFIG);    /* Wait for enough FIFO entries */    ATIWaitQueue(7);    /* Enable accelerator */    outw(CLOCK_SEL, clock_sel | DISABPASSTHRU);    /* Make accelerator and VGA share video memory */    outw(MEM_BNDRY, mem_bndry & ~(MEM_PAGE_BNDRY | MEM_BNDRY_ENA));    /* Prevent video memory wrap */    outw(MISC_OPTIONS, misc_options | MEM_SIZE_4M);    /*     * Set up the drawing engine for a pitch of 1024 at 16 bits per pixel.  No     * need to mess with the CRT because the results of this test are not     * intended to be seen.     */    outw(EXT_GE_CONFIG, PIXEL_WIDTH_16 | ORDER_16BPP_565 | MONITOR_8514 |        ALIAS_ENA);    outw(GE_PITCH, 1024 >> 3);    outw(GE_OFFSET_HI, 0);    outw(GE_OFFSET_LO, 0);    for (Case_Number = 0;         Case_Number < (NumberOf(Test_Case) - 1);         Case_Number++)    {        /* Reduce redundancy as per Mark_Weaver@brown.edu */#       define TestPixel Test_Case[Case_Number].Coordinates[Pixel_Number]#       define ForEachTestPixel        \            for (Pixel_Number = 0;  TestPixel.x >= 0;  Pixel_Number++)        /* Save pixel colours that will be clobbered */        ForEachTestPixel            saved_Pixel[Pixel_Number] =                ATIMach32ReadPixel(TestPixel.x, TestPixel.y);        /* Write test patterns */        ForEachTestPixel            ATIMach32WritePixel(TestPixel.x, TestPixel.y,                Test_Pixel[Pixel_Number]);        /* Test for lost pixels */        AllPixelsOK = TRUE;        ForEachTestPixel        {            if (ATIMach32ReadPixel(TestPixel.x, TestPixel.y) !=                Test_Pixel[Pixel_Number])            {                AllPixelsOK = FALSE;                break;            }        }        /* Restore clobbered pixels */        ForEachTestPixel            ATIMach32WritePixel(TestPixel.x, TestPixel.y,                saved_Pixel[Pixel_Number]);        /* End test on success */        if (AllPixelsOK)            break;        /* Completeness */#       undef ForEachTestPixel#       undef TestPixel    }    /* Restore what was changed and correct MISC_OPTIONS register */    ATIWaitQueue(4);    outw(EXT_GE_CONFIG, ext_ge_config);    misc_options |= Test_Case[Case_Number].Miscellaneous_Options_Setting;    outw(MISC_OPTIONS, misc_options);    outw(MEM_BNDRY, mem_bndry);    outw(CLOCK_SEL, clock_sel);    /* Wait for activity to die down */    ProbeWaitIdleEmpty();    /* Tell ATIPreInit the REAL story */    return Test_Case[Case_Number].videoRamSize;}#endif /* AVOID_CPIO *//* * ATIReportMemory -- * * This function reports on the amount and type of video memory found. */static voidATIReportMemory(    ScrnInfoPtr pScreenInfo,    ATIPtr      pATI,    const char *MemoryTypeName){    char Buffer[128], *Message;    Message = Buffer +        snprintf(Buffer, SizeOf(Buffer), "%d kB of %s detected",            pATI->VideoRAM, MemoryTypeName);#ifndef AVOID_CPIO    if (pATI->depth == 1)    {        /* 1bpp only uses one plane of four */        pScreenInfo->videoRam /= 4;        Message += snprintf(Message, Buffer + SizeOf(Buffer) - Message,            " (using %d kB)", pScreenInfo->videoRam);    }    else#endif /* AVOID_CPIO */    if (pATI->VideoRAM > pScreenInfo->videoRam)    {        Message += snprintf(Message, Buffer + SizeOf(Buffer) - Message,            " (using %d kB)", pScreenInfo->videoRam);    }    xf86DrvMsg(pScreenInfo->scrnIndex, X_PROBED, "%s.\n", Buffer);}static const int videoRamSizes[] =    {0, 256, 512, 1024, 2*1024, 4*1024, 6*1024, 8*1024, 12*1024, 16*1024, 0};static const rgb   defaultWeight = {0, 0, 0};static const Gamma defaultGamma  = {0.0, 0.0, 0.0};/* * ATIMach64Map -- * * This function attempts to mmap() a Mach64's MMIO aperture. */static voidATIMach64Map(    int    iScreen,    ATIPtr pATI){    (void)ATIMapApertures(iScreen, pATI);    if (!pATI->pBlock[0] ||        (pATI->config_chip_id != inr(CONFIG_CHIP_ID)))        ATIUnmapApertures(iScreen, pATI);}/* * ATIPrintNoiseIfRequested -- * * This function formats debugging information on the server's stderr when * requested by the user through the server's verbosity setting. */static voidATIPrintNoiseIfRequested(    ATIPtr       pATI,    CARD8       *BIOS,    unsigned int BIOSSize){    if (xf86GetVerbosity() <= 3)        return;    if (BIOSSize > 0)        ATIPrintBIOS(BIOS, BIOSSize);    xf86ErrorFVerb(4, "\n On server entry:\n");    ATIPrintRegisters(pATI);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品国产77777蜜臀| 91精彩视频在线| 99精品国产99久久久久久白柏| 欧美少妇bbb| 国产精品沙发午睡系列990531| 日韩福利电影在线观看| 成人av在线看| 久久综合一区二区| 美女mm1313爽爽久久久蜜臀| 91麻豆免费在线观看| 久久久99久久| 久久99久久久久| 91精品国产综合久久久久久久| 亚洲三级电影全部在线观看高清| 国产在线不卡一区| 日韩欧美自拍偷拍| 免费成人在线网站| 51精品秘密在线观看| 亚洲第一成年网| 日本久久电影网| 亚洲男人的天堂在线aⅴ视频| 国产电影一区在线| 久久久久国色av免费看影院| 久久精品国产亚洲高清剧情介绍 | 欧美色综合久久| 亚洲欧洲99久久| av中文字幕一区| 国产精品高潮呻吟久久| 成人一区二区三区视频 | 91精品久久久久久蜜臀| 亚洲图片欧美色图| 欧美视频在线一区二区三区 | 日韩高清一区在线| 欧美日韩一区二区在线观看| 亚洲国产综合色| 欧美影视一区二区三区| 亚洲一区二区在线播放相泽| 精品视频在线视频| 日韩av网站在线观看| 日韩午夜在线观看| 国产一区二区视频在线| 久久新电视剧免费观看| 国产91富婆露脸刺激对白| 中文在线资源观看网站视频免费不卡| 国产精品99久| 综合激情成人伊人| 欧美性一二三区| 日本亚洲最大的色成网站www| 欧美一区二区三区精品| 久久不见久久见免费视频7| 久久久久久97三级| 99热国产精品| 午夜a成v人精品| 精品日韩在线观看| 国产成人8x视频一区二区| 亚洲欧洲成人精品av97| 欧美日韩三级一区| 国模冰冰炮一区二区| 亚洲色欲色欲www在线观看| 欧美亚洲国产bt| 国产一区免费电影| 亚洲精品中文字幕在线观看| 欧美日韩另类一区| 久久国产精品免费| 中文字幕欧美国产| 在线观看91精品国产入口| 免费成人美女在线观看| 国产精品毛片无遮挡高清| 欧美午夜不卡在线观看免费| 精品一区免费av| 亚洲精品国久久99热| 精品国产成人在线影院| 色偷偷成人一区二区三区91| 久热成人在线视频| 一区二区欧美国产| 久久婷婷综合激情| 69久久夜色精品国产69蝌蚪网| 国产精品18久久久久| 亚洲无线码一区二区三区| 久久久99久久| 欧美精品99久久久**| 成人18视频日本| 久久国产综合精品| 香蕉加勒比综合久久| 国产精品毛片无遮挡高清| 欧美电影免费观看高清完整版在线观看| 成人午夜在线视频| 美女国产一区二区| 亚洲福利国产精品| 亚洲婷婷国产精品电影人久久| 欧美v亚洲v综合ⅴ国产v| 欧美吞精做爰啪啪高潮| 成人av资源网站| 国产一区91精品张津瑜| 免费一区二区视频| 日韩一区精品视频| 亚欧色一区w666天堂| 一区二区三区在线视频免费观看| 国产精品人成在线观看免费| 久久精品男人的天堂| 久久一二三国产| 欧美成人女星排名| 日韩一区二区三区免费看| 欧美日韩综合在线免费观看| 91视频国产资源| 99久久精品情趣| 不卡一卡二卡三乱码免费网站| 国产精品一级二级三级| 国产在线精品一区二区三区不卡 | 中文字幕综合网| 国产精品久久久久久妇女6080| 国产欧美一区二区三区网站| www国产精品av| 久久一日本道色综合| 久久久激情视频| 日本一区二区视频在线观看| 中文字幕免费观看一区| 18涩涩午夜精品.www| 亚洲人成网站在线| 亚洲自拍偷拍av| 手机精品视频在线观看| 久久精品国产免费看久久精品| 久久精品久久综合| 极品少妇xxxx偷拍精品少妇| 国产一区欧美二区| av网站免费线看精品| 色美美综合视频| 欧美日韩精品一区二区天天拍小说| 欧美高清精品3d| 日韩免费观看高清完整版| 久久久久久久久蜜桃| 国产精品卡一卡二| 亚洲亚洲人成综合网络| 日韩成人av影视| 国产在线不卡一卡二卡三卡四卡| 国产成人精品午夜视频免费| 色综合一区二区三区| 欧美一区在线视频| 26uuu国产日韩综合| 亚洲区小说区图片区qvod| 亚洲国产成人高清精品| 精品亚洲成av人在线观看| 成人少妇影院yyyy| 欧美日韩在线直播| 久久影院视频免费| 一区二区三区中文在线| 狠狠色丁香久久婷婷综合_中 | 六月丁香婷婷久久| 风间由美一区二区av101| 欧美无砖专区一中文字| 亚洲精品一区二区三区影院| 亚洲色大成网站www久久九九| 日韩电影一区二区三区四区| 丁香婷婷综合激情五月色| 欧美四级电影网| 国产亚洲精品福利| 午夜欧美2019年伦理 | 麻豆成人av在线| 激情综合色综合久久综合| 91在线视频免费91| 欧美成人女星排名| 亚洲国产成人av网| 成人一区二区三区视频在线观看| 欧美精品 国产精品| 国产精品久久久一区麻豆最新章节| 香蕉久久夜色精品国产使用方法| 成人一区在线看| 欧美成人乱码一区二区三区| 亚洲一级片在线观看| 国产福利一区在线观看| 这里只有精品电影| 一区二区三区在线视频播放| 国产精品中文有码| 欧美久久久久久久久| 国产精品国产三级国产| 奇米精品一区二区三区在线观看一 | 成人一级黄色片| 日韩午夜三级在线| 亚洲国产中文字幕在线视频综合| 成人精品亚洲人成在线| 2023国产精华国产精品| 日本在线不卡视频| 欧美二区三区的天堂| 亚洲午夜激情网站| 色哦色哦哦色天天综合| 国产精品久久久一本精品| 国产成人av电影| 国产日本欧美一区二区| 国产精品自在欧美一区| 精品国产1区2区3区| 蜜桃视频一区二区三区| 欧美一区二区三区小说| 亚洲第一狼人社区| 欧美日本一区二区三区| 亚洲成人av一区二区| 欧美日韩国产影片| 亚洲成av人影院在线观看网| 欧美精品一二三四| 日韩精品一区第一页| 欧美一区二区视频在线观看2022|