1 /* 2 * Copyright (c) 2021 Rockchip Electronics Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef __RK_VDEC_CMD_H__ 17 #define __RK_VDEC_CMD_H__ 18 19 #include "rk_type.h" 20 21 /* 22 * decoder query interface is only for debug usage 23 */ 24 #define MPP_DEC_QUERY_STATUS (0x00000001) 25 #define MPP_DEC_QUERY_WAIT (0x00000002) 26 #define MPP_DEC_QUERY_FPS (0x00000004) 27 #define MPP_DEC_QUERY_BPS (0x00000008) 28 #define MPP_DEC_QUERY_DEC_IN_PKT (0x00000010) 29 #define MPP_DEC_QUERY_DEC_WORK (0x00000020) 30 #define MPP_DEC_QUERY_DEC_OUT_FRM (0x00000040) 31 32 #define MPP_DEC_QUERY_ALL (MPP_DEC_QUERY_STATUS | \ 33 MPP_DEC_QUERY_WAIT | \ 34 MPP_DEC_QUERY_FPS | \ 35 MPP_DEC_QUERY_BPS | \ 36 MPP_DEC_QUERY_DEC_IN_PKT | \ 37 MPP_DEC_QUERY_DEC_WORK | \ 38 MPP_DEC_QUERY_DEC_OUT_FRM) 39 40 typedef struct MppDecQueryCfg_t { 41 /* 42 * 32 bit query flag for query data check 43 * Each bit represent a query data switch. 44 * bit 0 - for querying decoder runtime status 45 * bit 1 - for querying decoder runtime waiting status 46 * bit 2 - for querying decoder realtime decode fps 47 * bit 3 - for querying decoder realtime input bps 48 * bit 4 - for querying decoder input packet count 49 * bit 5 - for querying decoder start hardware times 50 * bit 6 - for querying decoder output frame count 51 */ 52 RK_U32 query_flag; 53 54 /* 64 bit query data output */ 55 RK_U32 rt_status; 56 RK_U32 rt_wait; 57 RK_U32 rt_fps; 58 RK_U32 rt_bps; 59 RK_U32 dec_in_pkt_cnt; 60 RK_U32 dec_hw_run_cnt; 61 RK_U32 dec_out_frm_cnt; 62 } MppDecQueryCfg; 63 64 #endif /* __RK_VDEC_CMD_H__ */