18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Copyright 2010 Advanced Micro Devices, Inc. 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 58c2ecf20Sopenharmony_ci * copy of this software and associated documentation files (the "Software"), 68c2ecf20Sopenharmony_ci * to deal in the Software without restriction, including without limitation 78c2ecf20Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense, 88c2ecf20Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the 98c2ecf20Sopenharmony_ci * Software is furnished to do so, subject to the following conditions: 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci * The above copyright notice and this permission notice shall be included in 128c2ecf20Sopenharmony_ci * all copies or substantial portions of the Software. 138c2ecf20Sopenharmony_ci * 148c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 158c2ecf20Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 168c2ecf20Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 178c2ecf20Sopenharmony_ci * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 188c2ecf20Sopenharmony_ci * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 198c2ecf20Sopenharmony_ci * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 208c2ecf20Sopenharmony_ci * OTHER DEALINGS IN THE SOFTWARE. 218c2ecf20Sopenharmony_ci * 228c2ecf20Sopenharmony_ci * Authors: Alex Deucher 238c2ecf20Sopenharmony_ci */ 248c2ecf20Sopenharmony_ci#ifndef __NI_REG_H__ 258c2ecf20Sopenharmony_ci#define __NI_REG_H__ 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci/* northern islands - DCE5 */ 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci#define NI_INPUT_GAMMA_CONTROL 0x6840 308c2ecf20Sopenharmony_ci# define NI_GRPH_INPUT_GAMMA_MODE(x) (((x) & 0x3) << 0) 318c2ecf20Sopenharmony_ci# define NI_INPUT_GAMMA_USE_LUT 0 328c2ecf20Sopenharmony_ci# define NI_INPUT_GAMMA_BYPASS 1 338c2ecf20Sopenharmony_ci# define NI_INPUT_GAMMA_SRGB_24 2 348c2ecf20Sopenharmony_ci# define NI_INPUT_GAMMA_XVYCC_222 3 358c2ecf20Sopenharmony_ci# define NI_OVL_INPUT_GAMMA_MODE(x) (((x) & 0x3) << 4) 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci#define NI_PRESCALE_GRPH_CONTROL 0x68b4 388c2ecf20Sopenharmony_ci# define NI_GRPH_PRESCALE_BYPASS (1 << 4) 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci#define NI_PRESCALE_OVL_CONTROL 0x68c4 418c2ecf20Sopenharmony_ci# define NI_OVL_PRESCALE_BYPASS (1 << 4) 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci#define NI_INPUT_CSC_CONTROL 0x68d4 448c2ecf20Sopenharmony_ci# define NI_INPUT_CSC_GRPH_MODE(x) (((x) & 0x3) << 0) 458c2ecf20Sopenharmony_ci# define NI_INPUT_CSC_BYPASS 0 468c2ecf20Sopenharmony_ci# define NI_INPUT_CSC_PROG_COEFF 1 478c2ecf20Sopenharmony_ci# define NI_INPUT_CSC_PROG_SHARED_MATRIXA 2 488c2ecf20Sopenharmony_ci# define NI_INPUT_CSC_OVL_MODE(x) (((x) & 0x3) << 4) 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci#define NI_OUTPUT_CSC_CONTROL 0x68f0 518c2ecf20Sopenharmony_ci# define NI_OUTPUT_CSC_GRPH_MODE(x) (((x) & 0x7) << 0) 528c2ecf20Sopenharmony_ci# define NI_OUTPUT_CSC_BYPASS 0 538c2ecf20Sopenharmony_ci# define NI_OUTPUT_CSC_TV_RGB 1 548c2ecf20Sopenharmony_ci# define NI_OUTPUT_CSC_YCBCR_601 2 558c2ecf20Sopenharmony_ci# define NI_OUTPUT_CSC_YCBCR_709 3 568c2ecf20Sopenharmony_ci# define NI_OUTPUT_CSC_PROG_COEFF 4 578c2ecf20Sopenharmony_ci# define NI_OUTPUT_CSC_PROG_SHARED_MATRIXB 5 588c2ecf20Sopenharmony_ci# define NI_OUTPUT_CSC_OVL_MODE(x) (((x) & 0x7) << 4) 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci#define NI_DEGAMMA_CONTROL 0x6960 618c2ecf20Sopenharmony_ci# define NI_GRPH_DEGAMMA_MODE(x) (((x) & 0x3) << 0) 628c2ecf20Sopenharmony_ci# define NI_DEGAMMA_BYPASS 0 638c2ecf20Sopenharmony_ci# define NI_DEGAMMA_SRGB_24 1 648c2ecf20Sopenharmony_ci# define NI_DEGAMMA_XVYCC_222 2 658c2ecf20Sopenharmony_ci# define NI_OVL_DEGAMMA_MODE(x) (((x) & 0x3) << 4) 668c2ecf20Sopenharmony_ci# define NI_ICON_DEGAMMA_MODE(x) (((x) & 0x3) << 8) 678c2ecf20Sopenharmony_ci# define NI_CURSOR_DEGAMMA_MODE(x) (((x) & 0x3) << 12) 688c2ecf20Sopenharmony_ci 698c2ecf20Sopenharmony_ci#define NI_GAMUT_REMAP_CONTROL 0x6964 708c2ecf20Sopenharmony_ci# define NI_GRPH_GAMUT_REMAP_MODE(x) (((x) & 0x3) << 0) 718c2ecf20Sopenharmony_ci# define NI_GAMUT_REMAP_BYPASS 0 728c2ecf20Sopenharmony_ci# define NI_GAMUT_REMAP_PROG_COEFF 1 738c2ecf20Sopenharmony_ci# define NI_GAMUT_REMAP_PROG_SHARED_MATRIXA 2 748c2ecf20Sopenharmony_ci# define NI_GAMUT_REMAP_PROG_SHARED_MATRIXB 3 758c2ecf20Sopenharmony_ci# define NI_OVL_GAMUT_REMAP_MODE(x) (((x) & 0x3) << 4) 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_ci#define NI_REGAMMA_CONTROL 0x6a80 788c2ecf20Sopenharmony_ci# define NI_GRPH_REGAMMA_MODE(x) (((x) & 0x7) << 0) 798c2ecf20Sopenharmony_ci# define NI_REGAMMA_BYPASS 0 808c2ecf20Sopenharmony_ci# define NI_REGAMMA_SRGB_24 1 818c2ecf20Sopenharmony_ci# define NI_REGAMMA_XVYCC_222 2 828c2ecf20Sopenharmony_ci# define NI_REGAMMA_PROG_A 3 838c2ecf20Sopenharmony_ci# define NI_REGAMMA_PROG_B 4 848c2ecf20Sopenharmony_ci# define NI_OVL_REGAMMA_MODE(x) (((x) & 0x7) << 4) 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_ci#define NI_DP_MSE_LINK_TIMING 0x73a0 878c2ecf20Sopenharmony_ci# define NI_DP_MSE_LINK_FRAME (((x) & 0x3ff) << 0) 888c2ecf20Sopenharmony_ci# define NI_DP_MSE_LINK_LINE (((x) & 0x3) << 16) 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_ci#define NI_DP_MSE_MISC_CNTL 0x736c 918c2ecf20Sopenharmony_ci# define NI_DP_MSE_BLANK_CODE (((x) & 0x1) << 0) 928c2ecf20Sopenharmony_ci# define NI_DP_MSE_TIMESTAMP_MODE (((x) & 0x1) << 4) 938c2ecf20Sopenharmony_ci# define NI_DP_MSE_ZERO_ENCODER (((x) & 0x1) << 8) 948c2ecf20Sopenharmony_ci 958c2ecf20Sopenharmony_ci#define NI_DP_MSE_RATE_CNTL 0x7384 968c2ecf20Sopenharmony_ci# define NI_DP_MSE_RATE_Y(x) (((x) & 0x3ffffff) << 0) 978c2ecf20Sopenharmony_ci# define NI_DP_MSE_RATE_X(x) (((x) & 0x3f) << 26) 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ci#define NI_DP_MSE_RATE_UPDATE 0x738c 1008c2ecf20Sopenharmony_ci 1018c2ecf20Sopenharmony_ci#define NI_DP_MSE_SAT0 0x7390 1028c2ecf20Sopenharmony_ci# define NI_DP_MSE_SAT_SRC0(x) (((x) & 0x7) << 0) 1038c2ecf20Sopenharmony_ci# define NI_DP_MSE_SAT_SLOT_COUNT0(x) (((x) & 0x3f) << 8) 1048c2ecf20Sopenharmony_ci# define NI_DP_MSE_SAT_SRC1(x) (((x) & 0x7) << 16) 1058c2ecf20Sopenharmony_ci# define NI_DP_MSE_SAT_SLOT_COUNT1(x) (((x) & 0x3f) << 24) 1068c2ecf20Sopenharmony_ci 1078c2ecf20Sopenharmony_ci#define NI_DP_MSE_SAT1 0x7394 1088c2ecf20Sopenharmony_ci 1098c2ecf20Sopenharmony_ci#define NI_DP_MSE_SAT2 0x7398 1108c2ecf20Sopenharmony_ci 1118c2ecf20Sopenharmony_ci#define NI_DP_MSE_SAT_UPDATE 0x739c 1128c2ecf20Sopenharmony_ci# define NI_DP_MSE_SAT_UPDATE_MASK 0x3 1138c2ecf20Sopenharmony_ci# define NI_DP_MSE_16_MTP_KEEPOUT 0x100 1148c2ecf20Sopenharmony_ci 1158c2ecf20Sopenharmony_ci#define NI_DIG_BE_CNTL 0x7140 1168c2ecf20Sopenharmony_ci# define NI_DIG_FE_SOURCE_SELECT(x) (((x) & 0x7f) << 8) 1178c2ecf20Sopenharmony_ci# define NI_DIG_FE_DIG_MODE(x) (((x) & 0x7) << 16) 1188c2ecf20Sopenharmony_ci# define NI_DIG_MODE_DP_SST 0 1198c2ecf20Sopenharmony_ci# define NI_DIG_MODE_LVDS 1 1208c2ecf20Sopenharmony_ci# define NI_DIG_MODE_TMDS_DVI 2 1218c2ecf20Sopenharmony_ci# define NI_DIG_MODE_TMDS_HDMI 3 1228c2ecf20Sopenharmony_ci# define NI_DIG_MODE_DP_MST 5 1238c2ecf20Sopenharmony_ci# define NI_DIG_HPD_SELECT(x) (((x) & 0x7) << 28) 1248c2ecf20Sopenharmony_ci 1258c2ecf20Sopenharmony_ci#define NI_DIG_FE_CNTL 0x7000 1268c2ecf20Sopenharmony_ci# define NI_DIG_SOURCE_SELECT(x) (((x) & 0x3) << 0) 1278c2ecf20Sopenharmony_ci# define NI_DIG_STEREOSYNC_SELECT(x) (((x) & 0x3) << 4) 1288c2ecf20Sopenharmony_ci# define NI_DIG_STEREOSYNC_GATE_EN(x) (((x) & 0x1) << 8) 1298c2ecf20Sopenharmony_ci# define NI_DIG_DUAL_LINK_ENABLE(x) (((x) & 0x1) << 16) 1308c2ecf20Sopenharmony_ci# define NI_DIG_SWAP(x) (((x) & 0x1) << 18) 1318c2ecf20Sopenharmony_ci# define NI_DIG_SYMCLK_FE_ON (0x1 << 24) 1328c2ecf20Sopenharmony_ci#endif 133