dcn10_opp.h 35.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
/* Copyright 2012-15 Advanced Micro Devices, Inc.
 *
 * 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: AMD
 *
 */

#ifndef __DC_OPP_DCN10_H__
#define __DC_OPP_DCN10_H__

#include "opp.h"

#define TO_DCN10_OPP(opp)\
	container_of(opp, struct dcn10_opp, base)

#define OPP_SF(reg_name, field_name, post_fix)\
	.field_name = reg_name ## __ ## field_name ## post_fix

36 37 38 39 40 41 42 43 44 45 46 47 48
#define OPP_REG_LIST_DCN(id) \
	SRI(OBUF_CONTROL, DSCL, id), \
	SRI(FMT_BIT_DEPTH_CONTROL, FMT, id), \
	SRI(FMT_CONTROL, FMT, id), \
	SRI(FMT_DITHER_RAND_R_SEED, FMT, id), \
	SRI(FMT_DITHER_RAND_G_SEED, FMT, id), \
	SRI(FMT_DITHER_RAND_B_SEED, FMT, id), \
	SRI(FMT_CLAMP_CNTL, FMT, id), \
	SRI(FMT_DYNAMIC_EXP_CNTL, FMT, id), \
	SRI(FMT_MAP420_MEMORY_CONTROL, FMT, id)

#define OPP_REG_LIST_DCN10(id) \
	OPP_REG_LIST_DCN(id), \
49 50 51 52 53 54 55 56 57 58 59 60
	SRI(CM_OCSC_C11_C12, CM, id), \
	SRI(CM_OCSC_C13_C14, CM, id), \
	SRI(CM_OCSC_C21_C22, CM, id), \
	SRI(CM_OCSC_C23_C24, CM, id), \
	SRI(CM_OCSC_C31_C32, CM, id), \
	SRI(CM_OCSC_C33_C34, CM, id), \
	SRI(CM_COMB_C11_C12, CM, id), \
	SRI(CM_COMB_C13_C14, CM, id), \
	SRI(CM_COMB_C21_C22, CM, id), \
	SRI(CM_COMB_C23_C24, CM, id), \
	SRI(CM_COMB_C31_C32, CM, id), \
	SRI(CM_COMB_C33_C34, CM, id), \
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
	SRI(CM_RGAM_LUT_WRITE_EN_MASK, CM, id), \
	SRI(CM_RGAM_CONTROL, CM, id), \
	SRI(CM_OCSC_CONTROL, CM, id), \
	SRI(CM_RGAM_RAMB_START_CNTL_B, CM, id), \
	SRI(CM_RGAM_RAMB_START_CNTL_G, CM, id), \
	SRI(CM_RGAM_RAMB_START_CNTL_R, CM, id), \
	SRI(CM_RGAM_RAMB_SLOPE_CNTL_B, CM, id), \
	SRI(CM_RGAM_RAMB_SLOPE_CNTL_G, CM, id), \
	SRI(CM_RGAM_RAMB_SLOPE_CNTL_R, CM, id), \
	SRI(CM_RGAM_RAMB_END_CNTL1_B, CM, id), \
	SRI(CM_RGAM_RAMB_END_CNTL2_B, CM, id), \
	SRI(CM_RGAM_RAMB_END_CNTL1_G, CM, id), \
	SRI(CM_RGAM_RAMB_END_CNTL2_G, CM, id), \
	SRI(CM_RGAM_RAMB_END_CNTL1_R, CM, id), \
	SRI(CM_RGAM_RAMB_END_CNTL2_R, CM, id), \
	SRI(CM_RGAM_RAMB_REGION_0_1, CM, id), \
	SRI(CM_RGAM_RAMB_REGION_2_3, CM, id), \
	SRI(CM_RGAM_RAMB_REGION_4_5, CM, id), \
	SRI(CM_RGAM_RAMB_REGION_6_7, CM, id), \
	SRI(CM_RGAM_RAMB_REGION_8_9, CM, id), \
	SRI(CM_RGAM_RAMB_REGION_10_11, CM, id), \
	SRI(CM_RGAM_RAMB_REGION_12_13, CM, id), \
	SRI(CM_RGAM_RAMB_REGION_14_15, CM, id), \
	SRI(CM_RGAM_RAMB_REGION_16_17, CM, id), \
	SRI(CM_RGAM_RAMB_REGION_18_19, CM, id), \
	SRI(CM_RGAM_RAMB_REGION_20_21, CM, id), \
	SRI(CM_RGAM_RAMB_REGION_22_23, CM, id), \
	SRI(CM_RGAM_RAMB_REGION_24_25, CM, id), \
	SRI(CM_RGAM_RAMB_REGION_26_27, CM, id), \
	SRI(CM_RGAM_RAMB_REGION_28_29, CM, id), \
	SRI(CM_RGAM_RAMB_REGION_30_31, CM, id), \
	SRI(CM_RGAM_RAMB_REGION_32_33, CM, id), \
	SRI(CM_RGAM_RAMA_START_CNTL_B, CM, id), \
	SRI(CM_RGAM_RAMA_START_CNTL_G, CM, id), \
	SRI(CM_RGAM_RAMA_START_CNTL_R, CM, id), \
	SRI(CM_RGAM_RAMA_SLOPE_CNTL_B, CM, id), \
	SRI(CM_RGAM_RAMA_SLOPE_CNTL_G, CM, id), \
	SRI(CM_RGAM_RAMA_SLOPE_CNTL_R, CM, id), \
	SRI(CM_RGAM_RAMA_END_CNTL1_B, CM, id), \
	SRI(CM_RGAM_RAMA_END_CNTL2_B, CM, id), \
	SRI(CM_RGAM_RAMA_END_CNTL1_G, CM, id), \
	SRI(CM_RGAM_RAMA_END_CNTL2_G, CM, id), \
	SRI(CM_RGAM_RAMA_END_CNTL1_R, CM, id), \
	SRI(CM_RGAM_RAMA_END_CNTL2_R, CM, id), \
	SRI(CM_RGAM_RAMA_REGION_0_1, CM, id), \
	SRI(CM_RGAM_RAMA_REGION_2_3, CM, id), \
	SRI(CM_RGAM_RAMA_REGION_4_5, CM, id), \
	SRI(CM_RGAM_RAMA_REGION_6_7, CM, id), \
	SRI(CM_RGAM_RAMA_REGION_8_9, CM, id), \
	SRI(CM_RGAM_RAMA_REGION_10_11, CM, id), \
	SRI(CM_RGAM_RAMA_REGION_12_13, CM, id), \
	SRI(CM_RGAM_RAMA_REGION_14_15, CM, id), \
	SRI(CM_RGAM_RAMA_REGION_16_17, CM, id), \
	SRI(CM_RGAM_RAMA_REGION_18_19, CM, id), \
	SRI(CM_RGAM_RAMA_REGION_20_21, CM, id), \
	SRI(CM_RGAM_RAMA_REGION_22_23, CM, id), \
	SRI(CM_RGAM_RAMA_REGION_24_25, CM, id), \
	SRI(CM_RGAM_RAMA_REGION_26_27, CM, id), \
	SRI(CM_RGAM_RAMA_REGION_28_29, CM, id), \
	SRI(CM_RGAM_RAMA_REGION_30_31, CM, id), \
	SRI(CM_RGAM_RAMA_REGION_32_33, CM, id), \
	SRI(CM_RGAM_LUT_INDEX, CM, id), \
	SRI(CM_MEM_PWR_CTRL, CM, id), \
	SRI(CM_RGAM_LUT_DATA, CM, id)

126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153

#define OPP_MASK_SH_LIST_DCN(mask_sh) \
	OPP_SF(DSCL0_OBUF_CONTROL, OBUF_BYPASS, mask_sh), \
	OPP_SF(FMT0_FMT_BIT_DEPTH_CONTROL, FMT_TRUNCATE_EN, mask_sh), \
	OPP_SF(FMT0_FMT_BIT_DEPTH_CONTROL, FMT_TRUNCATE_DEPTH, mask_sh), \
	OPP_SF(FMT0_FMT_BIT_DEPTH_CONTROL, FMT_TRUNCATE_MODE, mask_sh), \
	OPP_SF(FMT0_FMT_BIT_DEPTH_CONTROL, FMT_SPATIAL_DITHER_EN, mask_sh), \
	OPP_SF(FMT0_FMT_BIT_DEPTH_CONTROL, FMT_SPATIAL_DITHER_MODE, mask_sh), \
	OPP_SF(FMT0_FMT_BIT_DEPTH_CONTROL, FMT_SPATIAL_DITHER_DEPTH, mask_sh), \
	OPP_SF(FMT0_FMT_BIT_DEPTH_CONTROL, FMT_TEMPORAL_DITHER_EN, mask_sh), \
	OPP_SF(FMT0_FMT_BIT_DEPTH_CONTROL, FMT_HIGHPASS_RANDOM_ENABLE, mask_sh), \
	OPP_SF(FMT0_FMT_BIT_DEPTH_CONTROL, FMT_FRAME_RANDOM_ENABLE, mask_sh), \
	OPP_SF(FMT0_FMT_BIT_DEPTH_CONTROL, FMT_RGB_RANDOM_ENABLE, mask_sh), \
	OPP_SF(FMT0_FMT_CONTROL, FMT_SPATIAL_DITHER_FRAME_COUNTER_MAX, mask_sh), \
	OPP_SF(FMT0_FMT_CONTROL, FMT_SPATIAL_DITHER_FRAME_COUNTER_BIT_SWAP, mask_sh), \
	OPP_SF(FMT0_FMT_DITHER_RAND_R_SEED, FMT_RAND_R_SEED, mask_sh), \
	OPP_SF(FMT0_FMT_DITHER_RAND_G_SEED, FMT_RAND_G_SEED, mask_sh), \
	OPP_SF(FMT0_FMT_DITHER_RAND_B_SEED, FMT_RAND_B_SEED, mask_sh), \
	OPP_SF(FMT0_FMT_CONTROL, FMT_PIXEL_ENCODING, mask_sh), \
	OPP_SF(FMT0_FMT_CLAMP_CNTL, FMT_CLAMP_DATA_EN, mask_sh), \
	OPP_SF(FMT0_FMT_CLAMP_CNTL, FMT_CLAMP_COLOR_FORMAT, mask_sh), \
	OPP_SF(FMT0_FMT_DYNAMIC_EXP_CNTL, FMT_DYNAMIC_EXP_EN, mask_sh), \
	OPP_SF(FMT0_FMT_DYNAMIC_EXP_CNTL, FMT_DYNAMIC_EXP_MODE, mask_sh), \
	OPP_SF(FMT0_FMT_MAP420_MEMORY_CONTROL, FMT_MAP420MEM_PWR_FORCE, mask_sh)

#define OPP_MASK_SH_LIST_DCN10(mask_sh) \
	OPP_MASK_SH_LIST_DCN(mask_sh), \
	OPP_SF(DSCL0_OBUF_CONTROL, OBUF_H_2X_UPSCALE_EN, mask_sh), \
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
	OPP_SF(CM0_CM_OCSC_C11_C12, CM_OCSC_C11, mask_sh), \
	OPP_SF(CM0_CM_OCSC_C11_C12, CM_OCSC_C12, mask_sh), \
	OPP_SF(CM0_CM_OCSC_C13_C14, CM_OCSC_C13, mask_sh), \
	OPP_SF(CM0_CM_OCSC_C13_C14, CM_OCSC_C14, mask_sh), \
	OPP_SF(CM0_CM_OCSC_C21_C22, CM_OCSC_C21, mask_sh), \
	OPP_SF(CM0_CM_OCSC_C21_C22, CM_OCSC_C22, mask_sh), \
	OPP_SF(CM0_CM_OCSC_C23_C24, CM_OCSC_C23, mask_sh), \
	OPP_SF(CM0_CM_OCSC_C23_C24, CM_OCSC_C24, mask_sh), \
	OPP_SF(CM0_CM_OCSC_C31_C32, CM_OCSC_C31, mask_sh), \
	OPP_SF(CM0_CM_OCSC_C31_C32, CM_OCSC_C32, mask_sh), \
	OPP_SF(CM0_CM_OCSC_C33_C34, CM_OCSC_C33, mask_sh), \
	OPP_SF(CM0_CM_OCSC_C33_C34, CM_OCSC_C34, mask_sh), \
	OPP_SF(CM0_CM_COMB_C11_C12, CM_COMB_C11, mask_sh), \
	OPP_SF(CM0_CM_COMB_C11_C12, CM_COMB_C12, mask_sh), \
	OPP_SF(CM0_CM_COMB_C13_C14, CM_COMB_C13, mask_sh), \
	OPP_SF(CM0_CM_COMB_C13_C14, CM_COMB_C14, mask_sh), \
	OPP_SF(CM0_CM_COMB_C21_C22, CM_COMB_C21, mask_sh), \
	OPP_SF(CM0_CM_COMB_C21_C22, CM_COMB_C22, mask_sh), \
	OPP_SF(CM0_CM_COMB_C23_C24, CM_COMB_C23, mask_sh), \
	OPP_SF(CM0_CM_COMB_C23_C24, CM_COMB_C24, mask_sh), \
	OPP_SF(CM0_CM_COMB_C31_C32, CM_COMB_C31, mask_sh), \
	OPP_SF(CM0_CM_COMB_C31_C32, CM_COMB_C32, mask_sh), \
	OPP_SF(CM0_CM_COMB_C33_C34, CM_COMB_C33, mask_sh), \
	OPP_SF(CM0_CM_COMB_C33_C34, CM_COMB_C34, mask_sh), \
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359
	OPP_SF(CM0_CM_RGAM_CONTROL, CM_RGAM_LUT_MODE, mask_sh), \
	OPP_SF(CM0_CM_OCSC_CONTROL, CM_OCSC_MODE, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_START_CNTL_B, CM_RGAM_RAMB_EXP_REGION_START_B, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_START_CNTL_B, CM_RGAM_RAMB_EXP_REGION_START_SEGMENT_B, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_START_CNTL_G, CM_RGAM_RAMB_EXP_REGION_START_G, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_START_CNTL_G, CM_RGAM_RAMB_EXP_REGION_START_SEGMENT_G, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_START_CNTL_R, CM_RGAM_RAMB_EXP_REGION_START_R, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_START_CNTL_R, CM_RGAM_RAMB_EXP_REGION_START_SEGMENT_R, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_SLOPE_CNTL_B, CM_RGAM_RAMB_EXP_REGION_LINEAR_SLOPE_B, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_SLOPE_CNTL_G, CM_RGAM_RAMB_EXP_REGION_LINEAR_SLOPE_G, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_SLOPE_CNTL_R, CM_RGAM_RAMB_EXP_REGION_LINEAR_SLOPE_R, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_END_CNTL1_B, CM_RGAM_RAMB_EXP_REGION_END_B, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_END_CNTL2_B, CM_RGAM_RAMB_EXP_REGION_END_SLOPE_B, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_END_CNTL2_B, CM_RGAM_RAMB_EXP_REGION_END_BASE_B, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_END_CNTL1_G, CM_RGAM_RAMB_EXP_REGION_END_G, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_END_CNTL2_G, CM_RGAM_RAMB_EXP_REGION_END_SLOPE_G, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_END_CNTL2_G, CM_RGAM_RAMB_EXP_REGION_END_BASE_G, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_END_CNTL1_R, CM_RGAM_RAMB_EXP_REGION_END_R, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_END_CNTL2_R, CM_RGAM_RAMB_EXP_REGION_END_SLOPE_R, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_END_CNTL2_R, CM_RGAM_RAMB_EXP_REGION_END_BASE_R, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_0_1, CM_RGAM_RAMB_EXP_REGION0_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_0_1, CM_RGAM_RAMB_EXP_REGION0_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_0_1, CM_RGAM_RAMB_EXP_REGION1_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_0_1, CM_RGAM_RAMB_EXP_REGION1_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_2_3, CM_RGAM_RAMB_EXP_REGION2_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_2_3, CM_RGAM_RAMB_EXP_REGION2_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_2_3, CM_RGAM_RAMB_EXP_REGION3_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_2_3, CM_RGAM_RAMB_EXP_REGION3_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_4_5, CM_RGAM_RAMB_EXP_REGION4_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_4_5, CM_RGAM_RAMB_EXP_REGION4_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_4_5, CM_RGAM_RAMB_EXP_REGION5_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_4_5, CM_RGAM_RAMB_EXP_REGION5_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_6_7, CM_RGAM_RAMB_EXP_REGION6_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_6_7, CM_RGAM_RAMB_EXP_REGION6_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_6_7, CM_RGAM_RAMB_EXP_REGION7_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_6_7, CM_RGAM_RAMB_EXP_REGION7_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_8_9, CM_RGAM_RAMB_EXP_REGION8_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_8_9, CM_RGAM_RAMB_EXP_REGION8_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_8_9, CM_RGAM_RAMB_EXP_REGION9_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_8_9, CM_RGAM_RAMB_EXP_REGION9_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_10_11, CM_RGAM_RAMB_EXP_REGION10_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_10_11, CM_RGAM_RAMB_EXP_REGION10_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_10_11, CM_RGAM_RAMB_EXP_REGION11_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_10_11, CM_RGAM_RAMB_EXP_REGION11_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_12_13, CM_RGAM_RAMB_EXP_REGION12_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_12_13, CM_RGAM_RAMB_EXP_REGION12_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_12_13, CM_RGAM_RAMB_EXP_REGION13_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_12_13, CM_RGAM_RAMB_EXP_REGION13_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_14_15, CM_RGAM_RAMB_EXP_REGION14_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_14_15, CM_RGAM_RAMB_EXP_REGION14_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_14_15, CM_RGAM_RAMB_EXP_REGION15_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_14_15, CM_RGAM_RAMB_EXP_REGION15_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_16_17, CM_RGAM_RAMB_EXP_REGION16_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_16_17, CM_RGAM_RAMB_EXP_REGION16_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_16_17, CM_RGAM_RAMB_EXP_REGION17_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_16_17, CM_RGAM_RAMB_EXP_REGION17_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_18_19, CM_RGAM_RAMB_EXP_REGION18_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_18_19, CM_RGAM_RAMB_EXP_REGION18_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_18_19, CM_RGAM_RAMB_EXP_REGION19_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_18_19, CM_RGAM_RAMB_EXP_REGION19_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_20_21, CM_RGAM_RAMB_EXP_REGION20_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_20_21, CM_RGAM_RAMB_EXP_REGION20_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_20_21, CM_RGAM_RAMB_EXP_REGION21_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_20_21, CM_RGAM_RAMB_EXP_REGION21_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_22_23, CM_RGAM_RAMB_EXP_REGION22_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_22_23, CM_RGAM_RAMB_EXP_REGION22_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_22_23, CM_RGAM_RAMB_EXP_REGION23_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_22_23, CM_RGAM_RAMB_EXP_REGION23_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_24_25, CM_RGAM_RAMB_EXP_REGION24_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_24_25, CM_RGAM_RAMB_EXP_REGION24_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_24_25, CM_RGAM_RAMB_EXP_REGION25_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_24_25, CM_RGAM_RAMB_EXP_REGION25_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_26_27, CM_RGAM_RAMB_EXP_REGION26_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_26_27, CM_RGAM_RAMB_EXP_REGION26_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_26_27, CM_RGAM_RAMB_EXP_REGION27_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_26_27, CM_RGAM_RAMB_EXP_REGION27_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_28_29, CM_RGAM_RAMB_EXP_REGION28_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_28_29, CM_RGAM_RAMB_EXP_REGION28_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_28_29, CM_RGAM_RAMB_EXP_REGION29_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_28_29, CM_RGAM_RAMB_EXP_REGION29_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_30_31, CM_RGAM_RAMB_EXP_REGION30_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_30_31, CM_RGAM_RAMB_EXP_REGION30_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_30_31, CM_RGAM_RAMB_EXP_REGION31_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_30_31, CM_RGAM_RAMB_EXP_REGION31_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_32_33, CM_RGAM_RAMB_EXP_REGION32_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_32_33, CM_RGAM_RAMB_EXP_REGION32_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_32_33, CM_RGAM_RAMB_EXP_REGION33_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMB_REGION_32_33, CM_RGAM_RAMB_EXP_REGION33_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_START_CNTL_B, CM_RGAM_RAMA_EXP_REGION_START_B, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_START_CNTL_B, CM_RGAM_RAMA_EXP_REGION_START_SEGMENT_B, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_START_CNTL_G, CM_RGAM_RAMA_EXP_REGION_START_G, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_START_CNTL_G, CM_RGAM_RAMA_EXP_REGION_START_SEGMENT_G, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_START_CNTL_R, CM_RGAM_RAMA_EXP_REGION_START_R, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_START_CNTL_R, CM_RGAM_RAMA_EXP_REGION_START_SEGMENT_R, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_SLOPE_CNTL_B, CM_RGAM_RAMA_EXP_REGION_LINEAR_SLOPE_B, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_SLOPE_CNTL_G, CM_RGAM_RAMA_EXP_REGION_LINEAR_SLOPE_G, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_SLOPE_CNTL_R, CM_RGAM_RAMA_EXP_REGION_LINEAR_SLOPE_R, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_END_CNTL1_B, CM_RGAM_RAMA_EXP_REGION_END_B, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_END_CNTL2_B, CM_RGAM_RAMA_EXP_REGION_END_SLOPE_B, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_END_CNTL2_B, CM_RGAM_RAMA_EXP_REGION_END_BASE_B, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_END_CNTL1_G, CM_RGAM_RAMA_EXP_REGION_END_G, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_END_CNTL2_G, CM_RGAM_RAMA_EXP_REGION_END_SLOPE_G, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_END_CNTL2_G, CM_RGAM_RAMA_EXP_REGION_END_BASE_G, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_END_CNTL1_R, CM_RGAM_RAMA_EXP_REGION_END_R, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_END_CNTL2_R, CM_RGAM_RAMA_EXP_REGION_END_SLOPE_R, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_END_CNTL2_R, CM_RGAM_RAMA_EXP_REGION_END_BASE_R, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_0_1, CM_RGAM_RAMA_EXP_REGION0_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_0_1, CM_RGAM_RAMA_EXP_REGION0_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_0_1, CM_RGAM_RAMA_EXP_REGION1_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_0_1, CM_RGAM_RAMA_EXP_REGION1_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_2_3, CM_RGAM_RAMA_EXP_REGION2_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_2_3, CM_RGAM_RAMA_EXP_REGION2_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_2_3, CM_RGAM_RAMA_EXP_REGION3_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_2_3, CM_RGAM_RAMA_EXP_REGION3_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_4_5, CM_RGAM_RAMA_EXP_REGION4_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_4_5, CM_RGAM_RAMA_EXP_REGION4_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_4_5, CM_RGAM_RAMA_EXP_REGION5_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_4_5, CM_RGAM_RAMA_EXP_REGION5_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_6_7, CM_RGAM_RAMA_EXP_REGION6_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_6_7, CM_RGAM_RAMA_EXP_REGION6_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_6_7, CM_RGAM_RAMA_EXP_REGION7_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_6_7, CM_RGAM_RAMA_EXP_REGION7_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_8_9, CM_RGAM_RAMA_EXP_REGION8_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_8_9, CM_RGAM_RAMA_EXP_REGION8_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_8_9, CM_RGAM_RAMA_EXP_REGION9_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_8_9, CM_RGAM_RAMA_EXP_REGION9_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_10_11, CM_RGAM_RAMA_EXP_REGION10_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_10_11, CM_RGAM_RAMA_EXP_REGION10_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_10_11, CM_RGAM_RAMA_EXP_REGION11_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_10_11, CM_RGAM_RAMA_EXP_REGION11_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_12_13, CM_RGAM_RAMA_EXP_REGION12_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_12_13, CM_RGAM_RAMA_EXP_REGION12_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_12_13, CM_RGAM_RAMA_EXP_REGION13_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_12_13, CM_RGAM_RAMA_EXP_REGION13_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_14_15, CM_RGAM_RAMA_EXP_REGION14_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_14_15, CM_RGAM_RAMA_EXP_REGION14_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_14_15, CM_RGAM_RAMA_EXP_REGION15_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_14_15, CM_RGAM_RAMA_EXP_REGION15_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_16_17, CM_RGAM_RAMA_EXP_REGION16_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_16_17, CM_RGAM_RAMA_EXP_REGION16_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_16_17, CM_RGAM_RAMA_EXP_REGION17_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_16_17, CM_RGAM_RAMA_EXP_REGION17_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_18_19, CM_RGAM_RAMA_EXP_REGION18_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_18_19, CM_RGAM_RAMA_EXP_REGION18_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_18_19, CM_RGAM_RAMA_EXP_REGION19_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_18_19, CM_RGAM_RAMA_EXP_REGION19_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_20_21, CM_RGAM_RAMA_EXP_REGION20_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_20_21, CM_RGAM_RAMA_EXP_REGION20_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_20_21, CM_RGAM_RAMA_EXP_REGION21_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_20_21, CM_RGAM_RAMA_EXP_REGION21_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_22_23, CM_RGAM_RAMA_EXP_REGION22_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_22_23, CM_RGAM_RAMA_EXP_REGION22_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_22_23, CM_RGAM_RAMA_EXP_REGION23_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_22_23, CM_RGAM_RAMA_EXP_REGION23_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_24_25, CM_RGAM_RAMA_EXP_REGION24_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_24_25, CM_RGAM_RAMA_EXP_REGION24_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_24_25, CM_RGAM_RAMA_EXP_REGION25_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_24_25, CM_RGAM_RAMA_EXP_REGION25_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_26_27, CM_RGAM_RAMA_EXP_REGION26_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_26_27, CM_RGAM_RAMA_EXP_REGION26_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_26_27, CM_RGAM_RAMA_EXP_REGION27_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_26_27, CM_RGAM_RAMA_EXP_REGION27_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_28_29, CM_RGAM_RAMA_EXP_REGION28_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_28_29, CM_RGAM_RAMA_EXP_REGION28_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_28_29, CM_RGAM_RAMA_EXP_REGION29_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_28_29, CM_RGAM_RAMA_EXP_REGION29_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_30_31, CM_RGAM_RAMA_EXP_REGION30_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_30_31, CM_RGAM_RAMA_EXP_REGION30_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_30_31, CM_RGAM_RAMA_EXP_REGION31_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_30_31, CM_RGAM_RAMA_EXP_REGION31_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_32_33, CM_RGAM_RAMA_EXP_REGION32_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_32_33, CM_RGAM_RAMA_EXP_REGION32_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_32_33, CM_RGAM_RAMA_EXP_REGION33_LUT_OFFSET, mask_sh), \
	OPP_SF(CM0_CM_RGAM_RAMA_REGION_32_33, CM_RGAM_RAMA_EXP_REGION33_NUM_SEGMENTS, mask_sh), \
	OPP_SF(CM0_CM_RGAM_LUT_WRITE_EN_MASK, CM_RGAM_LUT_WRITE_EN_MASK, mask_sh), \
	OPP_SF(CM0_CM_RGAM_LUT_WRITE_EN_MASK, CM_RGAM_LUT_WRITE_SEL, mask_sh), \
	OPP_SF(CM0_CM_RGAM_LUT_INDEX, CM_RGAM_LUT_INDEX, mask_sh), \
	OPP_SF(CM0_CM_MEM_PWR_CTRL, RGAM_MEM_PWR_FORCE, mask_sh), \
	OPP_SF(CM0_CM_RGAM_LUT_DATA, CM_RGAM_LUT_DATA, mask_sh), \
	OPP_SF(FMT0_FMT_CONTROL, FMT_STEREOSYNC_OVERRIDE, mask_sh)

#define OPP_DCN10_REG_FIELD_LIST(type) \
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383
	type CM_OCSC_C11; \
	type CM_OCSC_C12; \
	type CM_OCSC_C13; \
	type CM_OCSC_C14; \
	type CM_OCSC_C21; \
	type CM_OCSC_C22; \
	type CM_OCSC_C23; \
	type CM_OCSC_C24; \
	type CM_OCSC_C31; \
	type CM_OCSC_C32; \
	type CM_OCSC_C33; \
	type CM_OCSC_C34; \
	type CM_COMB_C11; \
	type CM_COMB_C12; \
	type CM_COMB_C13; \
	type CM_COMB_C14; \
	type CM_COMB_C21; \
	type CM_COMB_C22; \
	type CM_COMB_C23; \
	type CM_COMB_C24; \
	type CM_COMB_C31; \
	type CM_COMB_C32; \
	type CM_COMB_C33; \
	type CM_COMB_C34; \
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596
	type CM_RGAM_LUT_MODE; \
	type OBUF_BYPASS; \
	type OBUF_H_2X_UPSCALE_EN; \
	type FMT_TRUNCATE_EN; \
	type FMT_TRUNCATE_DEPTH; \
	type FMT_TRUNCATE_MODE; \
	type FMT_SPATIAL_DITHER_EN; \
	type FMT_SPATIAL_DITHER_MODE; \
	type FMT_SPATIAL_DITHER_DEPTH; \
	type FMT_TEMPORAL_DITHER_EN; \
	type FMT_HIGHPASS_RANDOM_ENABLE; \
	type FMT_FRAME_RANDOM_ENABLE; \
	type FMT_RGB_RANDOM_ENABLE; \
	type FMT_SPATIAL_DITHER_FRAME_COUNTER_MAX; \
	type FMT_SPATIAL_DITHER_FRAME_COUNTER_BIT_SWAP; \
	type FMT_RAND_R_SEED; \
	type FMT_RAND_G_SEED; \
	type FMT_RAND_B_SEED; \
	type FMT_PIXEL_ENCODING; \
	type FMT_CLAMP_DATA_EN; \
	type FMT_CLAMP_COLOR_FORMAT; \
	type FMT_DYNAMIC_EXP_EN; \
	type FMT_DYNAMIC_EXP_MODE; \
	type FMT_MAP420MEM_PWR_FORCE; \
	type CM_OCSC_MODE; \
	type CM_RGAM_RAMB_EXP_REGION_START_B; \
	type CM_RGAM_RAMB_EXP_REGION_START_SEGMENT_B; \
	type CM_RGAM_RAMB_EXP_REGION_START_G; \
	type CM_RGAM_RAMB_EXP_REGION_START_SEGMENT_G; \
	type CM_RGAM_RAMB_EXP_REGION_START_R; \
	type CM_RGAM_RAMB_EXP_REGION_START_SEGMENT_R; \
	type CM_RGAM_RAMB_EXP_REGION_LINEAR_SLOPE_B; \
	type CM_RGAM_RAMB_EXP_REGION_LINEAR_SLOPE_G; \
	type CM_RGAM_RAMB_EXP_REGION_LINEAR_SLOPE_R; \
	type CM_RGAM_RAMB_EXP_REGION_END_B; \
	type CM_RGAM_RAMB_EXP_REGION_END_SLOPE_B; \
	type CM_RGAM_RAMB_EXP_REGION_END_BASE_B; \
	type CM_RGAM_RAMB_EXP_REGION_END_G; \
	type CM_RGAM_RAMB_EXP_REGION_END_SLOPE_G; \
	type CM_RGAM_RAMB_EXP_REGION_END_BASE_G; \
	type CM_RGAM_RAMB_EXP_REGION_END_R; \
	type CM_RGAM_RAMB_EXP_REGION_END_SLOPE_R; \
	type CM_RGAM_RAMB_EXP_REGION_END_BASE_R; \
	type CM_RGAM_RAMB_EXP_REGION0_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION0_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION1_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION1_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION2_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION2_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION3_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION3_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION4_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION4_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION5_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION5_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION6_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION6_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION7_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION7_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION8_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION8_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION9_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION9_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION10_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION10_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION11_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION11_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION12_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION12_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION13_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION13_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION14_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION14_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION15_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION15_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION16_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION16_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION17_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION17_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION18_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION18_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION19_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION19_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION20_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION20_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION21_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION21_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION22_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION22_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION23_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION23_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION24_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION24_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION25_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION25_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION26_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION26_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION27_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION27_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION28_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION28_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION29_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION29_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION30_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION30_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION31_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION31_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION32_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION32_NUM_SEGMENTS; \
	type CM_RGAM_RAMB_EXP_REGION33_LUT_OFFSET; \
	type CM_RGAM_RAMB_EXP_REGION33_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION_START_B; \
	type CM_RGAM_RAMA_EXP_REGION_START_SEGMENT_B; \
	type CM_RGAM_RAMA_EXP_REGION_START_G; \
	type CM_RGAM_RAMA_EXP_REGION_START_SEGMENT_G; \
	type CM_RGAM_RAMA_EXP_REGION_START_R; \
	type CM_RGAM_RAMA_EXP_REGION_START_SEGMENT_R; \
	type CM_RGAM_RAMA_EXP_REGION_LINEAR_SLOPE_B; \
	type CM_RGAM_RAMA_EXP_REGION_LINEAR_SLOPE_G; \
	type CM_RGAM_RAMA_EXP_REGION_LINEAR_SLOPE_R; \
	type CM_RGAM_RAMA_EXP_REGION_END_B; \
	type CM_RGAM_RAMA_EXP_REGION_END_SLOPE_B; \
	type CM_RGAM_RAMA_EXP_REGION_END_BASE_B; \
	type CM_RGAM_RAMA_EXP_REGION_END_G; \
	type CM_RGAM_RAMA_EXP_REGION_END_SLOPE_G; \
	type CM_RGAM_RAMA_EXP_REGION_END_BASE_G; \
	type CM_RGAM_RAMA_EXP_REGION_END_R; \
	type CM_RGAM_RAMA_EXP_REGION_END_SLOPE_R; \
	type CM_RGAM_RAMA_EXP_REGION_END_BASE_R; \
	type CM_RGAM_RAMA_EXP_REGION0_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION0_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION1_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION1_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION2_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION2_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION3_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION3_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION4_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION4_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION5_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION5_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION6_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION6_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION7_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION7_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION8_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION8_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION9_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION9_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION10_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION10_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION11_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION11_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION12_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION12_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION13_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION13_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION14_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION14_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION15_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION15_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION16_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION16_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION17_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION17_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION18_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION18_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION19_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION19_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION20_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION20_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION21_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION21_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION22_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION22_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION23_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION23_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION24_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION24_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION25_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION25_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION26_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION26_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION27_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION27_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION28_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION28_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION29_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION29_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION30_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION30_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION31_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION31_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION32_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION32_NUM_SEGMENTS; \
	type CM_RGAM_RAMA_EXP_REGION33_LUT_OFFSET; \
	type CM_RGAM_RAMA_EXP_REGION33_NUM_SEGMENTS; \
	type CM_RGAM_LUT_WRITE_EN_MASK; \
	type CM_RGAM_LUT_WRITE_SEL; \
	type CM_RGAM_LUT_INDEX; \
	type RGAM_MEM_PWR_FORCE; \
	type CM_RGAM_LUT_DATA; \
	type FMT_STEREOSYNC_OVERRIDE

struct dcn10_opp_shift {
	OPP_DCN10_REG_FIELD_LIST(uint8_t);
};

struct dcn10_opp_mask {
	OPP_DCN10_REG_FIELD_LIST(uint32_t);
};

struct dcn10_opp_registers {
597 598 599 600 601 602 603 604 605 606 607 608
	uint32_t CM_OCSC_C11_C12;
	uint32_t CM_OCSC_C13_C14;
	uint32_t CM_OCSC_C21_C22;
	uint32_t CM_OCSC_C23_C24;
	uint32_t CM_OCSC_C31_C32;
	uint32_t CM_OCSC_C33_C34;
	uint32_t CM_COMB_C11_C12;
	uint32_t CM_COMB_C13_C14;
	uint32_t CM_COMB_C21_C22;
	uint32_t CM_COMB_C23_C24;
	uint32_t CM_COMB_C31_C32;
	uint32_t CM_COMB_C33_C34;
609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701
	uint32_t CM_RGAM_LUT_WRITE_EN_MASK;
	uint32_t CM_RGAM_CONTROL;
	uint32_t OBUF_CONTROL;
	uint32_t FMT_BIT_DEPTH_CONTROL;
	uint32_t FMT_CONTROL;
	uint32_t FMT_DITHER_RAND_R_SEED;
	uint32_t FMT_DITHER_RAND_G_SEED;
	uint32_t FMT_DITHER_RAND_B_SEED;
	uint32_t FMT_CLAMP_CNTL;
	uint32_t FMT_DYNAMIC_EXP_CNTL;
	uint32_t FMT_MAP420_MEMORY_CONTROL;
	uint32_t CM_OCSC_CONTROL;
	uint32_t CM_RGAM_RAMB_START_CNTL_B;
	uint32_t CM_RGAM_RAMB_START_CNTL_G;
	uint32_t CM_RGAM_RAMB_START_CNTL_R;
	uint32_t CM_RGAM_RAMB_SLOPE_CNTL_B;
	uint32_t CM_RGAM_RAMB_SLOPE_CNTL_G;
	uint32_t CM_RGAM_RAMB_SLOPE_CNTL_R;
	uint32_t CM_RGAM_RAMB_END_CNTL1_B;
	uint32_t CM_RGAM_RAMB_END_CNTL2_B;
	uint32_t CM_RGAM_RAMB_END_CNTL1_G;
	uint32_t CM_RGAM_RAMB_END_CNTL2_G;
	uint32_t CM_RGAM_RAMB_END_CNTL1_R;
	uint32_t CM_RGAM_RAMB_END_CNTL2_R;
	uint32_t CM_RGAM_RAMB_REGION_0_1;
	uint32_t CM_RGAM_RAMB_REGION_2_3;
	uint32_t CM_RGAM_RAMB_REGION_4_5;
	uint32_t CM_RGAM_RAMB_REGION_6_7;
	uint32_t CM_RGAM_RAMB_REGION_8_9;
	uint32_t CM_RGAM_RAMB_REGION_10_11;
	uint32_t CM_RGAM_RAMB_REGION_12_13;
	uint32_t CM_RGAM_RAMB_REGION_14_15;
	uint32_t CM_RGAM_RAMB_REGION_16_17;
	uint32_t CM_RGAM_RAMB_REGION_18_19;
	uint32_t CM_RGAM_RAMB_REGION_20_21;
	uint32_t CM_RGAM_RAMB_REGION_22_23;
	uint32_t CM_RGAM_RAMB_REGION_24_25;
	uint32_t CM_RGAM_RAMB_REGION_26_27;
	uint32_t CM_RGAM_RAMB_REGION_28_29;
	uint32_t CM_RGAM_RAMB_REGION_30_31;
	uint32_t CM_RGAM_RAMB_REGION_32_33;
	uint32_t CM_RGAM_RAMA_START_CNTL_B;
	uint32_t CM_RGAM_RAMA_START_CNTL_G;
	uint32_t CM_RGAM_RAMA_START_CNTL_R;
	uint32_t CM_RGAM_RAMA_SLOPE_CNTL_B;
	uint32_t CM_RGAM_RAMA_SLOPE_CNTL_G;
	uint32_t CM_RGAM_RAMA_SLOPE_CNTL_R;
	uint32_t CM_RGAM_RAMA_END_CNTL1_B;
	uint32_t CM_RGAM_RAMA_END_CNTL2_B;
	uint32_t CM_RGAM_RAMA_END_CNTL1_G;
	uint32_t CM_RGAM_RAMA_END_CNTL2_G;
	uint32_t CM_RGAM_RAMA_END_CNTL1_R;
	uint32_t CM_RGAM_RAMA_END_CNTL2_R;
	uint32_t CM_RGAM_RAMA_REGION_0_1;
	uint32_t CM_RGAM_RAMA_REGION_2_3;
	uint32_t CM_RGAM_RAMA_REGION_4_5;
	uint32_t CM_RGAM_RAMA_REGION_6_7;
	uint32_t CM_RGAM_RAMA_REGION_8_9;
	uint32_t CM_RGAM_RAMA_REGION_10_11;
	uint32_t CM_RGAM_RAMA_REGION_12_13;
	uint32_t CM_RGAM_RAMA_REGION_14_15;
	uint32_t CM_RGAM_RAMA_REGION_16_17;
	uint32_t CM_RGAM_RAMA_REGION_18_19;
	uint32_t CM_RGAM_RAMA_REGION_20_21;
	uint32_t CM_RGAM_RAMA_REGION_22_23;
	uint32_t CM_RGAM_RAMA_REGION_24_25;
	uint32_t CM_RGAM_RAMA_REGION_26_27;
	uint32_t CM_RGAM_RAMA_REGION_28_29;
	uint32_t CM_RGAM_RAMA_REGION_30_31;
	uint32_t CM_RGAM_RAMA_REGION_32_33;
	uint32_t CM_RGAM_LUT_INDEX;
	uint32_t CM_MEM_PWR_CTRL;
	uint32_t CM_RGAM_LUT_DATA;
};

struct dcn10_opp {
	struct output_pixel_processor base;

	const struct dcn10_opp_registers *regs;
	const struct dcn10_opp_shift *opp_shift;
	const struct dcn10_opp_mask *opp_mask;

	bool is_write_to_ram_a_safe;
};

void dcn10_opp_construct(struct dcn10_opp *oppn10,
	struct dc_context *ctx,
	uint32_t inst,
	const struct dcn10_opp_registers *regs,
	const struct dcn10_opp_shift *opp_shift,
	const struct dcn10_opp_mask *opp_mask);

#endif