huangcm
2025-07-03 c26084b3642f262f858535ab4e46c1e9b520d3a1
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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
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
/*
 * Allwinner SoCs display driver.
 *
 * Copyright (C) 2016 Allwinner.
 *
 * This file is licensed under the terms of the GNU General Public
 * License version 2.  This program is licensed "as is" without any
 * warranty of any kind, whether express or implied.
 */
 
/*******************************************************************************
 *  All Winner Tech, All Right Reserved. 2014-2015 Copyright (c)
 *
 *  File name   :       de_fcc_type.h
 *
 *  Description :       display engine 2.0 fcc base struct declaration
 *
 *  History     :       2014/03/28  iptang  v0.1  Initial version
 *
 ******************************************************************************/
 
#ifndef __DE_FCC_TYPE__
#define __DE_FCC_TYPE__
 
#include "de_rtmx.h"
 
#define FCC_PARA_NUM  6
#define FCC_MODE_NUM  3
 
union FCC_CTRL_REG {
   unsigned int dwval;
   struct {
       unsigned int en:1;
       unsigned int res0:7;
       unsigned int win_en:1;
       unsigned int res1:23;
   } bits;
};
 
union FCC_SIZE_REG {
   unsigned int dwval;
   struct {
       unsigned int width:13;
       unsigned int res0:3;
       unsigned int height:13;
       unsigned int res1:3;
   } bits;
};
 
union FCC_WIN0_REG {
   unsigned int dwval;
   struct {
       unsigned int left:13;
       unsigned int res0:3;
       unsigned int top:13;
       unsigned int res1:3;
   } bits;
};
 
union FCC_WIN1_REG {
   unsigned int dwval;
   struct {
       unsigned int right:13;
       unsigned int res0:3;
       unsigned int bot:13;
       unsigned int res1:3;
   } bits;
};
 
union FCC_HUE_RANGE_REG {
   unsigned int dwval;
   struct {
       unsigned int hmin:12;
       unsigned int res0:4;
       unsigned int hmax:12;
       unsigned int res1:4;
   } bits;
};
 
union FCC_HS_GAIN_REG {
   unsigned int dwval;
   struct {
       unsigned int sgain:9;
       unsigned int res0:7;
       unsigned int hgain:9;
       unsigned int res1:7;
   } bits;
};
 
union FCC_CSC_CTL_REG {
   unsigned int dwval;
   struct {
       unsigned int bypass:1;
       unsigned int res0:31;
   } bits;
};
 
union FCC_CSC_COEFF_REG {
   unsigned int dwval;
   struct {
       unsigned int coff:13;
       unsigned int res0:19;
   } bits;
};
 
union FCC_CSC_CONST_REG {
   unsigned int dwval;
   struct {
       unsigned int cont:20;
       unsigned int res0:12;
   } bits;
};
 
union FCC_GLB_APH_REG {
   unsigned int dwval;
   struct {
       unsigned int res0:24;
       unsigned int alpha:8;
   } bits;
};
 
struct __fcc_reg_t {
   union FCC_CTRL_REG fcc_ctl;                    /* 0x00      */
   union FCC_SIZE_REG fcc_size;                  /* 0x04      */
   union FCC_WIN0_REG fcc_win0;                  /* 0x08      */
   union FCC_WIN1_REG fcc_win1;                  /* 0x0c      */
   union FCC_HUE_RANGE_REG fcc_range[6];       /* 0x10-0x24 */
   unsigned int res0[2];                    /* 0x28-0x2c */
   union FCC_HS_GAIN_REG fcc_gain[6];            /* 0x30-0x44 */
   unsigned int res1[2];                    /* 0x48-0x4c */
   union FCC_CSC_CTL_REG fcc_csc_ctl;            /* 0x50      */
   unsigned int res2[3];                    /* 0x54-0x5c */
   union FCC_CSC_COEFF_REG fcc_csc_coff0[3];      /* 0x60-0x68 */
   union FCC_CSC_CONST_REG fcc_csc_const0;        /* 0x6c      */
   union FCC_CSC_COEFF_REG fcc_csc_coff1[3];      /* 0x70-0x78 */
   union FCC_CSC_CONST_REG fcc_csc_const1;        /* 0x7c      */
   union FCC_CSC_COEFF_REG fcc_csc_coff2[3];      /* 0x80-0x88 */
   union FCC_CSC_CONST_REG fcc_csc_const2;        /* 0x8c      */
   union FCC_GLB_APH_REG fcc_glb_alpha;          /* 0x90      */
};
 
struct __fcc_config_data {
   /* ase */
   unsigned int fcc_en;
   unsigned int sgain[6];
 
   /* window */
   unsigned int win_en;
   struct de_rect win;
};
 
#endif