1 /* 2 Copyright (c) 2002, Thomas Kurschel 3 4 5 Part of Radeon driver 6 7 CRTC registers 8 */ 9 10 #ifndef _CRTC_REGS_H 11 #define _CRTC_REGS_H 12 13 #define RADEON_CRTC_CRNT_FRAME 0x0214 14 #define RADEON_CRTC_DEBUG 0x021c 15 #define RADEON_CRTC_GEN_CNTL 0x0050 16 # define RADEON_CRTC_DBL_SCAN_EN (1 << 0) 17 # define RADEON_CRTC_INTERLACE_EN (1 << 1) 18 # define RADEON_CRTC_CSYNC_EN (1 << 4) 19 # define RADEON_CRTC_PIX_WIDTH_SHIFT 8 20 # define RADEON_CRTC_PIX_WIDTH_MASK (15 << 8) 21 # define RADEON_CRTC_ICON_EN (1 << 15) 22 # define RADEON_CRTC_CUR_EN (1 << 16) 23 # define RADEON_CRTC_CUR_MODE_MASK (7 << 20) 24 # define RADEON_CRTC_EXT_DISP_EN (1 << 24) 25 # define RADEON_CRTC_EN (1 << 25) 26 # define RADEON_CRTC_DISP_REQ_EN_B (1 << 26) 27 #define RADEON_CRTC_EXT_CNTL 0x0054 28 # define RADEON_CRTC_VGA_XOVERSCAN (1 << 0) 29 # define RADEON_VGA_ATI_LINEAR (1 << 3) 30 # define RADEON_XCRT_CNT_EN (1 << 6) 31 # define RADEON_CRTC_HSYNC_DIS (1 << 8) 32 # define RADEON_CRTC_VSYNC_DIS (1 << 9) 33 # define RADEON_CRTC_DISPLAY_DIS (1 << 10) 34 # define RADEON_CRTC_SYNC_TRISTAT (1 << 11) 35 # define RADEON_CRTC_HSYNC_TRISTAT (1 << 12) 36 # define RADEON_CRTC_VSYNC_TRISTAT (1 << 13) 37 # define RADEON_CRTC_CRT_ON (1 << 15) 38 #define RADEON_CRTC2_GEN_CNTL 0x03f8 39 # define RADEON_CRTC2_DBL_SCAN_EN (1 << 0) 40 # define RADEON_CRTC2_INTERLACE_EN (1 << 1) 41 # define RADEON_CRTC2_SYNC_TRISTAT (1 << 4) 42 # define RADEON_CRTC2_HSYNC_TRISTAT (1 << 5) 43 # define RADEON_CRTC2_VSYNC_TRISTAT (1 << 6) 44 # define RADEON_CRTC2_CRT2_ON (1 << 7) 45 # define RADEON_CRTC2_ICON_EN (1 << 15) 46 # define RADEON_CRTC2_CUR_EN (1 << 16) 47 # define RADEON_CRTC2_CUR_MODE_MASK (7 << 20) 48 # define RADEON_CRTC2_DISP_DIS (1 << 23) 49 # define RADEON_CRTC2_EN (1 << 25) 50 # define RADEON_CRTC2_DISP_REQ_EN_B (1 << 26) 51 # define RADEON_CRTC2_HSYNC_DIS (1 << 28) 52 # define RADEON_CRTC2_VSYNC_DIS (1 << 29) 53 #define RADEON_CRTC_GUI_TRIG_VLINE 0x0218 54 #define RADEON_CRTC_H_SYNC_STRT_WID 0x0204 55 # define RADEON_CRTC_H_SYNC_STRT_PIX (0x07 << 0) 56 # define RADEON_CRTC_H_SYNC_STRT_CHAR (0x3ff << 3) 57 # define RADEON_CRTC_H_SYNC_STRT_CHAR_SHIFT 3 58 # define RADEON_CRTC_H_SYNC_WID (0x3f << 16) 59 # define RADEON_CRTC_H_SYNC_WID_SHIFT 16 60 # define RADEON_CRTC_H_SYNC_POL (1 << 23) 61 #define RADEON_CRTC2_H_SYNC_STRT_WID 0x0304 62 # define RADEON_CRTC2_H_SYNC_STRT_PIX (0x07 << 0) 63 # define RADEON_CRTC2_H_SYNC_STRT_CHAR (0x3ff << 3) 64 # define RADEON_CRTC2_H_SYNC_STRT_CHAR_SHIFT 3 65 # define RADEON_CRTC2_H_SYNC_WID (0x3f << 16) 66 # define RADEON_CRTC2_H_SYNC_WID_SHIFT 16 67 # define RADEON_CRTC2_H_SYNC_POL (1 << 23) 68 #define RADEON_CRTC_H_TOTAL_DISP 0x0200 69 # define RADEON_CRTC_H_TOTAL (0x03ff << 0) 70 # define RADEON_CRTC_H_TOTAL_SHIFT 0 71 # define RADEON_CRTC_H_DISP (0x01ff << 16) 72 # define RADEON_CRTC_H_DISP_SHIFT 16 73 #define RADEON_CRTC2_H_TOTAL_DISP 0x0300 74 # define RADEON_CRTC2_H_TOTAL (0x03ff << 0) 75 # define RADEON_CRTC2_H_TOTAL_SHIFT 0 76 # define RADEON_CRTC2_H_DISP (0x01ff << 16) 77 # define RADEON_CRTC2_H_DISP_SHIFT 16 78 #define RADEON_CRTC_OFFSET 0x0224 79 #define RADEON_CRTC2_OFFSET 0x0324 80 #define RADEON_CRTC_OFFSET_CNTL 0x0228 81 # define RADEON_CRTC_TILE_EN (1 << 15) 82 #define RADEON_CRTC2_OFFSET_CNTL 0x0328 83 # define RADEON_CRTC2_TILE_EN (1 << 15) 84 #define RADEON_CRTC_PITCH 0x022c 85 #define RADEON_CRTC2_PITCH 0x032c 86 #define RADEON_CRTC_STATUS 0x005c 87 # define RADEON_CRTC_VBLANK_SAVE (1 << 1) 88 #define RADEON_CRTC_V_SYNC_STRT_WID 0x020c 89 # define RADEON_CRTC_V_SYNC_STRT (0x7ff << 0) 90 # define RADEON_CRTC_V_SYNC_STRT_SHIFT 0 91 # define RADEON_CRTC_V_SYNC_WID (0x1f << 16) 92 # define RADEON_CRTC_V_SYNC_WID_SHIFT 16 93 # define RADEON_CRTC_V_SYNC_POL (1 << 23) 94 #define RADEON_CRTC2_V_SYNC_STRT_WID 0x030c 95 # define RADEON_CRTC2_V_SYNC_STRT (0x7ff << 0) 96 # define RADEON_CRTC2_V_SYNC_STRT_SHIFT 0 97 # define RADEON_CRTC2_V_SYNC_WID (0x1f << 16) 98 # define RADEON_CRTC2_V_SYNC_WID_SHIFT 16 99 # define RADEON_CRTC2_V_SYNC_POL (1 << 23) 100 #define RADEON_CRTC_V_TOTAL_DISP 0x0208 101 # define RADEON_CRTC_V_TOTAL (0x07ff << 0) 102 # define RADEON_CRTC_V_TOTAL_SHIFT 0 103 # define RADEON_CRTC_V_DISP (0x07ff << 16) 104 # define RADEON_CRTC_V_DISP_SHIFT 16 105 #define RADEON_CRTC2_V_TOTAL_DISP 0x0308 106 # define RADEON_CRTC2_V_TOTAL (0x07ff << 0) 107 # define RADEON_CRTC2_V_TOTAL_SHIFT 0 108 # define RADEON_CRTC2_V_DISP (0x07ff << 16) 109 # define RADEON_CRTC2_V_DISP_SHIFT 16 110 #define RADEON_CRTC_VLINE_CRNT_VLINE 0x0210 111 # define RADEON_CRTC_CRNT_VLINE_MASK (0x7ff << 16) 112 #define RADEON_CRTC2_CRNT_FRAME 0x0314 113 #define RADEON_CRTC2_DEBUG 0x031c 114 #define RADEON_CRTC2_GUI_TRIG_VLINE 0x0318 115 #define RADEON_CRTC2_STATUS 0x03fc 116 #define RADEON_CRTC2_VLINE_CRNT_VLINE 0x0310 117 118 #define RADEON_CUR_CLR0 0x026c 119 #define RADEON_CUR_CLR1 0x0270 120 #define RADEON_CUR_HORZ_VERT_OFF 0x0268 121 #define RADEON_CUR_HORZ_VERT_POSN 0x0264 122 #define RADEON_CUR_OFFSET 0x0260 123 # define RADEON_CUR_LOCK (1 << 31) 124 #define RADEON_CUR2_CLR0 0x036c 125 #define RADEON_CUR2_CLR1 0x0370 126 #define RADEON_CUR2_HORZ_VERT_OFF 0x0368 127 #define RADEON_CUR2_HORZ_VERT_POSN 0x0364 128 #define RADEON_CUR2_OFFSET 0x0360 129 # define RADEON_CUR2_LOCK (1 << 31) 130 131 #endif 132