drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h- Extension
.h- Size
- 3692 bytes
- Lines
- 154
- Domain
- Driver Families
- Bucket
- drivers/media
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
media/v4l2-device.hmedia/v4l2-mem2mem.hlinux/soc/mediatek/mtk-mmsys.hlinux/soc/mediatek/mtk-mutex.hmtk-mdp3-comp.hmtk-mdp3-vpu.h
Detected Declarations
struct mdp_platform_configstruct mtk_mdp_driver_datastruct mdp_mm_subsysstruct mdp_devstruct mdp_pipe_infoenum mdp_infra_idenum mdp_mm_subsys_idenum mdp_buffer_usageenum mdp_pipe_id
Annotated Snippet
struct mdp_platform_config {
bool rdma_support_10bit;
bool rdma_rsz1_sram_sharing;
bool rdma_upsample_repeat_only;
bool rdma_esl_setting;
u32 rdma_event_num;
bool rsz_disable_dcm_small_sample;
bool rsz_etc_control;
bool wrot_filter_constraint;
bool wrot_support_10bit;
u32 wrot_event_num;
u32 tdshp_hist_num;
bool tdshp_constrain;
bool tdshp_contour;
};
/* indicate which mutex is used by each pipepline */
enum mdp_pipe_id {
MDP_PIPE_WPEI,
MDP_PIPE_WPEI2,
MDP_PIPE_IMGI,
MDP_PIPE_RDMA0,
MDP_PIPE_RDMA1,
MDP_PIPE_RDMA2,
MDP_PIPE_RDMA3,
MDP_PIPE_SPLIT,
MDP_PIPE_SPLIT2,
MDP_PIPE_VPP0_SOUT,
MDP_PIPE_VPP1_SOUT,
MDP_PIPE_MAX
};
/* MDP parallel pipe control */
enum {
MDP_PP_USED_1 = 1,
MDP_PP_USED_2 = 2,
};
#define MDP_PP_MAX MDP_PP_USED_2
struct mtk_mdp_driver_data {
const int mdp_plat_id;
const resource_size_t mdp_con_res;
const struct of_device_id *mdp_probe_infra;
const struct mdp_platform_config *mdp_cfg;
const u32 *mdp_mutex_table_idx;
const struct mdp_comp_data *comp_data;
unsigned int comp_data_len;
const struct of_device_id *mdp_sub_comp_dt_ids;
const struct mdp_format *format;
unsigned int format_len;
const struct mdp_limit *def_limit;
const struct mdp_pipe_info *pipe_info;
unsigned int pipe_info_len;
const struct v4l2_rect *pp_criteria;
const u8 pp_used;
};
struct mdp_mm_subsys {
struct device *mmsys;
struct device *mutex;
struct mtk_mutex *mdp_mutex[MDP_PIPE_MAX];
};
struct mdp_dev {
struct platform_device *pdev;
struct mdp_mm_subsys mm_subsys[MDP_MM_SUBSYS_MAX];
struct mdp_comp *comp[MDP_MAX_COMP_COUNT];
const struct mtk_mdp_driver_data *mdp_data;
struct workqueue_struct *job_wq;
struct workqueue_struct *clock_wq;
struct mdp_vpu_dev vpu;
struct mtk_scp *scp;
struct rproc *rproc_handle;
/* synchronization protect for accessing vpu working buffer info */
struct mutex vpu_lock;
s32 vpu_count;
u32 id_count;
struct ida mdp_ida;
struct cmdq_client *cmdq_clt[MDP_PP_MAX];
u8 cmdq_shift_pa[MDP_PP_MAX];
wait_queue_head_t callback_wq;
struct v4l2_device v4l2_dev;
struct video_device *m2m_vdev;
struct v4l2_m2m_dev *m2m_dev;
/* synchronization protect for m2m device operation */
struct mutex m2m_lock;
atomic_t suspended;
Annotation
- Immediate include surface: `media/v4l2-device.h`, `media/v4l2-mem2mem.h`, `linux/soc/mediatek/mtk-mmsys.h`, `linux/soc/mediatek/mtk-mutex.h`, `mtk-mdp3-comp.h`, `mtk-mdp3-vpu.h`.
- Detected declarations: `struct mdp_platform_config`, `struct mtk_mdp_driver_data`, `struct mdp_mm_subsys`, `struct mdp_dev`, `struct mdp_pipe_info`, `enum mdp_infra_id`, `enum mdp_mm_subsys_id`, `enum mdp_buffer_usage`, `enum mdp_pipe_id`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.