1 /* 2 Copyright (c) 2002, Thomas Kurschel 3 4 5 Part of Radeon driver 6 7 Flat Panel controller registers 8 */ 9 10 #ifndef _FP_REGS_H 11 #define _FP_REGS_H 12 13 #define RADEON_FP_CRTC_H_TOTAL_DISP 0x0250 14 #define RADEON_FP_CRTC_V_TOTAL_DISP 0x0254 15 #define RADEON_FP_GEN_CNTL 0x0284 16 # define RADEON_FP_FPON (1 << 0) 17 # define RADEON_FP_TMDS_EN (1 << 2) 18 # define RADEON_FP_PANEL_FORMAT (1 << 3) 19 # define RADEON_FP_EN_TMDS (1 << 7) 20 # define RADEON_FP_DETECT_SENSE (1 << 8) 21 # define RADEON_FP_SEL_CRTC2 (1 << 13) 22 # define RADEON_FP_CRTC_DONT_SHADOW_HPAR (1 << 15) 23 # define RADEON_FP_CRTC_DONT_SHADOW_VPAR (1 << 16) 24 # define RADEON_FP_CRTC_DONT_SHADOW_HEND (1 << 17) 25 # define RADEON_FP_CRTC_USE_SHADOW_VEND (1 << 18) 26 # define RADEON_FP_RMX_HVSYNC_CONTROL_EN (1 << 20) 27 # define RADEON_FP_DFP_SYNC_SEL (1 << 21) 28 # define RADEON_FP_CRTC_LOCK_8DOT (1 << 22) 29 # define RADEON_FP_CRT_SYNC_SEL (1 << 23) 30 # define RADEON_FP_USE_SHADOW_EN (1 << 24) 31 # define RADEON_FP_CRT_SYNC_ALT (1 << 26) 32 #define RADEON_FP2_GEN_CNTL 0x0288 33 # define RADEON_FP2_FPON (1 << 0) 34 # define RADEON_FP2_TMDS_EN (1 << 2) 35 # define RADEON_FP2_EN_TMDS (1 << 7) 36 # define RADEON_FP2_DETECT_SENSE (1 << 8) 37 # define RADEON_FP2_SEL_CRTC2 (1 << 13) 38 # define RADEON_FP2_FP_POL (1 << 16) 39 # define RADEON_FP2_LP_POL (1 << 17) 40 # define RADEON_FP2_SCK_POL (1 << 18) 41 # define RADEON_FP2_LCD_CNTL_MASK (7 << 19) 42 # define RADEON_FP2_PAD_FLOP_EN (1 << 22) 43 # define RADEON_FP2_CRC_EN (1 << 23) 44 # define RADEON_FP2_CRC_READ_EN (1 << 24) 45 #define RADEON_FP_HORZ_STRETCH 0x028c 46 # define RADEON_HORZ_STRETCH_RATIO_MASK 0xffff 47 # define RADEON_HORZ_STRETCH_RATIO_MAX 4096 48 # define RADEON_HORZ_PANEL_SIZE (0x1ff << 16) 49 # define RADEON_HORZ_PANEL_SHIFT 16 50 # define RADEON_HORZ_STRETCH_PIXREP (0 << 25) 51 # define RADEON_HORZ_STRETCH_BLEND (1 << 26) 52 # define RADEON_HORZ_STRETCH_ENABLE (1 << 25) 53 # define RADEON_HORZ_AUTO_RATIO (1 << 27) 54 # define RADEON_HORZ_FP_LOOP_STRETCH (0x7 << 28) 55 # define RADEON_HORZ_AUTO_RATIO_INC (1 << 31) 56 #define RADEON_FP_VERT_STRETCH 0x0290 57 # define RADEON_VERT_PANEL_SIZE (0xfff << 12) 58 # define RADEON_VERT_PANEL_SHIFT 12 59 # define RADEON_VERT_STRETCH_RATIO_MASK 0xfff 60 # define RADEON_VERT_STRETCH_RATIO_SHIFT 0 61 # define RADEON_VERT_STRETCH_RATIO_MAX 4096 62 # define RADEON_VERT_STRETCH_ENABLE (1 << 25) 63 # define RADEON_VERT_STRETCH_LINEREP (0 << 26) 64 # define RADEON_VERT_STRETCH_BLEND (1 << 26) 65 # define RADEON_VERT_AUTO_RATIO_EN (1 << 27) 66 # define RADEON_VERT_STRETCH_RESERVED 0xf1000000 67 #define RADEON_FP_H_SYNC_STRT_WID 0x02c4 68 #define RADEON_FP_V_SYNC_STRT_WID 0x02c8 69 70 #define RADEON_LVDS_GEN_CNTL 0x02d0 71 # define RADEON_LVDS_ON (1 << 0) 72 # define RADEON_LVDS_DISPLAY_DIS (1 << 1) 73 # define RADEON_LVDS_PANEL_TYPE (1 << 2) 74 # define RADEON_LVDS_PANEL_FORMAT (1 << 3) 75 # define RADEON_LVDS_EN (1 << 7) 76 # define RADEON_LVDS_DIGON (1 << 18) 77 # define RADEON_LVDS_BLON (1 << 19) 78 # define RADEON_LVDS_SEL_CRTC2 (1 << 23) 79 80 #define RADEON_FP_CRTC2_H_TOTAL_DISP 0x0350 81 #define RADEON_FP_CRTC2_V_TOTAL_DISP 0x0354 82 /*added for FP support------------------------------------------*/ 83 # define RADEON_FP_CRTC_H_TOTAL_MASK 0x000003ff 84 # define RADEON_FP_CRTC_H_DISP_MASK 0x01ff0000 85 # define RADEON_FP_CRTC_V_TOTAL_MASK 0x00000fff 86 # define RADEON_FP_CRTC_V_DISP_MASK 0x0fff0000 87 # define RADEON_FP_H_SYNC_STRT_CHAR_MASK 0x00001ff8 88 # define RADEON_FP_H_SYNC_WID_MASK 0x003f0000 89 # define RADEON_FP_V_SYNC_STRT_MASK 0x00000fff 90 # define RADEON_FP_V_SYNC_WID_MASK 0x001f0000 91 # define RADEON_FP_CRTC_H_TOTAL_SHIFT 0x00000000 92 # define RADEON_FP_CRTC_H_DISP_SHIFT 0x00000010 93 # define RADEON_FP_CRTC_V_TOTAL_SHIFT 0x00000000 94 # define RADEON_FP_CRTC_V_DISP_SHIFT 0x00000010 95 # define RADEON_FP_H_SYNC_STRT_CHAR_SHIFT 0x00000003 96 # define RADEON_FP_H_SYNC_WID_SHIFT 0x00000010 97 # define RADEON_FP_V_SYNC_STRT_SHIFT 0x00000000 98 # define RADEON_FP_V_SYNC_WID_SHIFT 0x00000010 99 /*-----------------------------------------------------------------*/ 100 101 #define RADEON_FP_HORZ2_STRETCH 0x038c 102 #define RADEON_FP_VERT2_STRETCH 0x0390 103 #define RADEON_FP_H2_SYNC_STRT_WID 0x03c4 104 105 #define RADEON_FP_V2_SYNC_STRT_WID 0x03c8 106 107 108 #endif 109