📄 i810_reg.h
字号:
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_reg.h,v 1.13 2003/02/06 04:18:04 dawes Exp $ *//**************************************************************************Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.All Rights Reserved.Permission is hereby granted, free of charge, to any person obtaining acopy of this software and associated documentation files (the"Software"), to deal in the Software without restriction, includingwithout limitation the rights to use, copy, modify, merge, publish,distribute, sub license, and/or sell copies of the Software, and topermit persons to whom the Software is furnished to do so, subject tothe following conditions:The above copyright notice and this permission notice (including thenext paragraph) shall be included in all copies or substantial portionsof the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FORANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THESOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.**************************************************************************//* * Authors: * Keith Whitwell <keith@tungstengraphics.com> * * based on the i740 driver by * Kevin E. Martin <kevin@precisioninsight.com> * * */#ifndef _I810_REG_H#define _I810_REG_H/* I/O register offsets */#define SRX 0x3C4 /* p208 */#define GRX 0x3CE /* p213 */#define ARX 0x3C0 /* p224 *//* VGA Color Palette Registers */#define DACMASK 0x3C6 /* p232 */#define DACSTATE 0x3C7 /* p232 */#define DACRX 0x3C7 /* p233 */#define DACWX 0x3C8 /* p233 */#define DACDATA 0x3C9 /* p233 *//* CRT Controller Registers (CRX) */#define START_ADDR_HI 0x0C /* p246 */#define START_ADDR_LO 0x0D /* p247 */#define VERT_SYNC_END 0x11 /* p249 */#define EXT_VERT_TOTAL 0x30 /* p257 */#define EXT_VERT_DISPLAY 0x31 /* p258 */#define EXT_VERT_SYNC_START 0x32 /* p259 */#define EXT_VERT_BLANK_START 0x33 /* p260 */#define EXT_HORIZ_TOTAL 0x35 /* p261 */#define EXT_HORIZ_BLANK 0x39 /* p261 */#define EXT_START_ADDR 0x40 /* p262 */#define EXT_START_ADDR_ENABLE 0x80 #define EXT_OFFSET 0x41 /* p263 */#define EXT_START_ADDR_HI 0x42 /* p263 */#define INTERLACE_CNTL 0x70 /* p264 */#define INTERLACE_ENABLE 0x80 #define INTERLACE_DISABLE 0x00 /* Miscellaneous Output Register */#define MSR_R 0x3CC /* p207 */#define MSR_W 0x3C2 /* p207 */#define IO_ADDR_SELECT 0x01#define MDA_BASE 0x3B0 /* p207 */#define CGA_BASE 0x3D0 /* p207 *//* CR80 - IO Control, p264 */#define IO_CTNL 0x80#define EXTENDED_ATTR_CNTL 0x02#define EXTENDED_CRTC_CNTL 0x01/* GR10 - Address mapping, p221 */#define ADDRESS_MAPPING 0x10#define PAGE_TO_LOCAL_MEM_ENABLE 0x10#define GTT_MEM_MAP_ENABLE 0x08#define PACKED_MODE_ENABLE 0x04#define LINEAR_MODE_ENABLE 0x02#define PAGE_MAPPING_ENABLE 0x01/* Blitter control, p378 */#define BITBLT_CNTL 0x7000c#define COLEXP_MODE 0x30#define COLEXP_8BPP 0x00#define COLEXP_16BPP 0x10#define COLEXP_24BPP 0x20#define COLEXP_RESERVED 0x30#define BITBLT_STATUS 0x01/* p375. */#define DISPLAY_CNTL 0x70008#define VGA_WRAP_MODE 0x02#define VGA_WRAP_AT_256KB 0x00#define VGA_NO_WRAP 0x02#define GUI_MODE 0x01#define STANDARD_VGA_MODE 0x00#define HIRES_MODE 0x01/* p375 */#define PIXPIPE_CONFIG_0 0x70009#define DAC_8_BIT 0x80#define DAC_6_BIT 0x00#define HW_CURSOR_ENABLE 0x10#define EXTENDED_PALETTE 0x01/* p375 */#define PIXPIPE_CONFIG_1 0x7000a#define DISPLAY_COLOR_MODE 0x0F#define DISPLAY_VGA_MODE 0x00#define DISPLAY_8BPP_MODE 0x02#define DISPLAY_15BPP_MODE 0x04#define DISPLAY_16BPP_MODE 0x05#define DISPLAY_24BPP_MODE 0x06#define DISPLAY_32BPP_MODE 0x07/* p375 */#define PIXPIPE_CONFIG_2 0x7000b#define DISPLAY_GAMMA_ENABLE 0x08#define DISPLAY_GAMMA_DISABLE 0x00#define OVERLAY_GAMMA_ENABLE 0x04#define OVERLAY_GAMMA_DISABLE 0x00/* p380 */#define DISPLAY_BASE 0x70020#define DISPLAY_BASE_MASK 0x03fffffc/* Cursor control registers, pp383-384 *//* Desktop (845G, 865G) */#define CURSOR_CONTROL 0x70080#define CURSOR_ENABLE 0x80000000#define CURSOR_GAMMA_ENABLE 0x40000000#define CURSOR_STRIDE_MASK 0x30000000#define CURSOR_FORMAT_SHIFT 24#define CURSOR_FORMAT_MASK (0x07 << CURSOR_FORMAT_SHIFT)#define CURSOR_FORMAT_2C (0x00 << CURSOR_FORMAT_SHIFT)#define CURSOR_FORMAT_3C (0x01 << CURSOR_FORMAT_SHIFT)#define CURSOR_FORMAT_4C (0x02 << CURSOR_FORMAT_SHIFT)#define CURSOR_FORMAT_ARGB (0x04 << CURSOR_FORMAT_SHIFT)#define CURSOR_FORMAT_XRGB (0x05 << CURSOR_FORMAT_SHIFT)/* Mobile and i810 */#define CURSOR_A_CONTROL CURSOR_CONTROL#define CURSOR_ORIGIN_SCREEN 0x00 /* i810 only */#define CURSOR_ORIGIN_DISPLAY 0x1 /* i810 only */#define CURSOR_MODE 0x27#define CURSOR_MODE_DISABLE 0x00#define CURSOR_MODE_32_4C_AX 0x01 /* i810 only */#define CURSOR_MODE_64_3C 0x04#define CURSOR_MODE_64_4C_AX 0x05#define CURSOR_MODE_64_4C 0x06#define CURSOR_MODE_64_32B_AX 0x07#define CURSOR_MODE_64_ARGB_AX (0x20 | CURSOR_MODE_64_32B_AX)#define MCURSOR_PIPE_SELECT (1 << 28)#define MCURSOR_PIPE_A 0x00#define MCURSOR_PIPE_B (1 << 28)#define MCURSOR_GAMMA_ENABLE (1 << 26)#define MCURSOR_MEM_TYPE_LOCAL (1 << 25)#define CURSOR_BASEADDR 0x70084#define CURSOR_A_BASE CURSOR_BASEADDR#define CURSOR_BASEADDR_MASK 0x1FFFFF00#define CURSOR_A_POSITION 0x70088#define CURSOR_POS_SIGN 0x8000#define CURSOR_POS_MASK 0x007FF#define CURSOR_X_SHIFT 0#define CURSOR_Y_SHIFT 16#define CURSOR_X_LO 0x70088#define CURSOR_X_HI 0x70089#define CURSOR_X_POS 0x00#define CURSOR_X_NEG 0x80#define CURSOR_Y_LO 0x7008A#define CURSOR_Y_HI 0x7008B#define CURSOR_Y_POS 0x00#define CURSOR_Y_NEG 0x80#define CURSOR_A_PALETTE0 0x70090#define CURSOR_A_PALETTE1 0x70094#define CURSOR_A_PALETTE2 0x70098#define CURSOR_A_PALETTE3 0x7009C#define CURSOR_SIZE 0x700A0#define CURSOR_SIZE_MASK 0x3FF#define CURSOR_SIZE_HSHIFT 0#define CURSOR_SIZE_VSHIFT 12#define CURSOR_B_CONTROL 0x700C0#define CURSOR_B_BASE 0x700C4#define CURSOR_B_POSITION 0x700C8#define CURSOR_B_PALETTE0 0x700D0#define CURSOR_B_PALETTE1 0x700D4#define CURSOR_B_PALETTE2 0x700D8#define CURSOR_B_PALETTE3 0x700DC/* Similar registers exist in Device 0 on the i810 (pp55-65), but I'm * not sure they refer to local (graphics) memory. * * These details are for the local memory control registers, * (pp301-310). The test machines are not equiped with local memory, * so nothing is tested. Only a single row seems to be supported. */#define DRAM_ROW_TYPE 0x3000#define DRAM_ROW_0 0x01#define DRAM_ROW_0_SDRAM 0x01#define DRAM_ROW_0_EMPTY 0x00#define DRAM_ROW_CNTL_LO 0x3001#define DRAM_PAGE_MODE_CTRL 0x10#define DRAM_RAS_TO_CAS_OVRIDE 0x08#define DRAM_CAS_LATENCY 0x04#define DRAM_RAS_TIMING 0x02#define DRAM_RAS_PRECHARGE 0x01#define DRAM_ROW_CNTL_HI 0x3002#define DRAM_REFRESH_RATE 0x18#define DRAM_REFRESH_DISABLE 0x00#define DRAM_REFRESH_60HZ 0x08#define DRAM_REFRESH_FAST_TEST 0x10#define DRAM_REFRESH_RESERVED 0x18#define DRAM_SMS 0x07#define DRAM_SMS_NORMAL 0x00#define DRAM_SMS_NOP_ENABLE 0x01#define DRAM_SMS_ABPCE 0x02#define DRAM_SMS_MRCE 0x03#define DRAM_SMS_CBRCE 0x04/* p307 */#define DPMS_SYNC_SELECT 0x5002#define VSYNC_CNTL 0x08#define VSYNC_ON 0x00#define VSYNC_OFF 0x08#define HSYNC_CNTL 0x02#define HSYNC_ON 0x00#define HSYNC_OFF 0x02/* p317, 319 */#define VCLK2_VCO_M 0x6008 /* treat as 16 bit? (includes msbs) */#define VCLK2_VCO_N 0x600a#define VCLK2_VCO_DIV_SEL 0x6012#define VCLK_DIVISOR_VGA0 0x6000#define VCLK_DIVISOR_VGA1 0x6004#define VCLK_POST_DIV 0x6010#define POST_DIV_SELECT 0x70#define POST_DIV_1 0x00#define POST_DIV_2 0x10#define POST_DIV_4 0x20#define POST_DIV_8 0x30#define POST_DIV_16 0x40#define POST_DIV_32 0x50#define VCO_LOOP_DIV_BY_4M 0x00#define VCO_LOOP_DIV_BY_16M 0x04/* Instruction Parser Mode Register * - p281 * - 2 new bits. */#define INST_PM 0x20c0 #define AGP_SYNC_PACKET_FLUSH_ENABLE 0x20 /* reserved */#define SYNC_PACKET_FLUSH_ENABLE 0x10#define TWO_D_INST_DISABLE 0x08#define THREE_D_INST_DISABLE 0x04#define STATE_VAR_UPDATE_DISABLE 0x02#define PAL_STIP_DISABLE 0x01#define INST_DONE 0x2090#define INST_PS 0x20c4#define MEMMODE 0x20dc/* Instruction parser error register. p279 */#define IPEIR 0x2088#define IPEHR 0x208C/* General error reporting regs, p296 */#define EIR 0x20B0#define EMR 0x20B4#define ESR 0x20B8#define IP_ERR 0x0001#define ERROR_RESERVED 0xffc6/* Interrupt Control Registers * - new bits for i810 * - new register hwstam (mask) */#define HWSTAM 0x2098 /* p290 */#define IER 0x20a0 /* p291 */#define IIR 0x20a4 /* p292 */#define IMR 0x20a8 /* p293 */#define ISR 0x20ac /* p294 */#define HW_ERROR 0x8000#define SYNC_STATUS_TOGGLE 0x1000#define DPY_0_FLIP_PENDING 0x0800#define DPY_1_FLIP_PENDING 0x0400 /* not implemented on i810 */#define OVL_0_FLIP_PENDING 0x0200#define OVL_1_FLIP_PENDING 0x0100 /* not implemented on i810 */#define DPY_0_VBLANK 0x0080#define DPY_0_EVENT 0x0040#define DPY_1_VBLANK 0x0020 /* not implemented on i810 */#define DPY_1_EVENT 0x0010 /* not implemented on i810 */#define HOST_PORT_EVENT 0x0008 /* */#define CAPTURE_EVENT 0x0004 /* */#define USER_DEFINED 0x0002#define BREAKPOINT 0x0001
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -