linux/drivers/gpu/drm/radeon/r500_reg.h

/*
 * Copyright 2008 Advanced Micro Devices, Inc.
 * Copyright 2008 Red Hat Inc.
 * Copyright 2009 Jerome Glisse.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 * Authors: Dave Airlie
 *          Alex Deucher
 *          Jerome Glisse
 */
#ifndef __R500_REG_H__
#define __R500_REG_H__

/* pipe config regs */
#define R300_GA_POLY_MODE
#define R300_FRONT_PTYPE_POINT
#define R300_FRONT_PTYPE_LINE
#define R300_FRONT_PTYPE_TRIANGE
#define R300_BACK_PTYPE_POINT
#define R300_BACK_PTYPE_LINE
#define R300_BACK_PTYPE_TRIANGE
#define R300_GA_ROUND_MODE
#define R300_GEOMETRY_ROUND_TRUNC
#define R300_GEOMETRY_ROUND_NEAREST
#define R300_COLOR_ROUND_TRUNC
#define R300_COLOR_ROUND_NEAREST
#define R300_GB_MSPOS0
#define R300_MS_X0_SHIFT
#define R300_MS_Y0_SHIFT
#define R300_MS_X1_SHIFT
#define R300_MS_Y1_SHIFT
#define R300_MS_X2_SHIFT
#define R300_MS_Y2_SHIFT
#define R300_MSBD0_Y_SHIFT
#define R300_MSBD0_X_SHIFT
#define R300_GB_MSPOS1
#define R300_MS_X3_SHIFT
#define R300_MS_Y3_SHIFT
#define R300_MS_X4_SHIFT
#define R300_MS_Y4_SHIFT
#define R300_MS_X5_SHIFT
#define R300_MS_Y5_SHIFT
#define R300_MSBD1_SHIFT

#define R300_GA_ENHANCE
#define R300_GA_DEADLOCK_CNTL
#define R300_GA_FASTSYNC_CNTL
#define R300_RB3D_DSTCACHE_CTLSTAT
#define R300_RB3D_DC_FLUSH
#define R300_RB3D_DC_FREE
#define R300_RB3D_DC_FINISH
#define R300_RB3D_ZCACHE_CTLSTAT
#define R300_ZC_FLUSH
#define R300_ZC_FREE
#define R300_ZC_FLUSH_ALL
#define R400_GB_PIPE_SELECT
#define R500_DYN_SCLK_PWMEM_PIPE
#define R500_SU_REG_DEST
#define R300_GB_TILE_CONFIG
#define R300_ENABLE_TILING
#define R300_PIPE_COUNT_RV350
#define R300_PIPE_COUNT_R300
#define R300_PIPE_COUNT_R420_3P
#define R300_PIPE_COUNT_R420
#define R300_TILE_SIZE_8
#define R300_TILE_SIZE_16
#define R300_TILE_SIZE_32
#define R300_SUBPIXEL_1_12
#define R300_SUBPIXEL_1_16
#define R300_DST_PIPE_CONFIG
#define R300_PIPE_AUTO_CONFIG
#define R300_RB2D_DSTCACHE_MODE
#define R300_DC_AUTOFLUSH_ENABLE
#define R300_DC_DC_DISABLE_IGNORE_PE

#define RADEON_CP_STAT
#define RADEON_RBBM_CMDFIFO_ADDR
#define RADEON_RBBM_CMDFIFO_DATA
#define RADEON_ISYNC_CNTL
#define RADEON_ISYNC_ANY2D_IDLE3D
#define RADEON_ISYNC_ANY3D_IDLE2D
#define RADEON_ISYNC_TRIG2D_IDLE3D
#define RADEON_ISYNC_TRIG3D_IDLE2D
#define RADEON_ISYNC_WAIT_IDLEGUI
#define RADEON_ISYNC_CPSCRATCH_IDLEGUI

#define RS480_NB_MC_INDEX
#define RS480_NB_MC_IND_WR_EN
#define RS480_NB_MC_DATA

/*
 * RS690
 */
#define RS690_MCCFG_FB_LOCATION
#define RS690_MC_FB_START_MASK
#define RS690_MC_FB_START_SHIFT
#define RS690_MC_FB_TOP_MASK
#define RS690_MC_FB_TOP_SHIFT
#define RS690_MCCFG_AGP_LOCATION
#define RS690_MC_AGP_START_MASK
#define RS690_MC_AGP_START_SHIFT
#define RS690_MC_AGP_TOP_MASK
#define RS690_MC_AGP_TOP_SHIFT
#define RS690_MCCFG_AGP_BASE
#define RS690_MCCFG_AGP_BASE_2
#define RS690_MC_INIT_MISC_LAT_TIMER
#define RS690_HDP_FB_LOCATION
#define RS690_MC_INDEX
#define RS690_MC_INDEX_MASK
#define RS690_MC_INDEX_WR_EN
#define RS690_MC_INDEX_WR_ACK
#define RS690_MC_DATA
#define RS690_MC_STATUS
#define RS690_MC_STATUS_IDLE
#define RS480_AGP_BASE_2
#define RS480_MC_MISC_CNTL
#define RS480_DISABLE_GTW
#define RS480_GART_INDEX_REG_EN
#define RS690_BLOCK_GFX_D3_EN
#define RS480_GART_FEATURE_ID
#define RS480_HANG_EN
#define RS480_TLB_ENABLE
#define RS480_P2P_ENABLE
#define RS480_GTW_LAC_EN
#define RS480_2LEVEL_GART
#define RS480_1LEVEL_GART
#define RS480_PDC_EN
#define RS480_GART_BASE
#define RS480_GART_CACHE_CNTRL
#define RS480_GART_CACHE_INVALIDATE
#define RS480_AGP_ADDRESS_SPACE_SIZE
#define RS480_GART_EN
#define RS480_VA_SIZE_32MB
#define RS480_VA_SIZE_64MB
#define RS480_VA_SIZE_128MB
#define RS480_VA_SIZE_256MB
#define RS480_VA_SIZE_512MB
#define RS480_VA_SIZE_1GB
#define RS480_VA_SIZE_2GB
#define RS480_AGP_MODE_CNTL
#define RS480_POST_GART_Q_SIZE
#define RS480_NONGART_SNOOP
#define RS480_AGP_RD_BUF_SIZE
#define RS480_REQ_TYPE_SNOOP_SHIFT
#define RS480_REQ_TYPE_SNOOP_MASK
#define RS480_REQ_TYPE_SNOOP_DIS

#define RS690_AIC_CTRL_SCRATCH
#define RS690_DIS_OUT_OF_PCI_GART_ACCESS

/*
 * RS600
 */
#define RS600_MC_STATUS
#define RS600_MC_STATUS_IDLE
#define RS600_MC_INDEX
#define RS600_MC_ADDR_MASK
#define RS600_MC_IND_SEQ_RBS_0
#define RS600_MC_IND_SEQ_RBS_1
#define RS600_MC_IND_SEQ_RBS_2
#define RS600_MC_IND_SEQ_RBS_3
#define RS600_MC_IND_AIC_RBS
#define RS600_MC_IND_CITF_ARB0
#define RS600_MC_IND_CITF_ARB1
#define RS600_MC_IND_WR_EN
#define RS600_MC_DATA
#define RS600_MC_STATUS
#define RS600_MC_IDLE
#define RS600_MC_FB_LOCATION
#define RS600_MC_FB_START_MASK
#define RS600_MC_FB_START_SHIFT
#define RS600_MC_FB_TOP_MASK
#define RS600_MC_FB_TOP_SHIFT
#define RS600_MC_AGP_LOCATION
#define RS600_MC_AGP_START_MASK
#define RS600_MC_AGP_START_SHIFT
#define RS600_MC_AGP_TOP_MASK
#define RS600_MC_AGP_TOP_SHIFT
#define RS600_MC_AGP_BASE
#define RS600_MC_AGP_BASE_2
#define RS600_MC_CNTL1
#define RS600_ENABLE_PAGE_TABLES
#define RS600_MC_PT0_CNTL
#define RS600_ENABLE_PT
#define RS600_EFFECTIVE_L2_CACHE_SIZE(x)
#define RS600_EFFECTIVE_L2_QUEUE_SIZE(x)
#define RS600_INVALIDATE_ALL_L1_TLBS
#define RS600_INVALIDATE_L2_CACHE
#define RS600_MC_PT0_CONTEXT0_CNTL
#define RS600_ENABLE_PAGE_TABLE
#define RS600_PAGE_TABLE_TYPE_FLAT
#define RS600_MC_PT0_SYSTEM_APERTURE_LOW_ADDR
#define RS600_MC_PT0_SYSTEM_APERTURE_HIGH_ADDR
#define RS600_MC_PT0_CONTEXT0_DEFAULT_READ_ADDR
#define RS600_MC_PT0_CONTEXT0_FLAT_BASE_ADDR
#define RS600_MC_PT0_CONTEXT0_FLAT_START_ADDR
#define RS600_MC_PT0_CONTEXT0_FLAT_END_ADDR
#define RS600_MC_PT0_CLIENT0_CNTL
#define RS600_ENABLE_TRANSLATION_MODE_OVERRIDE
#define RS600_TRANSLATION_MODE_OVERRIDE
#define RS600_SYSTEM_ACCESS_MODE_MASK
#define RS600_SYSTEM_ACCESS_MODE_PA_ONLY
#define RS600_SYSTEM_ACCESS_MODE_USE_SYS_MAP
#define RS600_SYSTEM_ACCESS_MODE_IN_SYS
#define RS600_SYSTEM_ACCESS_MODE_NOT_IN_SYS
#define RS600_SYSTEM_APERTURE_UNMAPPED_ACCESS_PASSTHROUGH
#define RS600_SYSTEM_APERTURE_UNMAPPED_ACCESS_DEFAULT_PAGE
#define RS600_EFFECTIVE_L1_CACHE_SIZE(x)
#define RS600_ENABLE_FRAGMENT_PROCESSING
#define RS600_EFFECTIVE_L1_QUEUE_SIZE(x)
#define RS600_INVALIDATE_L1_TLB
/* rs600/rs690/rs740 */
#define RS600_BUS_MASTER_DIS
#define RS600_MSI_REARM
/* see RS400_MSI_REARM in AIC_CNTL for rs480 */



#define RV515_MC_FB_LOCATION
#define RV515_MC_FB_START_MASK
#define RV515_MC_FB_START_SHIFT
#define RV515_MC_FB_TOP_MASK
#define RV515_MC_FB_TOP_SHIFT
#define RV515_MC_AGP_LOCATION
#define RV515_MC_AGP_START_MASK
#define RV515_MC_AGP_START_SHIFT
#define RV515_MC_AGP_TOP_MASK
#define RV515_MC_AGP_TOP_SHIFT
#define RV515_MC_AGP_BASE
#define RV515_MC_AGP_BASE_2

#define R520_MC_FB_LOCATION
#define R520_MC_FB_START_MASK
#define R520_MC_FB_START_SHIFT
#define R520_MC_FB_TOP_MASK
#define R520_MC_FB_TOP_SHIFT
#define R520_MC_AGP_LOCATION
#define R520_MC_AGP_START_MASK
#define R520_MC_AGP_START_SHIFT
#define R520_MC_AGP_TOP_MASK
#define R520_MC_AGP_TOP_SHIFT
#define R520_MC_AGP_BASE
#define R520_MC_AGP_BASE_2


#define AVIVO_MC_INDEX
#define R520_MC_STATUS
#define R520_MC_STATUS_IDLE
#define RV515_MC_STATUS
#define RV515_MC_STATUS_IDLE
#define RV515_MC_INIT_MISC_LAT_TIMER
#define AVIVO_MC_DATA

#define R520_MC_IND_INDEX
#define R520_MC_IND_WR_EN
#define R520_MC_IND_DATA

#define RV515_MC_CNTL
#define RV515_MEM_NUM_CHANNELS_MASK
#define R520_MC_CNTL0
#define R520_MEM_NUM_CHANNELS_MASK
#define R520_MEM_NUM_CHANNELS_SHIFT
#define R520_MC_CHANNEL_SIZE

#define AVIVO_CP_DYN_CNTL
#define AVIVO_CP_FORCEON
#define AVIVO_E2_DYN_CNTL
#define AVIVO_E2_FORCEON
#define AVIVO_IDCT_DYN_CNTL
#define AVIVO_IDCT_FORCEON

#define AVIVO_HDP_FB_LOCATION

#define AVIVO_VGA_RENDER_CONTROL
#define AVIVO_VGA_VSTATUS_CNTL_MASK
#define AVIVO_D1VGA_CONTROL
#define AVIVO_DVGA_CONTROL_MODE_ENABLE
#define AVIVO_DVGA_CONTROL_TIMING_SELECT
#define AVIVO_DVGA_CONTROL_SYNC_POLARITY_SELECT
#define AVIVO_DVGA_CONTROL_OVERSCAN_TIMING_SELECT
#define AVIVO_DVGA_CONTROL_OVERSCAN_COLOR_EN
#define AVIVO_DVGA_CONTROL_ROTATE
#define AVIVO_D2VGA_CONTROL

#define AVIVO_EXT1_PPLL_REF_DIV_SRC
#define AVIVO_EXT1_PPLL_REF_DIV
#define AVIVO_EXT1_PPLL_UPDATE_LOCK
#define AVIVO_EXT1_PPLL_UPDATE_CNTL

#define AVIVO_EXT2_PPLL_REF_DIV_SRC
#define AVIVO_EXT2_PPLL_REF_DIV
#define AVIVO_EXT2_PPLL_UPDATE_LOCK
#define AVIVO_EXT2_PPLL_UPDATE_CNTL

#define AVIVO_EXT1_PPLL_FB_DIV
#define AVIVO_EXT2_PPLL_FB_DIV

#define AVIVO_EXT1_PPLL_POST_DIV_SRC
#define AVIVO_EXT1_PPLL_POST_DIV

#define AVIVO_EXT2_PPLL_POST_DIV_SRC
#define AVIVO_EXT2_PPLL_POST_DIV

#define AVIVO_EXT1_PPLL_CNTL
#define AVIVO_EXT2_PPLL_CNTL

#define AVIVO_P1PLL_CNTL
#define AVIVO_P2PLL_CNTL
#define AVIVO_P1PLL_INT_SS_CNTL
#define AVIVO_P2PLL_INT_SS_CNTL
#define AVIVO_P1PLL_TMDSA_CNTL
#define AVIVO_P2PLL_LVTMA_CNTL

#define AVIVO_PCLK_CRTC1_CNTL
#define AVIVO_PCLK_CRTC2_CNTL

#define AVIVO_D1CRTC_H_TOTAL
#define AVIVO_D1CRTC_H_BLANK_START_END
#define AVIVO_D1CRTC_H_SYNC_A
#define AVIVO_D1CRTC_H_SYNC_A_CNTL
#define AVIVO_D1CRTC_H_SYNC_B
#define AVIVO_D1CRTC_H_SYNC_B_CNTL

#define AVIVO_D1CRTC_V_TOTAL
#define AVIVO_D1CRTC_V_BLANK_START_END
#define AVIVO_D1CRTC_V_SYNC_A
#define AVIVO_D1CRTC_V_SYNC_A_CNTL
#define AVIVO_D1CRTC_V_SYNC_B
#define AVIVO_D1CRTC_V_SYNC_B_CNTL

#define AVIVO_D1CRTC_CONTROL
#define AVIVO_CRTC_EN
#define AVIVO_CRTC_DISP_READ_REQUEST_DISABLE
#define AVIVO_D1CRTC_BLANK_CONTROL
#define AVIVO_D1CRTC_INTERLACE_CONTROL
#define AVIVO_D1CRTC_INTERLACE_STATUS
#define AVIVO_D1CRTC_STATUS
#define AVIVO_D1CRTC_V_BLANK
#define AVIVO_D1CRTC_STATUS_POSITION
#define AVIVO_D1CRTC_FRAME_COUNT
#define AVIVO_D1CRTC_STATUS_HV_COUNT
#define AVIVO_D1CRTC_STEREO_CONTROL

#define AVIVO_D1MODE_MASTER_UPDATE_LOCK
#define AVIVO_D1MODE_MASTER_UPDATE_MODE
#define AVIVO_D1CRTC_UPDATE_LOCK

/* master controls */
#define AVIVO_DC_CRTC_MASTER_EN
#define AVIVO_DC_CRTC_TV_CONTROL

#define AVIVO_D1GRPH_ENABLE
#define AVIVO_D1GRPH_CONTROL
#define AVIVO_D1GRPH_CONTROL_DEPTH_8BPP
#define AVIVO_D1GRPH_CONTROL_DEPTH_16BPP
#define AVIVO_D1GRPH_CONTROL_DEPTH_32BPP
#define AVIVO_D1GRPH_CONTROL_DEPTH_64BPP

#define AVIVO_D1GRPH_CONTROL_8BPP_INDEXED

#define AVIVO_D1GRPH_CONTROL_16BPP_ARGB1555
#define AVIVO_D1GRPH_CONTROL_16BPP_RGB565
#define AVIVO_D1GRPH_CONTROL_16BPP_ARGB4444
#define AVIVO_D1GRPH_CONTROL_16BPP_AI88
#define AVIVO_D1GRPH_CONTROL_16BPP_MONO16

#define AVIVO_D1GRPH_CONTROL_32BPP_ARGB8888
#define AVIVO_D1GRPH_CONTROL_32BPP_ARGB2101010
#define AVIVO_D1GRPH_CONTROL_32BPP_DIGITAL
#define AVIVO_D1GRPH_CONTROL_32BPP_8B_ARGB2101010


#define AVIVO_D1GRPH_CONTROL_64BPP_ARGB16161616

#define AVIVO_D1GRPH_SWAP_RB
#define AVIVO_D1GRPH_TILED
#define AVIVO_D1GRPH_MACRO_ADDRESS_MODE

#define R600_D1GRPH_ARRAY_MODE_LINEAR_GENERAL
#define R600_D1GRPH_ARRAY_MODE_LINEAR_ALIGNED
#define R600_D1GRPH_ARRAY_MODE_1D_TILED_THIN1
#define R600_D1GRPH_ARRAY_MODE_2D_TILED_THIN1

/* The R7xx *_HIGH surface regs are backwards; the D1 regs are in the D2
 * block and vice versa.  This applies to GRPH, CUR, etc.
 */
#define AVIVO_D1GRPH_LUT_SEL
#define AVIVO_LUT_10BIT_BYPASS_EN
#define AVIVO_D1GRPH_PRIMARY_SURFACE_ADDRESS
#define R700_D1GRPH_PRIMARY_SURFACE_ADDRESS_HIGH
#define R700_D2GRPH_PRIMARY_SURFACE_ADDRESS_HIGH
#define AVIVO_D1GRPH_SECONDARY_SURFACE_ADDRESS
#define R700_D1GRPH_SECONDARY_SURFACE_ADDRESS_HIGH
#define R700_D2GRPH_SECONDARY_SURFACE_ADDRESS_HIGH
#define AVIVO_D1GRPH_PITCH
#define AVIVO_D1GRPH_SURFACE_OFFSET_X
#define AVIVO_D1GRPH_SURFACE_OFFSET_Y
#define AVIVO_D1GRPH_X_START
#define AVIVO_D1GRPH_Y_START
#define AVIVO_D1GRPH_X_END
#define AVIVO_D1GRPH_Y_END
#define AVIVO_D1GRPH_UPDATE
#define AVIVO_D1GRPH_SURFACE_UPDATE_PENDING
#define AVIVO_D1GRPH_UPDATE_LOCK
#define AVIVO_D1GRPH_FLIP_CONTROL
#define AVIVO_D1GRPH_SURFACE_UPDATE_H_RETRACE_EN

#define AVIVO_D1CUR_CONTROL
#define AVIVO_D1CURSOR_EN
#define AVIVO_D1CURSOR_MODE_SHIFT
#define AVIVO_D1CURSOR_MODE_MASK
#define AVIVO_D1CURSOR_MODE_24BPP
#define AVIVO_D1CUR_SURFACE_ADDRESS
#define R700_D1CUR_SURFACE_ADDRESS_HIGH
#define R700_D2CUR_SURFACE_ADDRESS_HIGH
#define AVIVO_D1CUR_SIZE
#define AVIVO_D1CUR_POSITION
#define AVIVO_D1CUR_HOT_SPOT
#define AVIVO_D1CUR_UPDATE
#define AVIVO_D1CURSOR_UPDATE_LOCK

#define AVIVO_DC_LUT_RW_SELECT
#define AVIVO_DC_LUT_RW_MODE
#define AVIVO_DC_LUT_RW_INDEX
#define AVIVO_DC_LUT_SEQ_COLOR
#define AVIVO_DC_LUT_PWL_DATA
#define AVIVO_DC_LUT_30_COLOR
#define AVIVO_DC_LUT_READ_PIPE_SELECT
#define AVIVO_DC_LUT_WRITE_EN_MASK
#define AVIVO_DC_LUT_AUTOFILL

#define AVIVO_DC_LUTA_CONTROL
#define AVIVO_DC_LUTA_BLACK_OFFSET_BLUE
#define AVIVO_DC_LUTA_BLACK_OFFSET_GREEN
#define AVIVO_DC_LUTA_BLACK_OFFSET_RED
#define AVIVO_DC_LUTA_WHITE_OFFSET_BLUE
#define AVIVO_DC_LUTA_WHITE_OFFSET_GREEN
#define AVIVO_DC_LUTA_WHITE_OFFSET_RED

#define AVIVO_DC_LB_MEMORY_SPLIT
#define AVIVO_DC_LB_MEMORY_SPLIT_MASK
#define AVIVO_DC_LB_MEMORY_SPLIT_SHIFT
#define AVIVO_DC_LB_MEMORY_SPLIT_D1HALF_D2HALF
#define AVIVO_DC_LB_MEMORY_SPLIT_D1_3Q_D2_1Q
#define AVIVO_DC_LB_MEMORY_SPLIT_D1_ONLY
#define AVIVO_DC_LB_MEMORY_SPLIT_D1_1Q_D2_3Q
#define AVIVO_DC_LB_MEMORY_SPLIT_SHIFT_MODE
#define AVIVO_DC_LB_DISP1_END_ADR_SHIFT
#define AVIVO_DC_LB_DISP1_END_ADR_MASK

#define AVIVO_D1MODE_DATA_FORMAT
#define AVIVO_D1MODE_INTERLEAVE_EN
#define AVIVO_D1MODE_DESKTOP_HEIGHT
#define AVIVO_D1MODE_VBLANK_STATUS
#define AVIVO_VBLANK_ACK
#define AVIVO_D1MODE_VLINE_START_END
#define AVIVO_D1MODE_VLINE_STATUS
#define AVIVO_D1MODE_VLINE_STAT
#define AVIVO_DxMODE_INT_MASK
#define AVIVO_D1MODE_INT_MASK
#define AVIVO_D2MODE_INT_MASK
#define AVIVO_D1MODE_VIEWPORT_START
#define AVIVO_D1MODE_VIEWPORT_SIZE
#define AVIVO_D1MODE_EXT_OVERSCAN_LEFT_RIGHT
#define AVIVO_D1MODE_EXT_OVERSCAN_TOP_BOTTOM

#define AVIVO_D1SCL_SCALER_ENABLE
#define AVIVO_D1SCL_SCALER_TAP_CONTROL
#define AVIVO_D1SCL_UPDATE
#define AVIVO_D1SCL_UPDATE_LOCK

/* second crtc */
#define AVIVO_D2CRTC_H_TOTAL
#define AVIVO_D2CRTC_H_BLANK_START_END
#define AVIVO_D2CRTC_H_SYNC_A
#define AVIVO_D2CRTC_H_SYNC_A_CNTL
#define AVIVO_D2CRTC_H_SYNC_B
#define AVIVO_D2CRTC_H_SYNC_B_CNTL

#define AVIVO_D2CRTC_V_TOTAL
#define AVIVO_D2CRTC_V_BLANK_START_END
#define AVIVO_D2CRTC_V_SYNC_A
#define AVIVO_D2CRTC_V_SYNC_A_CNTL
#define AVIVO_D2CRTC_V_SYNC_B
#define AVIVO_D2CRTC_V_SYNC_B_CNTL

#define AVIVO_D2CRTC_CONTROL
#define AVIVO_D2CRTC_BLANK_CONTROL
#define AVIVO_D2CRTC_INTERLACE_CONTROL
#define AVIVO_D2CRTC_INTERLACE_STATUS
#define AVIVO_D2CRTC_STATUS_POSITION
#define AVIVO_D2CRTC_FRAME_COUNT
#define AVIVO_D2CRTC_STEREO_CONTROL

#define AVIVO_D2GRPH_ENABLE
#define AVIVO_D2GRPH_CONTROL
#define AVIVO_D2GRPH_LUT_SEL
#define AVIVO_D2GRPH_PRIMARY_SURFACE_ADDRESS
#define AVIVO_D2GRPH_SECONDARY_SURFACE_ADDRESS
#define AVIVO_D2GRPH_PITCH
#define AVIVO_D2GRPH_SURFACE_OFFSET_X
#define AVIVO_D2GRPH_SURFACE_OFFSET_Y
#define AVIVO_D2GRPH_X_START
#define AVIVO_D2GRPH_Y_START
#define AVIVO_D2GRPH_X_END
#define AVIVO_D2GRPH_Y_END
#define AVIVO_D2GRPH_UPDATE
#define AVIVO_D2GRPH_FLIP_CONTROL

#define AVIVO_D2CUR_CONTROL
#define AVIVO_D2CUR_SURFACE_ADDRESS
#define AVIVO_D2CUR_SIZE
#define AVIVO_D2CUR_POSITION

#define AVIVO_D2MODE_VBLANK_STATUS
#define AVIVO_D2MODE_VLINE_START_END
#define AVIVO_D2MODE_VLINE_STATUS
#define AVIVO_D2MODE_VIEWPORT_START
#define AVIVO_D2MODE_VIEWPORT_SIZE
#define AVIVO_D2MODE_EXT_OVERSCAN_LEFT_RIGHT
#define AVIVO_D2MODE_EXT_OVERSCAN_TOP_BOTTOM

#define AVIVO_D2SCL_SCALER_ENABLE
#define AVIVO_D2SCL_SCALER_TAP_CONTROL

#define AVIVO_DDIA_BIT_DEPTH_CONTROL

#define AVIVO_DACA_ENABLE
#define AVIVO_DAC_ENABLE
#define AVIVO_DACA_SOURCE_SELECT
#define AVIVO_DAC_SOURCE_CRTC1
#define AVIVO_DAC_SOURCE_CRTC2
#define AVIVO_DAC_SOURCE_TV

#define AVIVO_DACA_FORCE_OUTPUT_CNTL
#define AVIVO_DACA_FORCE_OUTPUT_CNTL_FORCE_DATA_EN
#define AVIVO_DACA_FORCE_OUTPUT_CNTL_DATA_SEL_SHIFT
#define AVIVO_DACA_FORCE_OUTPUT_CNTL_DATA_SEL_BLUE
#define AVIVO_DACA_FORCE_OUTPUT_CNTL_DATA_SEL_GREEN
#define AVIVO_DACA_FORCE_OUTPUT_CNTL_DATA_SEL_RED
#define AVIVO_DACA_FORCE_OUTPUT_CNTL_DATA_ON_BLANKB_ONLY
#define AVIVO_DACA_POWERDOWN
#define AVIVO_DACA_POWERDOWN_POWERDOWN
#define AVIVO_DACA_POWERDOWN_BLUE
#define AVIVO_DACA_POWERDOWN_GREEN
#define AVIVO_DACA_POWERDOWN_RED

#define AVIVO_DACB_ENABLE
#define AVIVO_DACB_SOURCE_SELECT
#define AVIVO_DACB_FORCE_OUTPUT_CNTL
#define AVIVO_DACB_FORCE_OUTPUT_CNTL_FORCE_DATA_EN
#define AVIVO_DACB_FORCE_OUTPUT_CNTL_DATA_SEL_SHIFT
#define AVIVO_DACB_FORCE_OUTPUT_CNTL_DATA_SEL_BLUE
#define AVIVO_DACB_FORCE_OUTPUT_CNTL_DATA_SEL_GREEN
#define AVIVO_DACB_FORCE_OUTPUT_CNTL_DATA_SEL_RED
#define AVIVO_DACB_FORCE_OUTPUT_CNTL_DATA_ON_BLANKB_ONLY
#define AVIVO_DACB_POWERDOWN
#define AVIVO_DACB_POWERDOWN_POWERDOWN
#define AVIVO_DACB_POWERDOWN_BLUE
#define AVIVO_DACB_POWERDOWN_GREEN
#define AVIVO_DACB_POWERDOWN_RED

#define AVIVO_TMDSA_CNTL
#define AVIVO_TMDSA_CNTL_ENABLE
#define AVIVO_TMDSA_CNTL_HDMI_EN
#define AVIVO_TMDSA_CNTL_HPD_MASK
#define AVIVO_TMDSA_CNTL_HPD_SELECT
#define AVIVO_TMDSA_CNTL_SYNC_PHASE
#define AVIVO_TMDSA_CNTL_PIXEL_ENCODING
#define AVIVO_TMDSA_CNTL_DUAL_LINK_ENABLE
#define AVIVO_TMDSA_CNTL_SWAP
#define AVIVO_TMDSA_SOURCE_SELECT
/* 78a8 appears to be some kind of (reasonably tolerant) clock?
 * 78d0 definitely hits the transmitter, definitely clock. */
/* MYSTERY1 This appears to control dithering? */
#define AVIVO_TMDSA_BIT_DEPTH_CONTROL
#define AVIVO_TMDS_BIT_DEPTH_CONTROL_TRUNCATE_EN
#define AVIVO_TMDS_BIT_DEPTH_CONTROL_TRUNCATE_DEPTH
#define AVIVO_TMDS_BIT_DEPTH_CONTROL_SPATIAL_DITHER_EN
#define AVIVO_TMDS_BIT_DEPTH_CONTROL_SPATIAL_DITHER_DEPTH
#define AVIVO_TMDS_BIT_DEPTH_CONTROL_TEMPORAL_DITHER_EN
#define AVIVO_TMDS_BIT_DEPTH_CONTROL_TEMPORAL_DITHER_DEPTH
#define AVIVO_TMDS_BIT_DEPTH_CONTROL_TEMPORAL_LEVEL
#define AVIVO_TMDS_BIT_DEPTH_CONTROL_TEMPORAL_DITHER_RESET
#define AVIVO_TMDSA_DCBALANCER_CONTROL
#define AVIVO_TMDSA_DCBALANCER_CONTROL_EN
#define AVIVO_TMDSA_DCBALANCER_CONTROL_TEST_EN
#define AVIVO_TMDSA_DCBALANCER_CONTROL_TEST_IN_SHIFT
#define AVIVO_TMDSA_DCBALANCER_CONTROL_FORCE
#define AVIVO_TMDSA_DATA_SYNCHRONIZATION
#define AVIVO_TMDSA_DATA_SYNCHRONIZATION_DSYNSEL
#define AVIVO_TMDSA_DATA_SYNCHRONIZATION_PFREQCHG
#define AVIVO_TMDSA_CLOCK_ENABLE
#define AVIVO_TMDSA_TRANSMITTER_ENABLE
#define AVIVO_TMDSA_TRANSMITTER_ENABLE_TX0_ENABLE
#define AVIVO_TMDSA_TRANSMITTER_ENABLE_LNKC0EN
#define AVIVO_TMDSA_TRANSMITTER_ENABLE_LNKD00EN
#define AVIVO_TMDSA_TRANSMITTER_ENABLE_LNKD01EN
#define AVIVO_TMDSA_TRANSMITTER_ENABLE_LNKD02EN
#define AVIVO_TMDSA_TRANSMITTER_ENABLE_TX1_ENABLE
#define AVIVO_TMDSA_TRANSMITTER_ENABLE_LNKD10EN
#define AVIVO_TMDSA_TRANSMITTER_ENABLE_LNKD11EN
#define AVIVO_TMDSA_TRANSMITTER_ENABLE_LNKD12EN
#define AVIVO_TMDSA_TRANSMITTER_ENABLE_TX_ENABLE_HPD_MASK
#define AVIVO_TMDSA_TRANSMITTER_ENABLE_LNKCEN_HPD_MASK
#define AVIVO_TMDSA_TRANSMITTER_ENABLE_LNKDEN_HPD_MASK

#define AVIVO_TMDSA_TRANSMITTER_CONTROL
#define AVIVO_TMDSA_TRANSMITTER_CONTROL_PLL_ENABLE
#define AVIVO_TMDSA_TRANSMITTER_CONTROL_PLL_RESET
#define AVIVO_TMDSA_TRANSMITTER_CONTROL_PLL_HPD_MASK_SHIFT
#define AVIVO_TMDSA_TRANSMITTER_CONTROL_IDSCKSEL
#define AVIVO_TMDSA_TRANSMITTER_CONTROL_BGSLEEP
#define AVIVO_TMDSA_TRANSMITTER_CONTROL_PLL_PWRUP_SEQ_EN
#define AVIVO_TMDSA_TRANSMITTER_CONTROL_TMCLK
#define AVIVO_TMDSA_TRANSMITTER_CONTROL_TMCLK_FROM_PADS
#define AVIVO_TMDSA_TRANSMITTER_CONTROL_TDCLK
#define AVIVO_TMDSA_TRANSMITTER_CONTROL_TDCLK_FROM_PADS
#define AVIVO_TMDSA_TRANSMITTER_CONTROL_CLK_PATTERN_SHIFT
#define AVIVO_TMDSA_TRANSMITTER_CONTROL_BYPASS_PLL
#define AVIVO_TMDSA_TRANSMITTER_CONTROL_USE_CLK_DATA
#define AVIVO_TMDSA_TRANSMITTER_CONTROL_INPUT_TEST_CLK_SEL

#define AVIVO_LVTMA_CNTL
#define AVIVO_LVTMA_CNTL_ENABLE
#define AVIVO_LVTMA_CNTL_HDMI_EN
#define AVIVO_LVTMA_CNTL_HPD_MASK
#define AVIVO_LVTMA_CNTL_HPD_SELECT
#define AVIVO_LVTMA_CNTL_SYNC_PHASE
#define AVIVO_LVTMA_CNTL_PIXEL_ENCODING
#define AVIVO_LVTMA_CNTL_DUAL_LINK_ENABLE
#define AVIVO_LVTMA_CNTL_SWAP
#define AVIVO_LVTMA_SOURCE_SELECT
#define AVIVO_LVTMA_COLOR_FORMAT
#define AVIVO_LVTMA_BIT_DEPTH_CONTROL
#define AVIVO_LVTMA_BIT_DEPTH_CONTROL_TRUNCATE_EN
#define AVIVO_LVTMA_BIT_DEPTH_CONTROL_TRUNCATE_DEPTH
#define AVIVO_LVTMA_BIT_DEPTH_CONTROL_SPATIAL_DITHER_EN
#define AVIVO_LVTMA_BIT_DEPTH_CONTROL_SPATIAL_DITHER_DEPTH
#define AVIVO_LVTMA_BIT_DEPTH_CONTROL_TEMPORAL_DITHER_EN
#define AVIVO_LVTMA_BIT_DEPTH_CONTROL_TEMPORAL_DITHER_DEPTH
#define AVIVO_LVTMA_BIT_DEPTH_CONTROL_TEMPORAL_LEVEL
#define AVIVO_LVTMA_BIT_DEPTH_CONTROL_TEMPORAL_DITHER_RESET



#define AVIVO_LVTMA_DCBALANCER_CONTROL
#define AVIVO_LVTMA_DCBALANCER_CONTROL_EN
#define AVIVO_LVTMA_DCBALANCER_CONTROL_TEST_EN
#define AVIVO_LVTMA_DCBALANCER_CONTROL_TEST_IN_SHIFT
#define AVIVO_LVTMA_DCBALANCER_CONTROL_FORCE

#define AVIVO_LVTMA_DATA_SYNCHRONIZATION
#define AVIVO_LVTMA_DATA_SYNCHRONIZATION_DSYNSEL
#define AVIVO_LVTMA_DATA_SYNCHRONIZATION_PFREQCHG
#define R500_LVTMA_CLOCK_ENABLE
#define R600_LVTMA_CLOCK_ENABLE

#define R500_LVTMA_TRANSMITTER_ENABLE
#define R600_LVTMA_TRANSMITTER_ENABLE
#define AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKC0EN
#define AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKD00EN
#define AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKD01EN
#define AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKD02EN
#define AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKD03EN
#define AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKC1EN
#define AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKD10EN
#define AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKD11EN
#define AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKD12EN
#define AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKCEN_HPD_MASK
#define AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKDEN_HPD_MASK

#define R500_LVTMA_TRANSMITTER_CONTROL
#define R600_LVTMA_TRANSMITTER_CONTROL
#define AVIVO_LVTMA_TRANSMITTER_CONTROL_PLL_ENABLE
#define AVIVO_LVTMA_TRANSMITTER_CONTROL_PLL_RESET
#define AVIVO_LVTMA_TRANSMITTER_CONTROL_PLL_HPD_MASK_SHIFT
#define AVIVO_LVTMA_TRANSMITTER_CONTROL_IDSCKSEL
#define AVIVO_LVTMA_TRANSMITTER_CONTROL_BGSLEEP
#define AVIVO_LVTMA_TRANSMITTER_CONTROL_PLL_PWRUP_SEQ_EN
#define AVIVO_LVTMA_TRANSMITTER_CONTROL_TMCLK
#define AVIVO_LVTMA_TRANSMITTER_CONTROL_TMCLK_FROM_PADS
#define AVIVO_LVTMA_TRANSMITTER_CONTROL_TDCLK
#define AVIVO_LVTMA_TRANSMITTER_CONTROL_TDCLK_FROM_PADS
#define AVIVO_LVTMA_TRANSMITTER_CONTROL_CLK_PATTERN_SHIFT
#define AVIVO_LVTMA_TRANSMITTER_CONTROL_BYPASS_PLL
#define AVIVO_LVTMA_TRANSMITTER_CONTROL_USE_CLK_DATA
#define AVIVO_LVTMA_TRANSMITTER_CONTROL_INPUT_TEST_CLK_SEL

#define R500_LVTMA_PWRSEQ_CNTL
#define R600_LVTMA_PWRSEQ_CNTL
#define AVIVO_LVTMA_PWRSEQ_EN
#define AVIVO_LVTMA_PWRSEQ_PLL_ENABLE_MASK
#define AVIVO_LVTMA_PWRSEQ_PLL_RESET_MASK
#define AVIVO_LVTMA_PWRSEQ_TARGET_STATE
#define AVIVO_LVTMA_SYNCEN
#define AVIVO_LVTMA_SYNCEN_OVRD
#define AVIVO_LVTMA_SYNCEN_POL
#define AVIVO_LVTMA_DIGON
#define AVIVO_LVTMA_DIGON_OVRD
#define AVIVO_LVTMA_DIGON_POL
#define AVIVO_LVTMA_BLON
#define AVIVO_LVTMA_BLON_OVRD
#define AVIVO_LVTMA_BLON_POL

#define R500_LVTMA_PWRSEQ_STATE
#define R600_LVTMA_PWRSEQ_STATE
#define AVIVO_LVTMA_PWRSEQ_STATE_TARGET_STATE_R
#define AVIVO_LVTMA_PWRSEQ_STATE_DIGON
#define AVIVO_LVTMA_PWRSEQ_STATE_SYNCEN
#define AVIVO_LVTMA_PWRSEQ_STATE_BLON
#define AVIVO_LVTMA_PWRSEQ_STATE_DONE
#define AVIVO_LVTMA_PWRSEQ_STATE_STATUS_SHIFT

#define AVIVO_LVDS_BACKLIGHT_CNTL
#define AVIVO_LVDS_BACKLIGHT_CNTL_EN
#define AVIVO_LVDS_BACKLIGHT_LEVEL_MASK
#define AVIVO_LVDS_BACKLIGHT_LEVEL_SHIFT

#define AVIVO_DVOA_BIT_DEPTH_CONTROL

#define AVIVO_DC_GPIO_HPD_A
#define AVIVO_DC_GPIO_HPD_Y

#define AVIVO_DC_I2C_STATUS1
#define AVIVO_DC_I2C_DONE
#define AVIVO_DC_I2C_NACK
#define AVIVO_DC_I2C_HALT
#define AVIVO_DC_I2C_GO
#define AVIVO_DC_I2C_RESET
#define AVIVO_DC_I2C_SOFT_RESET
#define AVIVO_DC_I2C_ABORT
#define AVIVO_DC_I2C_CONTROL1
#define AVIVO_DC_I2C_START
#define AVIVO_DC_I2C_STOP
#define AVIVO_DC_I2C_RECEIVE
#define AVIVO_DC_I2C_EN
#define AVIVO_DC_I2C_PIN_SELECT(x)
#define AVIVO_SEL_DDC1
#define AVIVO_SEL_DDC2
#define AVIVO_SEL_DDC3
#define AVIVO_DC_I2C_CONTROL2
#define AVIVO_DC_I2C_ADDR_COUNT(x)
#define AVIVO_DC_I2C_DATA_COUNT(x)
#define AVIVO_DC_I2C_CONTROL3
#define AVIVO_DC_I2C_DATA_DRIVE_EN
#define AVIVO_DC_I2C_DATA_DRIVE_SEL
#define AVIVO_DC_I2C_CLK_DRIVE_EN
#define AVIVO_DC_I2C_RD_INTRA_BYTE_DELAY(x)
#define AVIVO_DC_I2C_WR_INTRA_BYTE_DELAY(x)
#define AVIVO_DC_I2C_TIME_LIMIT(x)
#define AVIVO_DC_I2C_DATA
#define AVIVO_DC_I2C_INTERRUPT_CONTROL
#define AVIVO_DC_I2C_INTERRUPT_STATUS
#define AVIVO_DC_I2C_INTERRUPT_AK
#define AVIVO_DC_I2C_INTERRUPT_ENABLE
#define AVIVO_DC_I2C_ARBITRATION
#define AVIVO_DC_I2C_SW_WANTS_TO_USE_I2C
#define AVIVO_DC_I2C_SW_CAN_USE_I2C
#define AVIVO_DC_I2C_SW_DONE_USING_I2C
#define AVIVO_DC_I2C_HW_NEEDS_I2C
#define AVIVO_DC_I2C_ABORT_HDCP_I2C
#define AVIVO_DC_I2C_HW_USING_I2C

#define AVIVO_DC_GPIO_DDC1_MASK
#define AVIVO_DC_GPIO_DDC1_A
#define AVIVO_DC_GPIO_DDC1_EN
#define AVIVO_DC_GPIO_DDC1_Y

#define AVIVO_DC_GPIO_DDC2_MASK
#define AVIVO_DC_GPIO_DDC2_A
#define AVIVO_DC_GPIO_DDC2_EN
#define AVIVO_DC_GPIO_DDC2_Y

#define AVIVO_DC_GPIO_DDC3_MASK
#define AVIVO_DC_GPIO_DDC3_A
#define AVIVO_DC_GPIO_DDC3_EN
#define AVIVO_DC_GPIO_DDC3_Y

#define AVIVO_DISP_INTERRUPT_STATUS
#define AVIVO_D1_VBLANK_INTERRUPT
#define AVIVO_D2_VBLANK_INTERRUPT

#endif