18f6c61bcSshadow303 /* 28f6c61bcSshadow303 Copyright (c) 2003, Thomas Kurschel 38f6c61bcSshadow303 48f6c61bcSshadow303 58f6c61bcSshadow303 Part of Radeon driver 68f6c61bcSshadow303 78f6c61bcSshadow303 TV-Out registers 88f6c61bcSshadow303 */ 98f6c61bcSshadow303 108f6c61bcSshadow303 #ifndef _TV_OUT_REGS_H 118f6c61bcSshadow303 #define _TV_OUT_REGS_H 128f6c61bcSshadow303 138f6c61bcSshadow303 #define RADEON_TV_MASTER_CNTL 0x0800 148f6c61bcSshadow303 # define RADEON_TV_MASTER_CNTL_TV_ASYNC_RST (1 << 0) 158f6c61bcSshadow303 # define RADEON_TV_MASTER_CNTL_CRT_ASYNC_RST (1 << 1) 168f6c61bcSshadow303 # define RADEON_TV_MASTER_CNTL_RESTART_PHASE_FIX (1 << 3) 178f6c61bcSshadow303 # define RADEON_TV_MASTER_CNTL_TV_FIFO_ASYNC_RST (1 << 4) 18*e02e12deSAxel Dörfler # define RADEON_TV_MASTER_CNTL_VIN_ASYNC_RST (1 << 5) 19*e02e12deSAxel Dörfler # define RADEON_TV_MASTER_CNTL_AUD_ASYNC_RST (1 << 6) 20*e02e12deSAxel Dörfler # define RADEON_TV_MASTER_CNTL_DVS_ASYNC_RST (1 << 7) 218f6c61bcSshadow303 # define RADEON_TV_MASTER_CNTL_CRT_FIFO_CE_EN (1 << 9) 228f6c61bcSshadow303 # define RADEON_TV_MASTER_CNTL_TV_FIFO_CE_EN (1 << 10) 238f6c61bcSshadow303 # define RADEON_TV_MASTER_CNTL_RE_SYNC_NOW_SEL_MASK (3 << 14) 24*e02e12deSAxel Dörfler # define RADEON_TV_MASTER_CNTL_TVCLK_ALWAYS_ONb (1 << 30) 258f6c61bcSshadow303 # define RADEON_TV_MASTER_CNTL_TV_ON (1 << 31) 268f6c61bcSshadow303 278f6c61bcSshadow303 #define RADEON_TV_RGB_CNTL 0x0804 288f6c61bcSshadow303 # define RADEON_TV_RGB_CNTL_RGB_SRC_SEL_SHIFT 8 298f6c61bcSshadow303 # define RADEON_TV_RGB_CNTL_RGB_DITHER_EN (1 << 5) 308f6c61bcSshadow303 # define RADEON_TV_RGB_CNTL_UVRAM_READ_MARGIN_SHIFT 16 318f6c61bcSshadow303 # define RADEON_TV_RGB_CNTL_FIFORAM_FIFOMACRO_READ_MARGIN_SHIFT 20 328f6c61bcSshadow303 338f6c61bcSshadow303 #define RADEON_TV_HTOTAL 0x080c 348f6c61bcSshadow303 #define RADEON_TV_HDISP 0x0810 358f6c61bcSshadow303 #define RADEON_TV_HSTART 0x0818 368f6c61bcSshadow303 #define RADEON_TV_VTOTAL 0x0820 378f6c61bcSshadow303 #define RADEON_TV_VDISP 0x0824 388f6c61bcSshadow303 #define RADEON_TV_FTOTAL 0x082c 398f6c61bcSshadow303 #define RADEON_TV_FRESTART 0x0834 408f6c61bcSshadow303 #define RADEON_TV_HRESTART 0x0838 418f6c61bcSshadow303 #define RADEON_TV_VRESTART 0x083c 428f6c61bcSshadow303 43*e02e12deSAxel Dörfler #define RADEON_TV_HOST_READ_DATA 0x0840 44*e02e12deSAxel Dörfler #define RADEON_TV_HOST_WRITE_DATA 0x0844 45*e02e12deSAxel Dörfler #define RADEON_TV_HOST_RD_WT_CNTL 0x0848 46*e02e12deSAxel Dörfler # define RADEON_TV_HOST_RD_WT_CNTL_RD (1 << 12) 47*e02e12deSAxel Dörfler # define RADEON_TV_HOST_RD_WT_CNTL_RD_ACK (1 << 13) 48*e02e12deSAxel Dörfler # define RADEON_TV_HOST_RD_WT_CNTL_WT (1 << 14) 49*e02e12deSAxel Dörfler # define RADEON_TV_HOST_RD_WT_CNTL_WT_ACK (1 << 15) 50*e02e12deSAxel Dörfler 51*e02e12deSAxel Dörfler 528f6c61bcSshadow303 #define RADEON_TV_VSCALER_CNTL1 0x084c 53*e02e12deSAxel Dörfler # define RADEON_TV_VSCALER_CNTL1_UV_INC_SHIFT 0 54*e02e12deSAxel Dörfler # define RADEON_TV_VSCALER_CNTL1_UV_INC_MASK 0x0000ffff 55*e02e12deSAxel Dörfler # define RADEON_TV_VSCALER_CNTL1_UV_THINNER_SHIFT 16 56*e02e12deSAxel Dörfler # define RADEON_TV_VSCALER_CNTL1_UV_THINNER_MASK 0x003f0000 57*e02e12deSAxel Dörfler # define RADEON_TV_VSCALER_CNTL1_Y_W_EN (1 << 24) 588f6c61bcSshadow303 # define RADEON_TV_VSCALER_CNTL1_Y_DEL_W_SIG_SHIFT 26 59*e02e12deSAxel Dörfler # define RADEON_TV_VSCALER_CNTL1_RESTART_FIELD (1 << 29) 60*e02e12deSAxel Dörfler 618f6c61bcSshadow303 628f6c61bcSshadow303 #define RADEON_TV_TIMING_CNTL 0x0850 638f6c61bcSshadow303 # define RADEON_TV_TIMING_CNTL_UV_OUTPUT_POST_SCALE_SHIFT 24 648f6c61bcSshadow303 658f6c61bcSshadow303 #define RADEON_TV_VSCALER_CNTL2 0x0854 668f6c61bcSshadow303 # define RADEON_TV_VSCALER_CNTL2_DITHER_MODE (1 << 0) 678f6c61bcSshadow303 # define RADEON_TV_VSCALER_CNTL2_Y_OUTPUT_DITHER_EN (1 << 1) 688f6c61bcSshadow303 # define RADEON_TV_VSCALER_CNTL2_UV_OUTPUT_DITHER_EN (1 << 2) 698f6c61bcSshadow303 # define RADEON_TV_VSCALER_CNTL2_UV_TO_BUF_DITHER_EN (1 << 3) 708f6c61bcSshadow303 # define RADEON_TV_VSCALER_CNTL2_UV_ACCUM_INIT_SHIFT 24 718f6c61bcSshadow303 728f6c61bcSshadow303 #define RADEON_TV_Y_FALL_CNTL 0x0858 738f6c61bcSshadow303 # define RADEON_TV_Y_FALL_CNTL_Y_FALL_PING_PONG (1 << 16) 748f6c61bcSshadow303 # define RADEON_TV_Y_FALL_CNTL_Y_COEFF_EN (1 << 17) 758f6c61bcSshadow303 # define RADEON_TV_Y_FALL_CNTL_Y_COEFF_VALUE_SHIFT 24 768f6c61bcSshadow303 778f6c61bcSshadow303 #define RADEON_TV_Y_RISE_CNTL 0x085c 78*e02e12deSAxel Dörfler # define RADEON_TV_Y_RISE_CNTL_Y_RISE_PING_PONG (1 << 16) 798f6c61bcSshadow303 808f6c61bcSshadow303 #define RADEON_TV_Y_SAW_TOOTH_CNTL 0x0860 818f6c61bcSshadow303 # define RADEON_TV_Y_SAW_TOOTH_CNTL_SLOPE_SHIFT 16 828f6c61bcSshadow303 83*e02e12deSAxel Dörfler #define RADEON_TV_UPSAMP_AND_GAIN_CNTL 0x0864 84*e02e12deSAxel Dörfler #define RADEON_TV_GAIN_LIMIT_SETTINGS 0x0868 85*e02e12deSAxel Dörfler #define RADEON_TV_LINEAR_GAIN_SETTINGS 0x086c 86*e02e12deSAxel Dörfler 878f6c61bcSshadow303 #define RADEON_TV_MODULATOR_CNTL1 0x0870 88*e02e12deSAxel Dörfler # define RADEON_TV_MODULATOR_CNTL1_YFLT_EN (1 << 2) 89*e02e12deSAxel Dörfler # define RADEON_TV_MODULATOR_CNTL1_UVFLT_EN (1 << 3) 908f6c61bcSshadow303 # define RADEON_TV_MODULATOR_CNTL1_ALT_PHASE_EN (1 << 6) 918f6c61bcSshadow303 # define RADEON_TV_MODULATOR_CNTL1_SYNC_TIP_LEVEL (1 << 7) 92*e02e12deSAxel Dörfler # define RADEON_TV_MODULATOR_CNTL1_SET_UP_LEVEL_SHIFT 8 938f6c61bcSshadow303 # define RADEON_TV_MODULATOR_CNTL1_SET_UP_LEVEL_MASK 0x00007f00 948f6c61bcSshadow303 # define RADEON_TV_MODULATOR_CNTL1_BLANK_LEVEL_SHIFT 16 958f6c61bcSshadow303 # define RADEON_TV_MODULATOR_CNTL1_BLANK_LEVEL_MASK 0x007f0000 96*e02e12deSAxel Dörfler # define RADEON_TV_MODULATOR_CNTL1_SLEW_RATE_LIMIT (1 << 23) 97*e02e12deSAxel Dörfler # define RADEON_TV_MODULATOR_CNTL1_CY_FILT_BLEND_SHIFT 28 988f6c61bcSshadow303 998f6c61bcSshadow303 #define RADEON_TV_MODULATOR_CNTL2 0x0874 1008f6c61bcSshadow303 # define TV_MODULATOR_CNTL2_U_BURST_LEVEL_MASK 0x1ff 1018f6c61bcSshadow303 # define TV_MODULATOR_CNTL2_V_BURST_LEVEL_MASK 0x1ff 1028f6c61bcSshadow303 # define TV_MODULATOR_CNTL2_V_BURST_LEVEL_SHIFT 16 1038f6c61bcSshadow303 1048f6c61bcSshadow303 #define RADEON_TV_PRE_DAC_MUX_CNTL 0x0888 1058f6c61bcSshadow303 # define RADEON_TV_PRE_DAC_MUX_CNTL_Y_RED_EN (1 << 0) 1068f6c61bcSshadow303 # define RADEON_TV_PRE_DAC_MUX_CNTL_C_GRN_EN (1 << 1) 1078f6c61bcSshadow303 # define RADEON_TV_PRE_DAC_MUX_CNTL_CMP_BLU_EN (1 << 2) 1088f6c61bcSshadow303 # define RADEON_TV_PRE_DAC_MUX_CNTL_DAC_DITHER_EN (1 << 3) 1098f6c61bcSshadow303 # define RADEON_TV_PRE_DAC_MUX_CNTL_RED_MX_SHIFT 4 1108f6c61bcSshadow303 # define RADEON_TV_PRE_DAC_MUX_CNTL_GRN_MX_SHIFT 8 1118f6c61bcSshadow303 # define RADEON_TV_PRE_DAC_MUX_CNTL_BLU_MX_SHIFT 12 1128f6c61bcSshadow303 # define RADEON_TV_MUX_FORCE_DAC_DATA 6 1138f6c61bcSshadow303 # define RADEON_TV_PRE_DAC_MUX_CNTL_FORCE_DAC_DATA_SHIFT 16 1148f6c61bcSshadow303 1158f6c61bcSshadow303 #define RADEON_TV_DAC_CNTL 0x088c 1168f6c61bcSshadow303 # define RADEON_TV_DAC_CNTL_NBLANK (1 << 0) 1178f6c61bcSshadow303 # define RADEON_TV_DAC_CNTL_NHOLD (1 << 1) 1188f6c61bcSshadow303 # define RADEON_TV_DAC_CNTL_PEDESTAL (1 << 2) 119*e02e12deSAxel Dörfler # define RADEON_TV_DAC_CNTL_DASLEEP (1 << 3) // Theatre only 1208f6c61bcSshadow303 # define RADEON_TV_DAC_CNTL_DETECT (1 << 4) 1218f6c61bcSshadow303 # define RADEON_TV_DAC_CNTL_CMPOUT (1 << 5) 1228f6c61bcSshadow303 # define RADEON_TV_DAC_CNTL_BGSLEEP (1 << 6) 1238f6c61bcSshadow303 # define RADEON_TV_DAC_CNTL_STD_PAL (0 << 8) 1248f6c61bcSshadow303 # define RADEON_TV_DAC_CNTL_STD_NTSC (1 << 8) 1258f6c61bcSshadow303 # define RADEON_TV_DAC_CNTL_STD_PS2 (2 << 8) 1268f6c61bcSshadow303 # define RADEON_TV_DAC_CNTL_STD_RS343 (3 << 8) 1278f6c61bcSshadow303 # define RADEON_TV_DAC_CNTL_BGADJ_SHIFT 16 1288f6c61bcSshadow303 # define RADEON_TV_DAC_CNTL_DACADJ_SHIFT 20 129*e02e12deSAxel Dörfler # define RADEON_TV_DAC_CNTL_RDACPD (1 << 24) 130*e02e12deSAxel Dörfler # define RADEON_TV_DAC_CNTL_GDACPD (1 << 25) 131*e02e12deSAxel Dörfler # define RADEON_TV_DAC_CNTL_BDACPD (1 << 26) 1328f6c61bcSshadow303 # define RADEON_TV_DAC_CNTL_RDACDET (1 << 29) 1338f6c61bcSshadow303 # define RADEON_TV_DAC_CNTL_GDACDET (1 << 30) 1348f6c61bcSshadow303 # define RADEON_TV_DAC_CNTL_BDACDET (1 << 31) 1358f6c61bcSshadow303 136*e02e12deSAxel Dörfler #define RADEON_TV_CRC_CNTL 0x0890 137*e02e12deSAxel Dörfler 1388f6c61bcSshadow303 #define RADEON_TV_UV_ADR 0x08ac 139*e02e12deSAxel Dörfler # define RADEON_TV_UV_ADR_MAX_UV_ADR_MASK 0x000000ff 140*e02e12deSAxel Dörfler # define RADEON_TV_UV_ADR_MAX_UV_ADR_SHIFT 0 141*e02e12deSAxel Dörfler # define RADEON_TV_UV_ADR_TABLE1_BOT_ADR_MASK 0x0000ff00 142*e02e12deSAxel Dörfler # define RADEON_TV_UV_ADR_TABLE1_BOT_ADR_SHIFT 8 143*e02e12deSAxel Dörfler # define RADEON_TV_UV_ADR_TABLE3_TOP_ADR_MASK 0x00ff0000 144*e02e12deSAxel Dörfler # define RADEON_TV_UV_ADR_TABLE3_TOP_ADR_SHIFT 16 145*e02e12deSAxel Dörfler # define RADEON_TV_UV_ADR_HCODE_TABLE_SEL_MASK 0x06000000 146*e02e12deSAxel Dörfler # define RADEON_TV_UV_ADR_HCODE_TABLE_SEL_SHIFT 25 147*e02e12deSAxel Dörfler # define RADEON_TV_UV_ADR_VCODE_TABLE_SEL_MASK 0x18000000 148*e02e12deSAxel Dörfler # define RADEON_TV_UV_ADR_VCODE_TABLE_SEL_SHIFT 27 149*e02e12deSAxel Dörfler #define RADEON_TV_MAX_FIFO_ADDR 0x1a7 150*e02e12deSAxel Dörfler #define RADEON_TV_MAX_FIFO_ADDR_INTERN 0x1ff 151*e02e12deSAxel Dörfler 1528f6c61bcSshadow303 1538f6c61bcSshadow303 #define RADEON_TV_PLL_FINE_CNTL 0x20 1548f6c61bcSshadow303 1558f6c61bcSshadow303 #define RADEON_TV_PLL_CNTL 0x21 1568f6c61bcSshadow303 # define RADEON_TV_PLL_CNTL_TV_M0_LO_MASK 0xff 1578f6c61bcSshadow303 # define RADEON_TV_PLL_CNTL_TV_N0_LO_MASK 0x1ff 1588f6c61bcSshadow303 # define RADEON_TV_PLL_CNTL_TV_N0_LO_SHIFT 8 1598f6c61bcSshadow303 # define RADEON_TV_PLL_CNTL_TV_M0_LO_BITS 8 1608f6c61bcSshadow303 # define RADEON_TV_PLL_CNTL_TV_M0_HI_SHIFT 18 1618f6c61bcSshadow303 # define RADEON_TV_PLL_CNTL_TV_N0_LO_BITS 9 1628f6c61bcSshadow303 # define RADEON_TV_PLL_CNTL_TV_N0_HI_SHIFT 21 1638f6c61bcSshadow303 # define RADEON_TV_PLL_CNTL_TV_SLIP_EN (1 << 23) 1648f6c61bcSshadow303 # define RADEON_TV_PLL_CNTL_TV_P_SHIFT 24 1658f6c61bcSshadow303 # define RADEON_TV_PLL_CNTL_TV_DTO_EN (1 << 28) 1668f6c61bcSshadow303 1678f6c61bcSshadow303 # define RADEON_TV_CRT_PLL_CNTL_M0_LO_MASK 0xff 1688f6c61bcSshadow303 # define RADEON_TV_CRT_PLL_CNTL_N0_LO_MASK 0x1ff 1698f6c61bcSshadow303 # define RADEON_TV_CRT_PLL_CNTL_N0_LO_SHIFT 8 1708f6c61bcSshadow303 # define RADEON_TV_CRT_PLL_CNTL_M0_LO_BITS 8 1718f6c61bcSshadow303 # define RADEON_TV_CRT_PLL_CNTL_M0_HI_SHIFT 18 1728f6c61bcSshadow303 # define RADEON_TV_CRT_PLL_CNTL_N0_LO_BITS 9 1738f6c61bcSshadow303 # define RADEON_TV_CRT_PLL_CNTL_N0_HI_SHIFT 21 1748f6c61bcSshadow303 # define RADEON_TV_CRT_PLL_CNTL_CLKBY2 (1 << 25) 1758f6c61bcSshadow303 1768f6c61bcSshadow303 1778f6c61bcSshadow303 #define RADEON_TV_PLL_CNTL1 0x22 1788f6c61bcSshadow303 # define RADEON_TV_PLL_CNTL1_TVPCP_SHIFT 8 1798f6c61bcSshadow303 # define RADEON_TV_PLL_CNTL1_TVPVG_SHIFT 11 1808f6c61bcSshadow303 # define RADEON_TV_PLL_CNTL1_TVPDC_SHIFT 14 1818f6c61bcSshadow303 # define RADEON_TV_PLL_CNTL1_TVCLK_SRC_SEL_CPUCLK (0 << 30) 1828f6c61bcSshadow303 # define RADEON_TV_PLL_CNTL1_TVCLK_SRC_SEL_TVPLLCLK (1 << 30) 1838f6c61bcSshadow303 # define RADEON_TV_PLL_CNTL1_TVPLL_TEST (1 << 31) 1848f6c61bcSshadow303 1858f6c61bcSshadow303 186*e02e12deSAxel Dörfler # define RADEON_TV_CLOCK_SEL_CNTL_BYTCLK_SHIFT 2 187*e02e12deSAxel Dörfler # define RADEON_TV_CLOCK_SEL_CNTL_BYTCLKD_SHIFT 8 188*e02e12deSAxel Dörfler 1898f6c61bcSshadow303 #endif 190