1 1.2 riastrad /* $NetBSD: ni_reg.h,v 1.3 2021/12/18 23:45:42 riastradh Exp $ */ 2 1.2 riastrad 3 1.1 riastrad /* 4 1.1 riastrad * Copyright 2010 Advanced Micro Devices, Inc. 5 1.1 riastrad * 6 1.1 riastrad * Permission is hereby granted, free of charge, to any person obtaining a 7 1.1 riastrad * copy of this software and associated documentation files (the "Software"), 8 1.1 riastrad * to deal in the Software without restriction, including without limitation 9 1.1 riastrad * the rights to use, copy, modify, merge, publish, distribute, sublicense, 10 1.1 riastrad * and/or sell copies of the Software, and to permit persons to whom the 11 1.1 riastrad * Software is furnished to do so, subject to the following conditions: 12 1.1 riastrad * 13 1.1 riastrad * The above copyright notice and this permission notice shall be included in 14 1.1 riastrad * all copies or substantial portions of the Software. 15 1.1 riastrad * 16 1.1 riastrad * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 1.1 riastrad * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 1.1 riastrad * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 1.1 riastrad * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 1.1 riastrad * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 1.1 riastrad * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 1.1 riastrad * OTHER DEALINGS IN THE SOFTWARE. 23 1.1 riastrad * 24 1.1 riastrad * Authors: Alex Deucher 25 1.1 riastrad */ 26 1.1 riastrad #ifndef __NI_REG_H__ 27 1.1 riastrad #define __NI_REG_H__ 28 1.1 riastrad 29 1.1 riastrad /* northern islands - DCE5 */ 30 1.1 riastrad 31 1.1 riastrad #define NI_INPUT_GAMMA_CONTROL 0x6840 32 1.1 riastrad # define NI_GRPH_INPUT_GAMMA_MODE(x) (((x) & 0x3) << 0) 33 1.1 riastrad # define NI_INPUT_GAMMA_USE_LUT 0 34 1.1 riastrad # define NI_INPUT_GAMMA_BYPASS 1 35 1.1 riastrad # define NI_INPUT_GAMMA_SRGB_24 2 36 1.1 riastrad # define NI_INPUT_GAMMA_XVYCC_222 3 37 1.1 riastrad # define NI_OVL_INPUT_GAMMA_MODE(x) (((x) & 0x3) << 4) 38 1.1 riastrad 39 1.1 riastrad #define NI_PRESCALE_GRPH_CONTROL 0x68b4 40 1.1 riastrad # define NI_GRPH_PRESCALE_BYPASS (1 << 4) 41 1.1 riastrad 42 1.1 riastrad #define NI_PRESCALE_OVL_CONTROL 0x68c4 43 1.1 riastrad # define NI_OVL_PRESCALE_BYPASS (1 << 4) 44 1.1 riastrad 45 1.1 riastrad #define NI_INPUT_CSC_CONTROL 0x68d4 46 1.1 riastrad # define NI_INPUT_CSC_GRPH_MODE(x) (((x) & 0x3) << 0) 47 1.1 riastrad # define NI_INPUT_CSC_BYPASS 0 48 1.1 riastrad # define NI_INPUT_CSC_PROG_COEFF 1 49 1.1 riastrad # define NI_INPUT_CSC_PROG_SHARED_MATRIXA 2 50 1.1 riastrad # define NI_INPUT_CSC_OVL_MODE(x) (((x) & 0x3) << 4) 51 1.1 riastrad 52 1.1 riastrad #define NI_OUTPUT_CSC_CONTROL 0x68f0 53 1.1 riastrad # define NI_OUTPUT_CSC_GRPH_MODE(x) (((x) & 0x7) << 0) 54 1.1 riastrad # define NI_OUTPUT_CSC_BYPASS 0 55 1.1 riastrad # define NI_OUTPUT_CSC_TV_RGB 1 56 1.1 riastrad # define NI_OUTPUT_CSC_YCBCR_601 2 57 1.1 riastrad # define NI_OUTPUT_CSC_YCBCR_709 3 58 1.1 riastrad # define NI_OUTPUT_CSC_PROG_COEFF 4 59 1.1 riastrad # define NI_OUTPUT_CSC_PROG_SHARED_MATRIXB 5 60 1.1 riastrad # define NI_OUTPUT_CSC_OVL_MODE(x) (((x) & 0x7) << 4) 61 1.1 riastrad 62 1.1 riastrad #define NI_DEGAMMA_CONTROL 0x6960 63 1.1 riastrad # define NI_GRPH_DEGAMMA_MODE(x) (((x) & 0x3) << 0) 64 1.1 riastrad # define NI_DEGAMMA_BYPASS 0 65 1.1 riastrad # define NI_DEGAMMA_SRGB_24 1 66 1.1 riastrad # define NI_DEGAMMA_XVYCC_222 2 67 1.1 riastrad # define NI_OVL_DEGAMMA_MODE(x) (((x) & 0x3) << 4) 68 1.1 riastrad # define NI_ICON_DEGAMMA_MODE(x) (((x) & 0x3) << 8) 69 1.1 riastrad # define NI_CURSOR_DEGAMMA_MODE(x) (((x) & 0x3) << 12) 70 1.1 riastrad 71 1.1 riastrad #define NI_GAMUT_REMAP_CONTROL 0x6964 72 1.1 riastrad # define NI_GRPH_GAMUT_REMAP_MODE(x) (((x) & 0x3) << 0) 73 1.1 riastrad # define NI_GAMUT_REMAP_BYPASS 0 74 1.1 riastrad # define NI_GAMUT_REMAP_PROG_COEFF 1 75 1.1 riastrad # define NI_GAMUT_REMAP_PROG_SHARED_MATRIXA 2 76 1.1 riastrad # define NI_GAMUT_REMAP_PROG_SHARED_MATRIXB 3 77 1.1 riastrad # define NI_OVL_GAMUT_REMAP_MODE(x) (((x) & 0x3) << 4) 78 1.1 riastrad 79 1.1 riastrad #define NI_REGAMMA_CONTROL 0x6a80 80 1.1 riastrad # define NI_GRPH_REGAMMA_MODE(x) (((x) & 0x7) << 0) 81 1.1 riastrad # define NI_REGAMMA_BYPASS 0 82 1.1 riastrad # define NI_REGAMMA_SRGB_24 1 83 1.1 riastrad # define NI_REGAMMA_XVYCC_222 2 84 1.1 riastrad # define NI_REGAMMA_PROG_A 3 85 1.1 riastrad # define NI_REGAMMA_PROG_B 4 86 1.1 riastrad # define NI_OVL_REGAMMA_MODE(x) (((x) & 0x7) << 4) 87 1.1 riastrad 88 1.2 riastrad #define NI_DP_MSE_LINK_TIMING 0x73a0 89 1.2 riastrad # define NI_DP_MSE_LINK_FRAME (((x) & 0x3ff) << 0) 90 1.2 riastrad # define NI_DP_MSE_LINK_LINE (((x) & 0x3) << 16) 91 1.2 riastrad 92 1.2 riastrad #define NI_DP_MSE_MISC_CNTL 0x736c 93 1.2 riastrad # define NI_DP_MSE_BLANK_CODE (((x) & 0x1) << 0) 94 1.2 riastrad # define NI_DP_MSE_TIMESTAMP_MODE (((x) & 0x1) << 4) 95 1.2 riastrad # define NI_DP_MSE_ZERO_ENCODER (((x) & 0x1) << 8) 96 1.2 riastrad 97 1.2 riastrad #define NI_DP_MSE_RATE_CNTL 0x7384 98 1.2 riastrad # define NI_DP_MSE_RATE_Y(x) (((x) & 0x3ffffff) << 0) 99 1.2 riastrad # define NI_DP_MSE_RATE_X(x) (((x) & 0x3f) << 26) 100 1.2 riastrad 101 1.2 riastrad #define NI_DP_MSE_RATE_UPDATE 0x738c 102 1.2 riastrad 103 1.2 riastrad #define NI_DP_MSE_SAT0 0x7390 104 1.2 riastrad # define NI_DP_MSE_SAT_SRC0(x) (((x) & 0x7) << 0) 105 1.2 riastrad # define NI_DP_MSE_SAT_SLOT_COUNT0(x) (((x) & 0x3f) << 8) 106 1.2 riastrad # define NI_DP_MSE_SAT_SRC1(x) (((x) & 0x7) << 16) 107 1.2 riastrad # define NI_DP_MSE_SAT_SLOT_COUNT1(x) (((x) & 0x3f) << 24) 108 1.2 riastrad 109 1.2 riastrad #define NI_DP_MSE_SAT1 0x7394 110 1.2 riastrad 111 1.2 riastrad #define NI_DP_MSE_SAT2 0x7398 112 1.2 riastrad 113 1.2 riastrad #define NI_DP_MSE_SAT_UPDATE 0x739c 114 1.3 riastrad # define NI_DP_MSE_SAT_UPDATE_MASK 0x3 115 1.3 riastrad # define NI_DP_MSE_16_MTP_KEEPOUT 0x100 116 1.2 riastrad 117 1.2 riastrad #define NI_DIG_BE_CNTL 0x7140 118 1.2 riastrad # define NI_DIG_FE_SOURCE_SELECT(x) (((x) & 0x7f) << 8) 119 1.2 riastrad # define NI_DIG_FE_DIG_MODE(x) (((x) & 0x7) << 16) 120 1.2 riastrad # define NI_DIG_MODE_DP_SST 0 121 1.2 riastrad # define NI_DIG_MODE_LVDS 1 122 1.2 riastrad # define NI_DIG_MODE_TMDS_DVI 2 123 1.2 riastrad # define NI_DIG_MODE_TMDS_HDMI 3 124 1.2 riastrad # define NI_DIG_MODE_DP_MST 5 125 1.2 riastrad # define NI_DIG_HPD_SELECT(x) (((x) & 0x7) << 28) 126 1.2 riastrad 127 1.2 riastrad #define NI_DIG_FE_CNTL 0x7000 128 1.2 riastrad # define NI_DIG_SOURCE_SELECT(x) (((x) & 0x3) << 0) 129 1.2 riastrad # define NI_DIG_STEREOSYNC_SELECT(x) (((x) & 0x3) << 4) 130 1.2 riastrad # define NI_DIG_STEREOSYNC_GATE_EN(x) (((x) & 0x1) << 8) 131 1.2 riastrad # define NI_DIG_DUAL_LINK_ENABLE(x) (((x) & 0x1) << 16) 132 1.2 riastrad # define NI_DIG_SWAP(x) (((x) & 0x1) << 18) 133 1.2 riastrad # define NI_DIG_SYMCLK_FE_ON (0x1 << 24) 134 1.1 riastrad #endif 135