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_PIX_WIDTH_SHIFT 8 46 # define RADEON_CRTC2_PIX_WIDTH_MASK (0xf << 8) 47 # define RADEON_CRTC2_ICON_EN (1 << 15) 48 # define RADEON_CRTC2_CUR_EN (1 << 16) 49 # define RADEON_CRTC2_CUR_MODE_MASK (7 << 20) 50 # define RADEON_CRTC2_DISP_DIS (1 << 23) 51 # define RADEON_CRTC2_EN (1 << 25) 52 # define RADEON_CRTC2_DISP_REQ_EN_B (1 << 26) 53 # define RADEON_CRTC2_HSYNC_DIS (1 << 28) 54 # define RADEON_CRTC2_VSYNC_DIS (1 << 29) 55 #define RADEON_CRTC_GUI_TRIG_VLINE 0x0218 56 #define RADEON_CRTC_MORE_CNTL 0x27C 57 # define RADEON_CRTC_HORZ_BLANK_MODE_SEL (1 << 0) 58 # define RADEON_CRTC_VERT_BLANK_MODE_SEL (1 << 1) 59 # define RADEON_CRTC_AUTO_HORZ_CENTER_EN (1 << 2) 60 # define RADEON_CRTC_AUTO_VERT_CENTER_EN (1 << 3) 61 # define RADEON_CRTC_H_CUTOFF_ACTIVE_EN (1 << 4) 62 # define RADEON_CRTC_V_CUTOFF_ACTIVE_EN (1 << 5) 63 #define RADEON_CRTC_H_SYNC_STRT_WID 0x0204 64 # define RADEON_CRTC_H_SYNC_STRT_PIX (0x07 << 0) 65 # define RADEON_CRTC_H_SYNC_STRT_CHAR (0x3ff << 3) 66 # define RADEON_CRTC_H_SYNC_STRT_CHAR_SHIFT 3 67 # define RADEON_CRTC_H_SYNC_WID (0x3f << 16) 68 # define RADEON_CRTC_H_SYNC_WID_SHIFT 16 69 # define RADEON_CRTC_H_SYNC_POL (1 << 23) 70 #define RADEON_CRTC2_H_SYNC_STRT_WID 0x0304 71 # define RADEON_CRTC2_H_SYNC_STRT_PIX (0x07 << 0) 72 # define RADEON_CRTC2_H_SYNC_STRT_CHAR (0x3ff << 3) 73 # define RADEON_CRTC2_H_SYNC_STRT_CHAR_SHIFT 3 74 # define RADEON_CRTC2_H_SYNC_WID (0x3f << 16) 75 # define RADEON_CRTC2_H_SYNC_WID_SHIFT 16 76 # define RADEON_CRTC2_H_SYNC_POL (1 << 23) 77 #define RADEON_CRTC_H_TOTAL_DISP 0x0200 78 # define RADEON_CRTC_H_TOTAL (0x03ff << 0) 79 # define RADEON_CRTC_H_TOTAL_SHIFT 0 80 # define RADEON_CRTC_H_DISP (0x01ff << 16) 81 # define RADEON_CRTC_H_DISP_SHIFT 16 82 #define RADEON_CRTC2_H_TOTAL_DISP 0x0300 83 # define RADEON_CRTC2_H_TOTAL (0x03ff << 0) 84 # define RADEON_CRTC2_H_TOTAL_SHIFT 0 85 # define RADEON_CRTC2_H_DISP (0x01ff << 16) 86 # define RADEON_CRTC2_H_DISP_SHIFT 16 87 #define RADEON_CRTC_OFFSET 0x0224 88 #define RADEON_CRTC2_OFFSET 0x0324 89 #define RADEON_CRTC_OFFSET_CNTL 0x0228 90 # define RADEON_CRTC_TILE_EN (1 << 15) 91 #define RADEON_CRTC2_OFFSET_CNTL 0x0328 92 # define RADEON_CRTC2_TILE_EN (1 << 15) 93 #define RADEON_CRTC_PITCH 0x022c 94 #define RADEON_CRTC2_PITCH 0x032c 95 #define RADEON_CRTC_STATUS 0x005c 96 # define RADEON_CRTC_VBLANK_SAVE (1 << 1) 97 #define RADEON_CRTC_V_SYNC_STRT_WID 0x020c 98 # define RADEON_CRTC_V_SYNC_STRT (0x7ff << 0) 99 # define RADEON_CRTC_V_SYNC_STRT_SHIFT 0 100 # define RADEON_CRTC_V_SYNC_WID (0x1f << 16) 101 # define RADEON_CRTC_V_SYNC_WID_SHIFT 16 102 # define RADEON_CRTC_V_SYNC_POL (1 << 23) 103 #define RADEON_CRTC2_V_SYNC_STRT_WID 0x030c 104 # define RADEON_CRTC2_V_SYNC_STRT (0x7ff << 0) 105 # define RADEON_CRTC2_V_SYNC_STRT_SHIFT 0 106 # define RADEON_CRTC2_V_SYNC_WID (0x1f << 16) 107 # define RADEON_CRTC2_V_SYNC_WID_SHIFT 16 108 # define RADEON_CRTC2_V_SYNC_POL (1 << 23) 109 #define RADEON_CRTC_V_TOTAL_DISP 0x0208 110 # define RADEON_CRTC_V_TOTAL (0x07ff << 0) 111 # define RADEON_CRTC_V_TOTAL_SHIFT 0 112 # define RADEON_CRTC_V_DISP (0x07ff << 16) 113 # define RADEON_CRTC_V_DISP_SHIFT 16 114 #define RADEON_CRTC2_V_TOTAL_DISP 0x0308 115 # define RADEON_CRTC2_V_TOTAL (0x07ff << 0) 116 # define RADEON_CRTC2_V_TOTAL_SHIFT 0 117 # define RADEON_CRTC2_V_DISP (0x07ff << 16) 118 # define RADEON_CRTC2_V_DISP_SHIFT 16 119 #define RADEON_CRTC_VLINE_CRNT_VLINE 0x0210 120 # define RADEON_CRTC_CRNT_VLINE_MASK (0x7ff << 16) 121 #define RADEON_CRTC2_CRNT_FRAME 0x0314 122 #define RADEON_CRTC2_DEBUG 0x031c 123 #define RADEON_CRTC2_GUI_TRIG_VLINE 0x0318 124 #define RADEON_CRTC2_STATUS 0x03fc 125 #define RADEON_CRTC2_VLINE_CRNT_VLINE 0x0310 126 127 #define RADEON_CUR_CLR0 0x026c 128 #define RADEON_CUR_CLR1 0x0270 129 #define RADEON_CUR_HORZ_VERT_OFF 0x0268 130 #define RADEON_CUR_HORZ_VERT_POSN 0x0264 131 #define RADEON_CUR_OFFSET 0x0260 132 # define RADEON_CUR_LOCK (1 << 31) 133 #define RADEON_CUR2_CLR0 0x036c 134 #define RADEON_CUR2_CLR1 0x0370 135 #define RADEON_CUR2_HORZ_VERT_OFF 0x0368 136 #define RADEON_CUR2_HORZ_VERT_POSN 0x0364 137 #define RADEON_CUR2_OFFSET 0x0360 138 # define RADEON_CUR2_LOCK (1 << 31) 139 140 #endif 141