xref: /rockchip-linux_mpp/mpp/hal/vpu/m2vd/hal_m2vd_vdpu1_reg.h (revision 437bfbeb9567cca9cd9080e3f6954aa9d6a94f18)
1 /*
2  * Copyright 2018 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_VDPU1_REG_H__
18 #define __HAL_M2VD_VDPU1_REG_H__
19 
20 #include "rk_type.h"
21 
22 #define M2VD_VDPU1_REG_NUM    (101)
23 
24 typedef struct {
25     struct {
26         RK_U32  build_version       : 3;
27         RK_U32  product_IDen        : 1;
28         RK_U32  minor_version       : 8;
29         RK_U32  major_version       : 4;
30         RK_U32  product_numer       : 16;
31     } sw00;
32 
33     struct {
34         RK_U32  dec_e            : 1;
35         RK_U32  reserve0         : 3;
36         RK_U32  dec_irq_dis      : 1;
37         RK_U32  reserve1         : 3;
38         RK_U32  dec_irq          : 1;
39         RK_U32  reserve2         : 3;
40         RK_U32  dec_rdy_int      : 1;
41         RK_U32  dec_bus_int      : 1;
42         RK_U32  dec_buffer_int   : 1;
43         RK_U32  dec_aso_int      : 1;
44         RK_U32  dec_error_int    : 1;
45         RK_U32  dec_slice_int    : 1;
46         RK_U32  dec_timeout      : 1;
47         RK_U32  reserve3         : 5;
48         RK_U32  dec_pic_inf      : 1;
49         RK_U32  reserve4         : 7;
50     } sw01;
51 
52     struct {
53         RK_U32  dec_max_burst    : 5;
54         RK_U32  dec_scmd_dis     : 1;
55         RK_U32  dec_adv_pre_dis  : 1;
56         RK_U32  priority_mode    : 1;  //chang
57         RK_U32  dec_out_endian   : 1;
58         RK_U32  dec_in_endian    : 1;
59         RK_U32  dec_clk_gate_e   : 1;
60         RK_U32  dec_latency      : 6;
61         RK_U32  dec_out_tiled_e  : 1;
62         RK_U32  dec_data_disc_e  : 1;
63         RK_U32  dec_outswap32_e  : 1;
64         RK_U32  dec_inswap32_e   : 1;
65         RK_U32  dec_strendian_e  : 1;
66         RK_U32  dec_strswap32_e  : 1;
67         RK_U32  dec_timeout_e    : 1;
68         RK_U32  dec_axi_rn_id    : 8;
69     } sw02;
70 
71     struct {
72         RK_U32  dec_axi_wr_id    : 8;
73         RK_U32  dec_ahb_hlock_e  : 1;
74         RK_U32  picord_count_e   : 1;
75         RK_U32  seq_mbaff_e      : 1;
76         RK_U32  reftopfirst_e    : 1;
77         RK_U32  write_mvs_e      : 1;
78         RK_U32  pic_fixed_quant  : 1;
79         RK_U32  filtering_dis    : 1;
80         RK_U32  dec_out_dis      : 1;
81         RK_U32  ref_topfield_e   : 1;
82         RK_U32  sorenson_e       : 1;
83         RK_U32  fwd_interlace_e  : 1;
84         RK_U32  pic_topfield_e   : 1;
85         RK_U32  pic_inter_e      : 1;
86         RK_U32  pic_b_e          : 1;
87         RK_U32  pic_fieldmode_e  : 1;
88         RK_U32  pic_interlace_e  : 1;
89         RK_U32  pjpeg_e          : 1;
90         RK_U32  divx3_e          : 1;
91         RK_U32  skip_mode        : 1;
92         RK_U32  rlc_mode_e       : 1;
93         RK_U32  dec_mode         : 4;
94     } sw03;
95 
96     struct {
97         RK_U32  ref_frames       : 5;
98         RK_U32  topfieldfirst_e  : 1;
99         RK_U32  alt_scan_e       : 1;
100         RK_U32  mb_height_off    : 4;
101         RK_U32  pic_mb_height_p  : 8;
102         RK_U32  mb_width_off     : 4;
103         RK_U32  pic_mb_width     : 9;
104     } sw04;
105 
106     struct {
107         RK_U32  frame_pred_dct   : 1;
108         RK_U32  intra_vlc_tab    : 1;
109         RK_U32  intra_dc_prec    : 2;
110         RK_U32  con_mv_e         : 1;
111         RK_U32  reserve          : 19;
112         RK_U32  qscale_type      : 1;
113         RK_U32  reserve1         : 1;
114         RK_U32  stream_start_bit : 6;
115     } sw05;
116 
117     struct {
118         RK_U32  stream_len       : 24;
119         RK_U32  ch_8pix_ileav_e  : 1;
120         RK_U32  init_qp          : 6;
121         RK_U32  start_code_e     : 1;
122     } sw06;
123 
124     RK_U32 Reg07_11[5];
125 
126     struct {
127         RK_U32 rlc_vlc_base      : 32;
128     } sw12;
129 
130     struct {
131         RK_U32 dec_out_base      : 32;
132     } sw13;
133 
134     struct {
135         RK_U32 refer0_base       : 32;
136     } sw14;
137 
138     struct {
139         RK_U32 refer1_base       : 32;
140     } sw15;
141 
142     struct {
143         RK_U32 refer2_base       : 32;
144     } sw16;
145 
146     struct {
147         RK_U32 refer3_base       : 32;
148     } sw17;
149 
150     struct {
151         RK_U32  reserve          : 1;
152         RK_U32  mv_accuracy_bwd  : 1;
153         RK_U32  mv_accuracy_fwd  : 1;
154         RK_U32  fcode_bwd_ver    : 4;
155         RK_U32  fcode_bwd_hor    : 4;
156         RK_U32  fcode_fwd_ver    : 4;
157         RK_U32  fcode_fwd_hor    : 4;
158         RK_U32  alt_scan_flag_e  : 1;
159         RK_U32  reserve1         : 12;
160     } sw18;
161 
162     RK_U32 sw19_39[21];
163 
164     struct {
165         RK_U32 qtable_base       : 32;
166     } sw40;
167 
168     struct {
169         RK_U32 dir_mv_base       : 32;
170     } sw41;
171 
172     RK_U32 sw42_47[6];
173 
174     struct {
175         RK_U32  reserve          : 15;
176         RK_U32  startmb_y        : 8;
177         RK_U32  startmb_x        : 9;
178     } sw48;
179 
180     RK_U32 sw49_50[2];
181 
182     struct {
183         RK_U32 refbu_y_offset    : 9;
184         RK_U32 reserve0          : 3;
185         RK_U32 refbu_fparmod_e   : 1;
186         RK_U32 refbu_eval_e      : 1;
187         RK_U32 refbu_picid       : 5;
188         RK_U32 refbu_thr         : 12;
189         RK_U32 refbu_e           : 1;
190     } sw51;
191 
192     struct {
193         RK_U32  refbu_intra_sum  : 16;
194         RK_U32  refbu_hit_sum    : 16;
195     } sw52;
196 
197     RK_U32 sw53_54[2];
198 
199     struct {
200         RK_U32  apf_threshold    : 14;
201         RK_U32  refbu2_picid     : 5;
202         RK_U32  refbu2_thr       : 12;
203         RK_U32  refbu2_buf_e     : 1;
204     } sw55;
205 
206     RK_U32 sw56_100[45];
207 
208 } M2vdVdpu1Reg_t;
209 
210 #endif // __HAL_M2VD_VDPU1_REG_H__
211