xref: /rockchip-linux_mpp/mpp/hal/vpu/m2vd/hal_m2vd_vdpu2_reg.h (revision 437bfbeb9567cca9cd9080e3f6954aa9d6a94f18)
1 /*
2  * Copyright 2016 Rockchip Electronics Co. LTD
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef __HAL_M2VD_VDPU2_REG_H__
18 #define __HAL_M2VD_VDPU2_REG_H__
19 
20 #include "rk_type.h"
21 
22 extern RK_U32 m2vh_debug;
23 
24 #define M2VD_VDPU2_REG_NUM    159
25 
26 typedef struct M2vdVdpu2Reg_t {
27     RK_U32                 ppReg[50];
28 
29     struct {
30         RK_U32  dec_out_tiled_e  : 1;
31         RK_U32  dec_latency      : 6;
32         RK_U32  pic_fixed_quant  : 1;
33         RK_U32  filtering_dis    : 1;
34         RK_U32  skip_mode        : 1;
35         RK_U32  dec_scmd_dis     : 1;
36         RK_U32  dec_adv_pre_dis  : 1;
37         RK_U32  priority_mode    : 1;   //chang
38         RK_U32  refbu2_thr       : 12;
39         RK_U32  refbu2_picid     : 5;
40         RK_U32  reserve1         : 2;
41     } sw50;
42 
43     struct {
44         RK_U32  stream_len       : 24;
45         RK_U32  reserve1         : 1;
46         RK_U32  init_qp          : 6;
47         RK_U32  reserve2         : 1;
48     } sw51;
49 
50     struct {
51         RK_U32  startmb_y        : 8;
52         RK_U32  startmb_x        : 9;
53         RK_U32  apf_threshold    : 14;
54         RK_U32  reserve          : 1;
55     } sw52;
56 
57     struct {
58         RK_U32  sw_dec_mode;
59     } sw53;
60 
61     struct {
62         RK_U32  dec_in_endian    : 1;
63         RK_U32  dec_out_endian   : 1;
64         RK_U32  dec_inswap32_e   : 1;
65         RK_U32  dec_outswap32_e  : 1;
66         RK_U32  dec_strswap32_e  : 1;
67         RK_U32  dec_strendian_e  : 1;
68         RK_U32  reserve3         : 26;
69     } sw54;
70 
71     struct {
72         RK_U32  dec_irq          : 1;
73         RK_U32  dec_irq_dis      : 1;
74         RK_U32  reserve0         : 2;
75         RK_U32  dec_rdy_int      : 1;
76         RK_U32  dec_bus_int      : 1;
77         RK_U32  dec_buffer_int   : 1;
78         RK_U32  reserve1         : 1;
79         RK_U32  dec_aso_int      : 1;
80         RK_U32  dec_slice_int    : 1;
81         RK_U32  dec_pic_inf      : 1;
82         RK_U32  reserve2         : 1;
83         RK_U32  dec_error_int    : 1;
84         RK_U32  dec_timeout      : 1;
85         RK_U32  reserve3         : 18;
86     } sw55;
87 
88     struct {
89         RK_U32  dec_axi_rn_id    : 8;
90         RK_U32  dec_axi_wr_id    : 8;
91         RK_U32  dec_max_burst    : 5;
92         RK_U32  resever          : 1;
93         RK_U32  dec_data_disc_e  : 1;
94         RK_U32  resever1         : 9;
95     } sw56;
96 
97     struct {
98         RK_U32  dec_e            : 1;
99         RK_U32  refbu2_buf_e     : 1;
100         RK_U32  dec_out_dis      : 1;
101         RK_U32  resever          : 1;
102         RK_U32  dec_clk_gate_e   : 1;
103         RK_U32  dec_timeout_e    : 1;
104         RK_U32  picord_count_e   : 1;
105         RK_U32  seq_mbaff_e      : 1;
106         RK_U32  reftopfirst_e    : 1;
107         RK_U32  ref_topfield_e   : 1;
108         RK_U32  write_mvs_e      : 1;
109         RK_U32  sorenson_e       : 1;
110         RK_U32  fwd_interlace_e  : 1;
111         RK_U32  pic_topfield_e   : 1;
112         RK_U32  pic_inter_e      : 1;
113         RK_U32  pic_b_e          : 1;
114         RK_U32  pic_fieldmode_e  : 1;
115         RK_U32  pic_interlace_e  : 1;
116         RK_U32  pjpeg_e          : 1;
117         RK_U32  divx3_e          : 1;
118         RK_U32  rlc_mode_e       : 1;
119         RK_U32  ch_8pix_ileav_e  : 1;
120         RK_U32  start_code_e     : 1;
121         RK_U32  resever1         : 8;
122         RK_U32 dec_ahb_hlock_e   : 1;
123 
124     } sw57;
125 
126     RK_U32                 reserve0[3];
127 
128     struct {
129         RK_U32 slice_table;
130     } sw61;
131 
132     struct {
133         RK_U32 directmv_reg;
134     } sw62;
135 
136     struct {
137         RK_U32 cur_pic_base;
138     } sw63;
139 
140     struct {
141         RK_U32 VLC_base;
142     } sw64;
143 
144     RK_U32                 reserve1[55];
145 
146     struct {
147         RK_U32  ref_frames       : 5;
148         RK_U32  topfieldfirst_e  : 1;
149         RK_U32  alt_scan_e       : 1;
150         RK_U32  mb_height_off    : 4;
151         RK_U32  pic_mb_height_p  : 8;
152         RK_U32  mb_width_off     : 4;
153         RK_U32  pic_mb_width     : 9;
154     } sw120;
155 
156     RK_U32                 reserve2;
157 
158     struct {
159         RK_U32  frame_pred_dct   : 1;
160         RK_U32  intra_vlc_tab    : 1;
161         RK_U32  intra_dc_prec    : 2;
162         RK_U32  con_mv_e         : 1;
163         RK_U32  reserve          : 19;
164         RK_U32  qscale_type      : 1;
165         RK_U32  reserve1         : 1;
166         RK_U32  stream_start_bit : 6;
167     } sw122;
168 
169     RK_U32                 reserve3[8];
170 
171     struct {
172         RK_U32  ref0;
173     } sw131;
174 
175     RK_U32                 reserve4[2];
176 
177     struct {
178         RK_U32 ref2;
179     } sw134;
180 
181     struct {
182         RK_U32 ref3;
183     } sw135;
184 
185     struct {
186         RK_U32  reserve          : 1;
187         RK_U32  mv_accuracy_bwd  : 1;
188         RK_U32  mv_accuracy_fwd  : 1;
189         RK_U32  fcode_bwd_ver    : 4;
190         RK_U32  fcode_bwd_hor    : 4;
191         RK_U32  fcode_fwd_ver    : 4;
192         RK_U32  fcode_fwd_hor    : 4;
193         RK_U32  alt_scan_flag_e  : 1;
194         RK_U32  reserve1         : 12;
195     } sw136;
196 
197     RK_U32                 reserve5[11];
198 
199     struct {
200         RK_U32 ref1;
201 
202     } sw148;
203 
204     RK_U32                 reserve6[10];
205 
206 } M2vdVdpu2Reg;
207 
208 #endif
209