162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Copyright 2010 Advanced Micro Devices, Inc. 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 562306a36Sopenharmony_ci * copy of this software and associated documentation files (the "Software"), 662306a36Sopenharmony_ci * to deal in the Software without restriction, including without limitation 762306a36Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense, 862306a36Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the 962306a36Sopenharmony_ci * Software is furnished to do so, subject to the following conditions: 1062306a36Sopenharmony_ci * 1162306a36Sopenharmony_ci * The above copyright notice and this permission notice shall be included in 1262306a36Sopenharmony_ci * all copies or substantial portions of the Software. 1362306a36Sopenharmony_ci * 1462306a36Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1562306a36Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1662306a36Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1762306a36Sopenharmony_ci * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 1862306a36Sopenharmony_ci * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1962306a36Sopenharmony_ci * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 2062306a36Sopenharmony_ci * OTHER DEALINGS IN THE SOFTWARE. 2162306a36Sopenharmony_ci * 2262306a36Sopenharmony_ci * Authors: Alex Deucher 2362306a36Sopenharmony_ci */ 2462306a36Sopenharmony_ci#ifndef __NI_REG_H__ 2562306a36Sopenharmony_ci#define __NI_REG_H__ 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ci/* northern islands - DCE5 */ 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci#define NI_INPUT_GAMMA_CONTROL 0x6840 3062306a36Sopenharmony_ci# define NI_GRPH_INPUT_GAMMA_MODE(x) (((x) & 0x3) << 0) 3162306a36Sopenharmony_ci# define NI_INPUT_GAMMA_USE_LUT 0 3262306a36Sopenharmony_ci# define NI_INPUT_GAMMA_BYPASS 1 3362306a36Sopenharmony_ci# define NI_INPUT_GAMMA_SRGB_24 2 3462306a36Sopenharmony_ci# define NI_INPUT_GAMMA_XVYCC_222 3 3562306a36Sopenharmony_ci# define NI_OVL_INPUT_GAMMA_MODE(x) (((x) & 0x3) << 4) 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci#define NI_PRESCALE_GRPH_CONTROL 0x68b4 3862306a36Sopenharmony_ci# define NI_GRPH_PRESCALE_BYPASS (1 << 4) 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci#define NI_PRESCALE_OVL_CONTROL 0x68c4 4162306a36Sopenharmony_ci# define NI_OVL_PRESCALE_BYPASS (1 << 4) 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ci#define NI_INPUT_CSC_CONTROL 0x68d4 4462306a36Sopenharmony_ci# define NI_INPUT_CSC_GRPH_MODE(x) (((x) & 0x3) << 0) 4562306a36Sopenharmony_ci# define NI_INPUT_CSC_BYPASS 0 4662306a36Sopenharmony_ci# define NI_INPUT_CSC_PROG_COEFF 1 4762306a36Sopenharmony_ci# define NI_INPUT_CSC_PROG_SHARED_MATRIXA 2 4862306a36Sopenharmony_ci# define NI_INPUT_CSC_OVL_MODE(x) (((x) & 0x3) << 4) 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci#define NI_OUTPUT_CSC_CONTROL 0x68f0 5162306a36Sopenharmony_ci# define NI_OUTPUT_CSC_GRPH_MODE(x) (((x) & 0x7) << 0) 5262306a36Sopenharmony_ci# define NI_OUTPUT_CSC_BYPASS 0 5362306a36Sopenharmony_ci# define NI_OUTPUT_CSC_TV_RGB 1 5462306a36Sopenharmony_ci# define NI_OUTPUT_CSC_YCBCR_601 2 5562306a36Sopenharmony_ci# define NI_OUTPUT_CSC_YCBCR_709 3 5662306a36Sopenharmony_ci# define NI_OUTPUT_CSC_PROG_COEFF 4 5762306a36Sopenharmony_ci# define NI_OUTPUT_CSC_PROG_SHARED_MATRIXB 5 5862306a36Sopenharmony_ci# define NI_OUTPUT_CSC_OVL_MODE(x) (((x) & 0x7) << 4) 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ci#define NI_DEGAMMA_CONTROL 0x6960 6162306a36Sopenharmony_ci# define NI_GRPH_DEGAMMA_MODE(x) (((x) & 0x3) << 0) 6262306a36Sopenharmony_ci# define NI_DEGAMMA_BYPASS 0 6362306a36Sopenharmony_ci# define NI_DEGAMMA_SRGB_24 1 6462306a36Sopenharmony_ci# define NI_DEGAMMA_XVYCC_222 2 6562306a36Sopenharmony_ci# define NI_OVL_DEGAMMA_MODE(x) (((x) & 0x3) << 4) 6662306a36Sopenharmony_ci# define NI_ICON_DEGAMMA_MODE(x) (((x) & 0x3) << 8) 6762306a36Sopenharmony_ci# define NI_CURSOR_DEGAMMA_MODE(x) (((x) & 0x3) << 12) 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ci#define NI_GAMUT_REMAP_CONTROL 0x6964 7062306a36Sopenharmony_ci# define NI_GRPH_GAMUT_REMAP_MODE(x) (((x) & 0x3) << 0) 7162306a36Sopenharmony_ci# define NI_GAMUT_REMAP_BYPASS 0 7262306a36Sopenharmony_ci# define NI_GAMUT_REMAP_PROG_COEFF 1 7362306a36Sopenharmony_ci# define NI_GAMUT_REMAP_PROG_SHARED_MATRIXA 2 7462306a36Sopenharmony_ci# define NI_GAMUT_REMAP_PROG_SHARED_MATRIXB 3 7562306a36Sopenharmony_ci# define NI_OVL_GAMUT_REMAP_MODE(x) (((x) & 0x3) << 4) 7662306a36Sopenharmony_ci 7762306a36Sopenharmony_ci#define NI_REGAMMA_CONTROL 0x6a80 7862306a36Sopenharmony_ci# define NI_GRPH_REGAMMA_MODE(x) (((x) & 0x7) << 0) 7962306a36Sopenharmony_ci# define NI_REGAMMA_BYPASS 0 8062306a36Sopenharmony_ci# define NI_REGAMMA_SRGB_24 1 8162306a36Sopenharmony_ci# define NI_REGAMMA_XVYCC_222 2 8262306a36Sopenharmony_ci# define NI_REGAMMA_PROG_A 3 8362306a36Sopenharmony_ci# define NI_REGAMMA_PROG_B 4 8462306a36Sopenharmony_ci# define NI_OVL_REGAMMA_MODE(x) (((x) & 0x7) << 4) 8562306a36Sopenharmony_ci 8662306a36Sopenharmony_ci#define NI_DP_MSE_LINK_TIMING 0x73a0 8762306a36Sopenharmony_ci# define NI_DP_MSE_LINK_FRAME (((x) & 0x3ff) << 0) 8862306a36Sopenharmony_ci# define NI_DP_MSE_LINK_LINE (((x) & 0x3) << 16) 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_ci#define NI_DP_MSE_MISC_CNTL 0x736c 9162306a36Sopenharmony_ci# define NI_DP_MSE_BLANK_CODE (((x) & 0x1) << 0) 9262306a36Sopenharmony_ci# define NI_DP_MSE_TIMESTAMP_MODE (((x) & 0x1) << 4) 9362306a36Sopenharmony_ci# define NI_DP_MSE_ZERO_ENCODER (((x) & 0x1) << 8) 9462306a36Sopenharmony_ci 9562306a36Sopenharmony_ci#define NI_DP_MSE_RATE_CNTL 0x7384 9662306a36Sopenharmony_ci# define NI_DP_MSE_RATE_Y(x) (((x) & 0x3ffffff) << 0) 9762306a36Sopenharmony_ci# define NI_DP_MSE_RATE_X(x) (((x) & 0x3f) << 26) 9862306a36Sopenharmony_ci 9962306a36Sopenharmony_ci#define NI_DP_MSE_RATE_UPDATE 0x738c 10062306a36Sopenharmony_ci 10162306a36Sopenharmony_ci#define NI_DP_MSE_SAT0 0x7390 10262306a36Sopenharmony_ci# define NI_DP_MSE_SAT_SRC0(x) (((x) & 0x7) << 0) 10362306a36Sopenharmony_ci# define NI_DP_MSE_SAT_SLOT_COUNT0(x) (((x) & 0x3f) << 8) 10462306a36Sopenharmony_ci# define NI_DP_MSE_SAT_SRC1(x) (((x) & 0x7) << 16) 10562306a36Sopenharmony_ci# define NI_DP_MSE_SAT_SLOT_COUNT1(x) (((x) & 0x3f) << 24) 10662306a36Sopenharmony_ci 10762306a36Sopenharmony_ci#define NI_DP_MSE_SAT1 0x7394 10862306a36Sopenharmony_ci 10962306a36Sopenharmony_ci#define NI_DP_MSE_SAT2 0x7398 11062306a36Sopenharmony_ci 11162306a36Sopenharmony_ci#define NI_DP_MSE_SAT_UPDATE 0x739c 11262306a36Sopenharmony_ci# define NI_DP_MSE_SAT_UPDATE_MASK 0x3 11362306a36Sopenharmony_ci# define NI_DP_MSE_16_MTP_KEEPOUT 0x100 11462306a36Sopenharmony_ci 11562306a36Sopenharmony_ci#define NI_DIG_BE_CNTL 0x7140 11662306a36Sopenharmony_ci# define NI_DIG_FE_SOURCE_SELECT(x) (((x) & 0x7f) << 8) 11762306a36Sopenharmony_ci# define NI_DIG_FE_DIG_MODE(x) (((x) & 0x7) << 16) 11862306a36Sopenharmony_ci# define NI_DIG_MODE_DP_SST 0 11962306a36Sopenharmony_ci# define NI_DIG_MODE_LVDS 1 12062306a36Sopenharmony_ci# define NI_DIG_MODE_TMDS_DVI 2 12162306a36Sopenharmony_ci# define NI_DIG_MODE_TMDS_HDMI 3 12262306a36Sopenharmony_ci# define NI_DIG_MODE_DP_MST 5 12362306a36Sopenharmony_ci# define NI_DIG_HPD_SELECT(x) (((x) & 0x7) << 28) 12462306a36Sopenharmony_ci 12562306a36Sopenharmony_ci#define NI_DIG_FE_CNTL 0x7000 12662306a36Sopenharmony_ci# define NI_DIG_SOURCE_SELECT(x) (((x) & 0x3) << 0) 12762306a36Sopenharmony_ci# define NI_DIG_STEREOSYNC_SELECT(x) (((x) & 0x3) << 4) 12862306a36Sopenharmony_ci# define NI_DIG_STEREOSYNC_GATE_EN(x) (((x) & 0x1) << 8) 12962306a36Sopenharmony_ci# define NI_DIG_DUAL_LINK_ENABLE(x) (((x) & 0x1) << 16) 13062306a36Sopenharmony_ci# define NI_DIG_SWAP(x) (((x) & 0x1) << 18) 13162306a36Sopenharmony_ci# define NI_DIG_SYMCLK_FE_ON (0x1 << 24) 13262306a36Sopenharmony_ci#endif 133