/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (c) 2023 MediaTek Inc. * Author: Yunfei Dong <[email protected]> */ #ifndef _MTK_VCODEC_COM_DRV_H_ #define _MTK_VCODEC_COM_DRV_H_ #include <linux/platform_device.h> #include <linux/videodev2.h> #include <media/v4l2-ctrls.h> #include <media/v4l2-device.h> #include <media/v4l2-ioctl.h> #include <media/v4l2-mem2mem.h> #include <media/videobuf2-core.h> #define MTK_VCODEC_MAX_PLANES … #define WAIT_INTR_TIMEOUT_MS … /* * enum mtk_q_type - Type of queue */ enum mtk_q_type { … }; /* * enum mtk_hw_reg_idx - MTK hw register base index */ enum mtk_hw_reg_idx { … }; /* * struct mtk_vcodec_clk_info - Structure used to store clock name */ struct mtk_vcodec_clk_info { … }; /* * struct mtk_vcodec_clk - Structure used to store vcodec clock information */ struct mtk_vcodec_clk { … }; /* * struct mtk_vcodec_pm - Power management data structure */ struct mtk_vcodec_pm { … }; /* * enum mtk_vdec_hw_id - Hardware index used to separate * different hardware */ enum mtk_vdec_hw_id { … }; /** * enum mtk_instance_state - The state of an MTK Vcodec instance. * @MTK_STATE_FREE: default state when instance is created * @MTK_STATE_INIT: vcodec instance is initialized * @MTK_STATE_HEADER: vdec had sps/pps header parsed or venc * had sps/pps header encoded * @MTK_STATE_FLUSH: vdec is flushing. Only used by decoder * @MTK_STATE_ABORT: vcodec should be aborted */ enum mtk_instance_state { … }; enum mtk_fmt_type { … }; /* * struct mtk_video_fmt - Structure used to store information about pixelformats */ struct mtk_video_fmt { … }; /* * struct mtk_q_data - Structure used to store information about queue */ struct mtk_q_data { … }; /* * enum mtk_instance_type - The type of an MTK Vcodec instance. */ enum mtk_instance_type { … }; #endif /* _MTK_VCODEC_COM_DRV_H_ */