📄 r128.h
字号:
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128.h,v 1.24 2002/12/16 16:19:10 dawes Exp $ *//* * Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario, * Precision Insight, Inc., Cedar Park, Texas, and * VA Linux Systems Inc., Fremont, California. * * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation on the rights to use, copy, modify, merge, * publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice (including the * next paragraph) shall be included in all copies or substantial * portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NON-INFRINGEMENT. IN NO EVENT SHALL ATI, PRECISION INSIGHT, VA LINUX * SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. *//* * Authors: * Rickard E. Faith <faith@valinux.com> * Kevin E. Martin <martin@valinux.com> * */#ifndef _R128_H_#define _R128_H_#include "dri_util.h"#define R128_DEBUG 0 /* Turn off debugging output */#define R128_IDLE_RETRY 32 /* Fall out of idle loops after this count */#define R128_TIMEOUT 2000000 /* Fall out of wait loops after this count */#define R128_MMIOSIZE 0x4000#define R128_VBIOS_SIZE 0x00010000#if R128_DEBUG#define R128TRACE(x) \ do { \ ErrorF("(**) %s(%d): ", R128_NAME, pScrn->scrnIndex); \ ErrorF x; \ } while (0);#else#define R128TRACE(x)#endif/* Other macros */#define R128_ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))#define R128_ALIGN(x,bytes) (((x) + ((bytes) - 1)) & ~((bytes) - 1))#define R128PTR(pScrn) ((R128InfoPtr)(pScrn)->driverPrivate) /** * \brief Chip families. */typedef enum { CHIP_FAMILY_UNKNOWN, CHIP_FAMILY_R128_PCI, CHIP_FAMILY_R128_AGP,} R128ChipFamily;typedef struct { /* All values in XCLKS */ int ML; /* Memory Read Latency */ int MB; /* Memory Burst Length */ int Trcd; /* RAS to CAS delay */ int Trp; /* RAS percentage */ int Twr; /* Write Recovery */ int CL; /* CAS Latency */ int Tr2w; /* Read to Write Delay */ int Rloop; /* Loop Latency */ int Rloop_fudge; /* Add to ML to get Rloop */ char *name;} R128RAMRec, *R128RAMPtr;typedef struct { /* Common registers */ u_int32_t ovr_clr; u_int32_t ovr_wid_left_right; u_int32_t ovr_wid_top_bottom; u_int32_t ov0_scale_cntl; u_int32_t mpp_tb_config; u_int32_t mpp_gp_config; u_int32_t subpic_cntl; u_int32_t viph_control; u_int32_t i2c_cntl_1; u_int32_t gen_int_cntl; u_int32_t cap0_trig_cntl; u_int32_t cap1_trig_cntl; u_int32_t bus_cntl; u_int32_t config_cntl; /* Other registers to save for VT switches */ u_int32_t dp_datatype; u_int32_t gen_reset_cntl; u_int32_t clock_cntl_index; u_int32_t amcgpio_en_reg; u_int32_t amcgpio_mask; /* CRTC registers */ u_int32_t crtc_gen_cntl; u_int32_t crtc_ext_cntl; u_int32_t dac_cntl; u_int32_t crtc_h_total_disp; u_int32_t crtc_h_sync_strt_wid; u_int32_t crtc_v_total_disp; u_int32_t crtc_v_sync_strt_wid; u_int32_t crtc_offset; u_int32_t crtc_offset_cntl; u_int32_t crtc_pitch; /* CRTC2 registers */ u_int32_t crtc2_gen_cntl; /* Flat panel registers */ u_int32_t fp_crtc_h_total_disp; u_int32_t fp_crtc_v_total_disp; u_int32_t fp_gen_cntl; u_int32_t fp_h_sync_strt_wid; u_int32_t fp_horz_stretch; u_int32_t fp_panel_cntl; u_int32_t fp_v_sync_strt_wid; u_int32_t fp_vert_stretch; u_int32_t lvds_gen_cntl; u_int32_t tmds_crc; u_int32_t tmds_transmitter_cntl; /* Computed values for PLL */ u_int32_t dot_clock_freq; u_int32_t pll_output_freq; int feedback_div; int post_div; /* PLL registers */ u_int32_t ppll_ref_div; u_int32_t ppll_div_3; u_int32_t htotal_cntl; /* DDA register */ u_int32_t dda_config; u_int32_t dda_on_off; /* Pallet */ GLboolean palette_valid; u_int32_t palette[256];} R128SaveRec, *R128SavePtr;typedef struct { int Chipset; GLboolean Primary; GLboolean FBDev; unsigned long LinearAddr; /* Frame buffer physical address */ unsigned long BIOSAddr; /* BIOS physical address */ unsigned char *MMIO; /* Map of MMIO region */ unsigned char *FB; /* Map of frame buffer */ u_int32_t MemCntl; u_int32_t BusCntl; unsigned long FbMapSize; /* Size of frame buffer, in bytes */ int Flags; /* Saved copy of mode flags */ /* Computed values for FPs */ int PanelXRes; int PanelYRes; int HOverPlus; int HSyncWidth; int HBlank; int VOverPlus; int VSyncWidth; int VBlank; int PanelPwrDly; unsigned long cursor_start; unsigned long cursor_end; /* * XAAForceTransBlit is used to change the behavior of the XAA * SetupForScreenToScreenCopy function, to make it DGA-friendly. */ GLboolean XAAForceTransBlit; int fifo_slots; /* Free slots in the FIFO (64 max) */ int pix24bpp; /* Depth of pixmap for 24bpp framebuffer */ GLboolean dac6bits; /* Use 6 bit DAC? */ /* Computed values for Rage 128 */ int pitch; int datatype; u_int32_t dp_gui_master_cntl; /* Saved values for ScreenToScreenCopy */ int xdir; int ydir; /* ScanlineScreenToScreenColorExpand support */ unsigned char *scratch_buffer[1]; unsigned char *scratch_save; int scanline_x; int scanline_y; int scanline_w; int scanline_h; int scanline_hpass; int scanline_x1clip; int scanline_x2clip; int scanline_rop; int scanline_fg; int scanline_bg; int scanline_words; int scanline_direct; int scanline_bpp; /* Only used for ImageWrite */ drm_context_t drmCtx; drmSize registerSize; drm_handle_t registerHandle;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -