Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /* drivers/gpu/drm/exynos/regs-scaler.h
0003  *
0004  * Copyright (c) 2017 Samsung Electronics Co., Ltd.
0005  *      http://www.samsung.com/
0006  * Author: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>
0007  *
0008  * Register definition file for Samsung scaler driver
0009  */
0010 
0011 #ifndef EXYNOS_REGS_SCALER_H
0012 #define EXYNOS_REGS_SCALER_H
0013 
0014 /* Register part */
0015 
0016 /* Global setting */
0017 #define SCALER_STATUS           0x0 /* no shadow */
0018 #define SCALER_CFG          0x4
0019 
0020 /* Interrupt */
0021 #define SCALER_INT_EN           0x8 /* no shadow */
0022 #define SCALER_INT_STATUS       0xc /* no shadow */
0023 
0024 /* SRC */
0025 #define SCALER_SRC_CFG          0x10
0026 #define SCALER_SRC_Y_BASE       0x14
0027 #define SCALER_SRC_CB_BASE      0x18
0028 #define SCALER_SRC_CR_BASE      0x294
0029 #define SCALER_SRC_SPAN         0x1c
0030 #define SCALER_SRC_Y_POS        0x20
0031 #define SCALER_SRC_WH           0x24
0032 #define SCALER_SRC_C_POS        0x28
0033 
0034 /* DST */
0035 #define SCALER_DST_CFG          0x30
0036 #define SCALER_DST_Y_BASE       0x34
0037 #define SCALER_DST_CB_BASE      0x38
0038 #define SCALER_DST_CR_BASE      0x298
0039 #define SCALER_DST_SPAN         0x3c
0040 #define SCALER_DST_WH           0x40
0041 #define SCALER_DST_POS          0x44
0042 
0043 /* Ratio */
0044 #define SCALER_H_RATIO          0x50
0045 #define SCALER_V_RATIO          0x54
0046 
0047 /* Rotation */
0048 #define SCALER_ROT_CFG          0x58
0049 
0050 /* Coefficient */
0051 /*
0052  * YHCOEF_{x}{A|B|C|D}          CHCOEF_{x}{A|B|C|D}
0053  *
0054  *  A   B   C   D   A   B   C   D
0055  * 0    60  64  68  6c  140 144 148 14c
0056  * 1    70  74  78  7c  150 154 158 15c
0057  * 2    80  84  88  8c  160 164 168 16c
0058  * 3    90  94  98  9c  170 174 178 17c
0059  * 4    a0  a4  a8  ac  180 184 188 18c
0060  * 5    b0  b4  b8  bc  190 194 198 19c
0061  * 6    c0  c4  c8  cc  1a0 1a4 1a8 1ac
0062  * 7    d0  d4  d8  dc  1b0 1b4 1b8 1bc
0063  * 8    e0  e4  e8  ec  1c0 1c4 1c8 1cc
0064  *
0065  *
0066  * YVCOEF_{x}{A|B}          CVCOEF_{x}{A|B}
0067  *
0068  *  A   B           A   B
0069  * 0    f0  f4          1d0 1d4
0070  * 1    f8  fc          1d8 1dc
0071  * 2    100 104         1e0 1e4
0072  * 3    108 10c         1e8 1ec
0073  * 4    110 114         1f0 1f4
0074  * 5    118 11c         1f8 1fc
0075  * 6    120 124         200 204
0076  * 7    128 12c         208 20c
0077  * 8    130 134         210 214
0078  */
0079 #define _SCALER_HCOEF_DELTA(r, c)   ((r) * 0x10 + (c) * 0x4)
0080 #define _SCALER_VCOEF_DELTA(r, c)   ((r) * 0x8 + (c) * 0x4)
0081 
0082 #define SCALER_YHCOEF(r, c)     (0x60 + _SCALER_HCOEF_DELTA((r), (c)))
0083 #define SCALER_YVCOEF(r, c)     (0xf0 + _SCALER_VCOEF_DELTA((r), (c)))
0084 #define SCALER_CHCOEF(r, c)     (0x140 + _SCALER_HCOEF_DELTA((r), (c)))
0085 #define SCALER_CVCOEF(r, c)     (0x1d0 + _SCALER_VCOEF_DELTA((r), (c)))
0086 
0087 
0088 /* Color Space Conversion */
0089 #define SCALER_CSC_COEF(x, y)       (0x220 + (y) * 0xc + (x) * 0x4)
0090 
0091 /* Dithering */
0092 #define SCALER_DITH_CFG         0x250
0093 
0094 /* Version Number */
0095 #define SCALER_VER          0x260   /* no shadow */
0096 
0097 /* Cycle count and Timeout */
0098 #define SCALER_CYCLE_COUNT      0x278   /* no shadow */
0099 #define SCALER_TIMEOUT_CTRL     0x2c0   /* no shadow */
0100 #define SCALER_TIMEOUT_CNT      0x2c4   /* no shadow */
0101 
0102 /* Blending */
0103 #define SCALER_SRC_BLEND_COLOR      0x280
0104 #define SCALER_SRC_BLEND_ALPHA      0x284
0105 #define SCALER_DST_BLEND_COLOR      0x288
0106 #define SCALER_DST_BLEND_ALPHA      0x28c
0107 
0108 /* Color Fill */
0109 #define SCALER_FILL_COLOR       0x290
0110 
0111 /* Multiple Command Queue */
0112 #define SCALER_ADDR_Q_CONFIG        0x2a0   /* no shadow */
0113 #define SCALER_SRC_ADDR_Q_STATUS    0x2a4   /* no shadow */
0114 #define SCALER_SRC_ADDR_Q       0x2a8   /* no shadow */
0115 
0116 /* CRC */
0117 #define SCALER_CRC_COLOR00_10       0x2b0   /* no shadow */
0118 #define SCALER_CRC_COLOR20_30       0x2b4   /* no shadow */
0119 #define SCALER_CRC_COLOR01_11       0x2b8   /* no shadow */
0120 #define SCALER_CRC_COLOR21_31       0x2bc   /* no shadow */
0121 
0122 /* Shadow Registers */
0123 #define SCALER_SHADOW_OFFSET        0x1000
0124 
0125 
0126 /* Bit definition part */
0127 #define SCALER_MASK(hi_b, lo_b)     ((1 << ((hi_b) - (lo_b) + 1)) - 1)
0128 #define SCALER_GET(reg, hi_b, lo_b) \
0129     (((reg) >> (lo_b)) & SCALER_MASK(hi_b, lo_b))
0130 #define SCALER_SET(val, hi_b, lo_b) \
0131     (((val) & SCALER_MASK(hi_b, lo_b)) << lo_b)
0132 
0133 /* SCALER_STATUS */
0134 #define SCALER_STATUS_SCALER_RUNNING        (1 << 1)
0135 #define SCALER_STATUS_SCALER_READY_CLK_DOWN (1 << 0)
0136 
0137 /* SCALER_CFG */
0138 #define SCALER_CFG_FILL_EN          (1 << 24)
0139 #define SCALER_CFG_BLEND_COLOR_DIVIDE_ALPHA_EN  (1 << 17)
0140 #define SCALER_CFG_BLEND_EN         (1 << 16)
0141 #define SCALER_CFG_CSC_Y_OFFSET_SRC_EN      (1 << 10)
0142 #define SCALER_CFG_CSC_Y_OFFSET_DST_EN      (1 << 9)
0143 #define SCALER_CFG_16_BURST_MODE        (1 << 8)
0144 #define SCALER_CFG_SOFT_RESET           (1 << 1)
0145 #define SCALER_CFG_START_CMD            (1 << 0)
0146 
0147 /* SCALER_INT_EN */
0148 #define SCALER_INT_EN_TIMEOUT           (1 << 31)
0149 #define SCALER_INT_EN_ILLEGAL_BLEND     (1 << 24)
0150 #define SCALER_INT_EN_ILLEGAL_RATIO     (1 << 23)
0151 #define SCALER_INT_EN_ILLEGAL_DST_HEIGHT    (1 << 22)
0152 #define SCALER_INT_EN_ILLEGAL_DST_WIDTH     (1 << 21)
0153 #define SCALER_INT_EN_ILLEGAL_DST_V_POS     (1 << 20)
0154 #define SCALER_INT_EN_ILLEGAL_DST_H_POS     (1 << 19)
0155 #define SCALER_INT_EN_ILLEGAL_DST_C_SPAN    (1 << 18)
0156 #define SCALER_INT_EN_ILLEGAL_DST_Y_SPAN    (1 << 17)
0157 #define SCALER_INT_EN_ILLEGAL_DST_CR_BASE   (1 << 16)
0158 #define SCALER_INT_EN_ILLEGAL_DST_CB_BASE   (1 << 15)
0159 #define SCALER_INT_EN_ILLEGAL_DST_Y_BASE    (1 << 14)
0160 #define SCALER_INT_EN_ILLEGAL_DST_COLOR     (1 << 13)
0161 #define SCALER_INT_EN_ILLEGAL_SRC_HEIGHT    (1 << 12)
0162 #define SCALER_INT_EN_ILLEGAL_SRC_WIDTH     (1 << 11)
0163 #define SCALER_INT_EN_ILLEGAL_SRC_CV_POS    (1 << 10)
0164 #define SCALER_INT_EN_ILLEGAL_SRC_CH_POS    (1 << 9)
0165 #define SCALER_INT_EN_ILLEGAL_SRC_YV_POS    (1 << 8)
0166 #define SCALER_INT_EN_ILLEGAL_SRC_YH_POS    (1 << 7)
0167 #define SCALER_INT_EN_ILLEGAL_DST_SPAN      (1 << 6)
0168 #define SCALER_INT_EN_ILLEGAL_SRC_Y_SPAN    (1 << 5)
0169 #define SCALER_INT_EN_ILLEGAL_SRC_CR_BASE   (1 << 4)
0170 #define SCALER_INT_EN_ILLEGAL_SRC_CB_BASE   (1 << 3)
0171 #define SCALER_INT_EN_ILLEGAL_SRC_Y_BASE    (1 << 2)
0172 #define SCALER_INT_EN_ILLEGAL_SRC_COLOR     (1 << 1)
0173 #define SCALER_INT_EN_FRAME_END         (1 << 0)
0174 
0175 /* SCALER_INT_STATUS */
0176 #define SCALER_INT_STATUS_TIMEOUT       (1 << 31)
0177 #define SCALER_INT_STATUS_ILLEGAL_BLEND     (1 << 24)
0178 #define SCALER_INT_STATUS_ILLEGAL_RATIO     (1 << 23)
0179 #define SCALER_INT_STATUS_ILLEGAL_DST_HEIGHT    (1 << 22)
0180 #define SCALER_INT_STATUS_ILLEGAL_DST_WIDTH (1 << 21)
0181 #define SCALER_INT_STATUS_ILLEGAL_DST_V_POS (1 << 20)
0182 #define SCALER_INT_STATUS_ILLEGAL_DST_H_POS (1 << 19)
0183 #define SCALER_INT_STATUS_ILLEGAL_DST_C_SPAN    (1 << 18)
0184 #define SCALER_INT_STATUS_ILLEGAL_DST_Y_SPAN    (1 << 17)
0185 #define SCALER_INT_STATUS_ILLEGAL_DST_CR_BASE   (1 << 16)
0186 #define SCALER_INT_STATUS_ILLEGAL_DST_CB_BASE   (1 << 15)
0187 #define SCALER_INT_STATUS_ILLEGAL_DST_Y_BASE    (1 << 14)
0188 #define SCALER_INT_STATUS_ILLEGAL_DST_COLOR (1 << 13)
0189 #define SCALER_INT_STATUS_ILLEGAL_SRC_HEIGHT    (1 << 12)
0190 #define SCALER_INT_STATUS_ILLEGAL_SRC_WIDTH (1 << 11)
0191 #define SCALER_INT_STATUS_ILLEGAL_SRC_CV_POS    (1 << 10)
0192 #define SCALER_INT_STATUS_ILLEGAL_SRC_CH_POS    (1 << 9)
0193 #define SCALER_INT_STATUS_ILLEGAL_SRC_YV_POS    (1 << 8)
0194 #define SCALER_INT_STATUS_ILLEGAL_SRC_YH_POS    (1 << 7)
0195 #define SCALER_INT_STATUS_ILLEGAL_DST_SPAN  (1 << 6)
0196 #define SCALER_INT_STATUS_ILLEGAL_SRC_Y_SPAN    (1 << 5)
0197 #define SCALER_INT_STATUS_ILLEGAL_SRC_CR_BASE   (1 << 4)
0198 #define SCALER_INT_STATUS_ILLEGAL_SRC_CB_BASE   (1 << 3)
0199 #define SCALER_INT_STATUS_ILLEGAL_SRC_Y_BASE    (1 << 2)
0200 #define SCALER_INT_STATUS_ILLEGAL_SRC_COLOR (1 << 1)
0201 #define SCALER_INT_STATUS_FRAME_END     (1 << 0)
0202 
0203 /* SCALER_SRC_CFG */
0204 #define SCALER_SRC_CFG_TILE_EN          (1 << 10)
0205 #define SCALER_SRC_CFG_GET_BYTE_SWAP(r)     SCALER_GET(r, 6, 5)
0206 #define SCALER_SRC_CFG_SET_BYTE_SWAP(v)     SCALER_SET(v, 6, 5)
0207 #define SCALER_SRC_CFG_GET_COLOR_FORMAT(r)  SCALER_GET(r, 4, 0)
0208 #define SCALER_SRC_CFG_SET_COLOR_FORMAT(v)  SCALER_SET(v, 4, 0)
0209 #define SCALER_YUV420_2P_UV         0
0210 #define SCALER_YUV422_2P_UV         2
0211 #define SCALER_YUV444_2P_UV         3
0212 #define SCALER_RGB_565              4
0213 #define SCALER_ARGB1555             5
0214 #define SCALER_ARGB8888             6
0215 #define SCALER_ARGB8888_PRE         7
0216 #define SCALER_YUV422_1P_YVYU           9
0217 #define SCALER_YUV422_1P_YUYV           10
0218 #define SCALER_YUV422_1P_UYVY           11
0219 #define SCALER_ARGB4444             12
0220 #define SCALER_L8A8             13
0221 #define SCALER_RGBA8888             14
0222 #define SCALER_L8               15
0223 #define SCALER_YUV420_2P_VU         16
0224 #define SCALER_YUV422_2P_VU         18
0225 #define SCALER_YUV444_2P_VU         19
0226 #define SCALER_YUV420_3P            20
0227 #define SCALER_YUV422_3P            22
0228 #define SCALER_YUV444_3P            23
0229 
0230 /* SCALER_SRC_SPAN */
0231 #define SCALER_SRC_SPAN_GET_C_SPAN(r)       SCALER_GET(r, 29, 16)
0232 #define SCALER_SRC_SPAN_SET_C_SPAN(v)       SCALER_SET(v, 29, 16)
0233 #define SCALER_SRC_SPAN_GET_Y_SPAN(r)       SCALER_GET(r, 13, 0)
0234 #define SCALER_SRC_SPAN_SET_Y_SPAN(v)       SCALER_SET(v, 13, 0)
0235 
0236 /* SCALER_SRC_Y_POS */
0237 #define SCALER_SRC_Y_POS_GET_YH_POS(r)      SCALER_GET(r, 31, 16)
0238 #define SCALER_SRC_Y_POS_SET_YH_POS(v)      SCALER_SET(v, 31, 16)
0239 #define SCALER_SRC_Y_POS_GET_YV_POS(r)      SCALER_GET(r, 15, 0)
0240 #define SCALER_SRC_Y_POS_SET_YV_POS(v)      SCALER_SET(v, 15, 0)
0241 
0242 /* SCALER_SRC_WH */
0243 #define SCALER_SRC_WH_GET_WIDTH(r)      SCALER_GET(r, 29, 16)
0244 #define SCALER_SRC_WH_SET_WIDTH(v)      SCALER_SET(v, 29, 16)
0245 #define SCALER_SRC_WH_GET_HEIGHT(r)     SCALER_GET(r, 13, 0)
0246 #define SCALER_SRC_WH_SET_HEIGHT(v)     SCALER_SET(v, 13, 0)
0247 
0248 /* SCALER_SRC_C_POS */
0249 #define SCALER_SRC_C_POS_GET_CH_POS(r)      SCALER_GET(r, 31, 16)
0250 #define SCALER_SRC_C_POS_SET_CH_POS(v)      SCALER_SET(v, 31, 16)
0251 #define SCALER_SRC_C_POS_GET_CV_POS(r)      SCALER_GET(r, 15, 0)
0252 #define SCALER_SRC_C_POS_SET_CV_POS(v)      SCALER_SET(v, 15, 0)
0253 
0254 /* SCALER_DST_CFG */
0255 #define SCALER_DST_CFG_GET_BYTE_SWAP(r)     SCALER_GET(r, 6, 5)
0256 #define SCALER_DST_CFG_SET_BYTE_SWAP(v)     SCALER_SET(v, 6, 5)
0257 #define SCALER_DST_CFG_GET_COLOR_FORMAT(r)  SCALER_GET(r, 4, 0)
0258 #define SCALER_DST_CFG_SET_COLOR_FORMAT(v)  SCALER_SET(v, 4, 0)
0259 
0260 /* SCALER_DST_SPAN */
0261 #define SCALER_DST_SPAN_GET_C_SPAN(r)       SCALER_GET(r, 29, 16)
0262 #define SCALER_DST_SPAN_SET_C_SPAN(v)       SCALER_SET(v, 29, 16)
0263 #define SCALER_DST_SPAN_GET_Y_SPAN(r)       SCALER_GET(r, 13, 0)
0264 #define SCALER_DST_SPAN_SET_Y_SPAN(v)       SCALER_SET(v, 13, 0)
0265 
0266 /* SCALER_DST_WH */
0267 #define SCALER_DST_WH_GET_WIDTH(r)      SCALER_GET(r, 29, 16)
0268 #define SCALER_DST_WH_SET_WIDTH(v)      SCALER_SET(v, 29, 16)
0269 #define SCALER_DST_WH_GET_HEIGHT(r)     SCALER_GET(r, 13, 0)
0270 #define SCALER_DST_WH_SET_HEIGHT(v)     SCALER_SET(v, 13, 0)
0271 
0272 /* SCALER_DST_POS */
0273 #define SCALER_DST_POS_GET_H_POS(r)     SCALER_GET(r, 29, 16)
0274 #define SCALER_DST_POS_SET_H_POS(v)     SCALER_SET(v, 29, 16)
0275 #define SCALER_DST_POS_GET_V_POS(r)     SCALER_GET(r, 13, 0)
0276 #define SCALER_DST_POS_SET_V_POS(v)     SCALER_SET(v, 13, 0)
0277 
0278 /* SCALER_H_RATIO */
0279 #define SCALER_H_RATIO_GET(r)           SCALER_GET(r, 18, 0)
0280 #define SCALER_H_RATIO_SET(v)           SCALER_SET(v, 18, 0)
0281 
0282 /* SCALER_V_RATIO */
0283 #define SCALER_V_RATIO_GET(r)           SCALER_GET(r, 18, 0)
0284 #define SCALER_V_RATIO_SET(v)           SCALER_SET(v, 18, 0)
0285 
0286 /* SCALER_ROT_CFG */
0287 #define SCALER_ROT_CFG_FLIP_X_EN        (1 << 3)
0288 #define SCALER_ROT_CFG_FLIP_Y_EN        (1 << 2)
0289 #define SCALER_ROT_CFG_GET_ROTMODE(r)       SCALER_GET(r, 1, 0)
0290 #define SCALER_ROT_CFG_SET_ROTMODE(v)       SCALER_SET(v, 1, 0)
0291 #define SCALER_ROT_MODE_90          1
0292 #define SCALER_ROT_MODE_180         2
0293 #define SCALER_ROT_MODE_270         3
0294 
0295 /* SCALER_HCOEF, SCALER_VCOEF */
0296 #define SCALER_COEF_SHIFT(i)            (16 * (1 - (i) % 2))
0297 #define SCALER_COEF_GET(r, i)           \
0298                 (((r) >> SCALER_COEF_SHIFT(i)) & 0x1ff)
0299 #define SCALER_COEF_SET(v, i)           \
0300                 (((v) & 0x1ff) << SCALER_COEF_SHIFT(i))
0301 
0302 /* SCALER_CSC_COEFxy */
0303 #define SCALER_CSC_COEF_GET(r)          SCALER_GET(r, 11, 0)
0304 #define SCALER_CSC_COEF_SET(v)          SCALER_SET(v, 11, 0)
0305 
0306 /* SCALER_DITH_CFG */
0307 #define SCALER_DITH_CFG_GET_R_TYPE(r)       SCALER_GET(r, 8, 6)
0308 #define SCALER_DITH_CFG_SET_R_TYPE(v)       SCALER_SET(v, 8, 6)
0309 #define SCALER_DITH_CFG_GET_G_TYPE(r)       SCALER_GET(r, 5, 3)
0310 #define SCALER_DITH_CFG_SET_G_TYPE(v)       SCALER_SET(v, 5, 3)
0311 #define SCALER_DITH_CFG_GET_B_TYPE(r)       SCALER_GET(r, 2, 0)
0312 #define SCALER_DITH_CFG_SET_B_TYPE(v)       SCALER_SET(v, 2, 0)
0313 
0314 /* SCALER_TIMEOUT_CTRL */
0315 #define SCALER_TIMEOUT_CTRL_GET_TIMER_VALUE(r)  SCALER_GET(r, 31, 16)
0316 #define SCALER_TIMEOUT_CTRL_SET_TIMER_VALUE(v)  SCALER_SET(v, 31, 16)
0317 #define SCALER_TIMEOUT_CTRL_GET_TIMER_DIV(r)    SCALER_GET(r, 7, 4)
0318 #define SCALER_TIMEOUT_CTRL_SET_TIMER_DIV(v)    SCALER_SET(v, 7, 4)
0319 #define SCALER_TIMEOUT_CTRL_TIMER_ENABLE    (1 << 0)
0320 
0321 /* SCALER_TIMEOUT_CNT */
0322 #define SCALER_TIMEOUT_CTRL_GET_TIMER_COUNT(r)  SCALER_GET(r, 31, 16)
0323 
0324 /* SCALER_SRC_BLEND_COLOR */
0325 #define SCALER_SRC_BLEND_COLOR_SEL_INV      (1 << 31)
0326 #define SCALER_SRC_BLEND_COLOR_GET_SEL(r)   SCALER_GET(r, 30, 29)
0327 #define SCALER_SRC_BLEND_COLOR_SET_SEL(v)   SCALER_SET(v, 30, 29)
0328 #define SCALER_SRC_BLEND_COLOR_OP_SEL_INV   (1 << 28)
0329 #define SCALER_SRC_BLEND_COLOR_GET_OP_SEL(r)    SCALER_GET(r, 27, 24)
0330 #define SCALER_SRC_BLEND_COLOR_SET_OP_SEL(v)    SCALER_SET(v, 27, 24)
0331 #define SCALER_SRC_BLEND_COLOR_GET_COLOR0(r)    SCALER_GET(r, 23, 16)
0332 #define SCALER_SRC_BLEND_COLOR_SET_COLOR0(v)    SCALER_SET(v, 23, 16)
0333 #define SCALER_SRC_BLEND_COLOR_GET_COLOR1(r)    SCALER_GET(r, 15, 8)
0334 #define SCALER_SRC_BLEND_COLOR_SET_COLOR1(v)    SCALER_SET(v, 15, 8)
0335 #define SCALER_SRC_BLEND_COLOR_GET_COLOR2(r)    SCALER_GET(r, 7, 0)
0336 #define SCALER_SRC_BLEND_COLOR_SET_COLOR2(v)    SCALER_SET(v, 7, 0)
0337 
0338 /* SCALER_SRC_BLEND_ALPHA */
0339 #define SCALER_SRC_BLEND_ALPHA_SEL_INV      (1 << 31)
0340 #define SCALER_SRC_BLEND_ALPHA_GET_SEL(r)   SCALER_GET(r, 30, 29)
0341 #define SCALER_SRC_BLEND_ALPHA_SET_SEL(v)   SCALER_SET(v, 30, 29)
0342 #define SCALER_SRC_BLEND_ALPHA_OP_SEL_INV   (1 << 28)
0343 #define SCALER_SRC_BLEND_ALPHA_GET_OP_SEL(r)    SCALER_GET(r, 27, 24)
0344 #define SCALER_SRC_BLEND_ALPHA_SET_OP_SEL(v)    SCALER_SET(v, 27, 24)
0345 #define SCALER_SRC_BLEND_ALPHA_GET_ALPHA(r) SCALER_GET(r, 7, 0)
0346 #define SCALER_SRC_BLEND_ALPHA_SET_ALPHA(v) SCALER_SET(v, 7, 0)
0347 
0348 /* SCALER_DST_BLEND_COLOR */
0349 #define SCALER_DST_BLEND_COLOR_SEL_INV      (1 << 31)
0350 #define SCALER_DST_BLEND_COLOR_GET_SEL(r)   SCALER_GET(r, 30, 29)
0351 #define SCALER_DST_BLEND_COLOR_SET_SEL(v)   SCALER_SET(v, 30, 29)
0352 #define SCALER_DST_BLEND_COLOR_OP_SEL_INV   (1 << 28)
0353 #define SCALER_DST_BLEND_COLOR_GET_OP_SEL(r)    SCALER_GET(r, 27, 24)
0354 #define SCALER_DST_BLEND_COLOR_SET_OP_SEL(v)    SCALER_SET(v, 27, 24)
0355 #define SCALER_DST_BLEND_COLOR_GET_COLOR0(r)    SCALER_GET(r, 23, 16)
0356 #define SCALER_DST_BLEND_COLOR_SET_COLOR0(v)    SCALER_SET(v, 23, 16)
0357 #define SCALER_DST_BLEND_COLOR_GET_COLOR1(r)    SCALER_GET(r, 15, 8)
0358 #define SCALER_DST_BLEND_COLOR_SET_COLOR1(v)    SCALER_SET(v, 15, 8)
0359 #define SCALER_DST_BLEND_COLOR_GET_COLOR2(r)    SCALER_GET(r, 7, 0)
0360 #define SCALER_DST_BLEND_COLOR_SET_COLOR2(v)    SCALER_SET(v, 7, 0)
0361 
0362 /* SCALER_DST_BLEND_ALPHA */
0363 #define SCALER_DST_BLEND_ALPHA_SEL_INV      (1 << 31)
0364 #define SCALER_DST_BLEND_ALPHA_GET_SEL(r)   SCALER_GET(r, 30, 29)
0365 #define SCALER_DST_BLEND_ALPHA_SET_SEL(v)   SCALER_SET(v, 30, 29)
0366 #define SCALER_DST_BLEND_ALPHA_OP_SEL_INV   (1 << 28)
0367 #define SCALER_DST_BLEND_ALPHA_GET_OP_SEL(r)    SCALER_GET(r, 27, 24)
0368 #define SCALER_DST_BLEND_ALPHA_SET_OP_SEL(v)    SCALER_SET(v, 27, 24)
0369 #define SCALER_DST_BLEND_ALPHA_GET_ALPHA(r) SCALER_GET(r, 7, 0)
0370 #define SCALER_DST_BLEND_ALPHA_SET_ALPHA(v) SCALER_SET(v, 7, 0)
0371 
0372 /* SCALER_FILL_COLOR */
0373 #define SCALER_FILL_COLOR_GET_ALPHA(r)      SCALER_GET(r, 31, 24)
0374 #define SCALER_FILL_COLOR_SET_ALPHA(v)      SCALER_SET(v, 31, 24)
0375 #define SCALER_FILL_COLOR_GET_FILL_COLOR0(r)    SCALER_GET(r, 23, 16)
0376 #define SCALER_FILL_COLOR_SET_FILL_COLOR0(v)    SCALER_SET(v, 23, 16)
0377 #define SCALER_FILL_COLOR_GET_FILL_COLOR1(r)    SCALER_GET(r, 15, 8)
0378 #define SCALER_FILL_COLOR_SET_FILL_COLOR1(v)    SCALER_SET(v, 15, 8)
0379 #define SCALER_FILL_COLOR_GET_FILL_COLOR2(r)    SCALER_GET(r, 7, 0)
0380 #define SCALER_FILL_COLOR_SET_FILL_COLOR2(v)    SCALER_SET(v, 7, 0)
0381 
0382 /* SCALER_ADDR_Q_CONFIG */
0383 #define SCALER_ADDR_Q_CONFIG_RST        (1 << 0)
0384 
0385 /* SCALER_SRC_ADDR_Q_STATUS */
0386 #define SCALER_SRC_ADDR_Q_STATUS_Y_FULL     (1 << 23)
0387 #define SCALER_SRC_ADDR_Q_STATUS_Y_EMPTY    (1 << 22)
0388 #define SCALER_SRC_ADDR_Q_STATUS_GET_Y_WR_IDX(r)    SCALER_GET(r, 21, 16)
0389 #define SCALER_SRC_ADDR_Q_STATUS_CB_FULL    (1 << 15)
0390 #define SCALER_SRC_ADDR_Q_STATUS_CB_EMPTY   (1 << 14)
0391 #define SCALER_SRC_ADDR_Q_STATUS_GET_CB_WR_IDX(r)   SCALER_GET(r, 13, 8)
0392 #define SCALER_SRC_ADDR_Q_STATUS_CR_FULL    (1 << 7)
0393 #define SCALER_SRC_ADDR_Q_STATUS_CR_EMPTY   (1 << 6)
0394 #define SCALER_SRC_ADDR_Q_STATUS_GET_CR_WR_IDX(r)   SCALER_GET(r, 5, 0)
0395 
0396 /* SCALER_DST_ADDR_Q_STATUS */
0397 #define SCALER_DST_ADDR_Q_STATUS_Y_FULL     (1 << 23)
0398 #define SCALER_DST_ADDR_Q_STATUS_Y_EMPTY    (1 << 22)
0399 #define SCALER_DST_ADDR_Q_STATUS_GET_Y_WR_IDX(r)    SCALER_GET(r, 21, 16)
0400 #define SCALER_DST_ADDR_Q_STATUS_CB_FULL    (1 << 15)
0401 #define SCALER_DST_ADDR_Q_STATUS_CB_EMPTY   (1 << 14)
0402 #define SCALER_DST_ADDR_Q_STATUS_GET_CB_WR_IDX(r)   SCALER_GET(r, 13, 8)
0403 #define SCALER_DST_ADDR_Q_STATUS_CR_FULL    (1 << 7)
0404 #define SCALER_DST_ADDR_Q_STATUS_CR_EMPTY   (1 << 6)
0405 #define SCALER_DST_ADDR_Q_STATUS_GET_CR_WR_IDX(r)   SCALER_GET(r, 5, 0)
0406 
0407 /* SCALER_CRC_COLOR00_10 */
0408 #define SCALER_CRC_COLOR00_10_GET_00(r)     SCALER_GET(r, 31, 16)
0409 #define SCALER_CRC_COLOR00_10_GET_10(r)     SCALER_GET(r, 15, 0)
0410 
0411 /* SCALER_CRC_COLOR20_30 */
0412 #define SCALER_CRC_COLOR20_30_GET_20(r)     SCALER_GET(r, 31, 16)
0413 #define SCALER_CRC_COLOR20_30_GET_30(r)     SCALER_GET(r, 15, 0)
0414 
0415 /* SCALER_CRC_COLOR01_11 */
0416 #define SCALER_CRC_COLOR01_11_GET_01(r)     SCALER_GET(r, 31, 16)
0417 #define SCALER_CRC_COLOR01_11_GET_11(r)     SCALER_GET(r, 15, 0)
0418 
0419 /* SCALER_CRC_COLOR21_31 */
0420 #define SCALER_CRC_COLOR21_31_GET_21(r)     SCALER_GET(r, 31, 16)
0421 #define SCALER_CRC_COLOR21_31_GET_31(r)     SCALER_GET(r, 15, 0)
0422 
0423 #endif /* EXYNOS_REGS_SCALER_H */