FILE
vpu_v4l2.h
File preview with syntax highlighting.
linux-6.19.14/drivers/media/platform/amphion/vpu_v4l2.h
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Copyright 2020-2021 NXP 4 */ 5 6#ifndef _AMPHION_VPU_V4L2_H 7#define _AMPHION_VPU_V4L2_H 8 9#include <linux/videodev2.h> 10 11void vpu_inst_lock(struct vpu_inst *inst); 12void vpu_inst_unlock(struct vpu_inst *inst); 13void vpu_set_buffer_state(struct vb2_v4l2_buffer *vbuf, unsigned int state); 14unsigned int vpu_get_buffer_state(struct vb2_v4l2_buffer *vbuf); 15void vpu_set_buffer_average_qp(struct vb2_v4l2_buffer *vbuf, u32 qp); 16 17int vpu_v4l2_open(struct file *file, struct vpu_inst *inst); 18int vpu_v4l2_close(struct file *file); 19 20u32 vpu_get_fmt_plane_size(struct vpu_format *fmt, u32 plane_no); 21int vpu_try_fmt_common(struct vpu_inst *inst, struct v4l2_format *f, struct vpu_format *fmt); 22int vpu_process_output_buffer(struct vpu_inst *inst); 23int vpu_process_capture_buffer(struct vpu_inst *inst); 24struct vb2_v4l2_buffer *vpu_next_src_buf(struct vpu_inst *inst); 25void vpu_skip_frame(struct vpu_inst *inst, int count); 26struct vb2_v4l2_buffer *vpu_find_buf_by_sequence(struct vpu_inst *inst, u32 type, u32 sequence); 27struct vb2_v4l2_buffer *vpu_find_buf_by_idx(struct vpu_inst *inst, u32 type, u32 idx); 28void vpu_v4l2_set_error(struct vpu_inst *inst); 29int vpu_notify_source_change(struct vpu_inst *inst); 30int vpu_set_last_buffer_dequeued(struct vpu_inst *inst, bool eos); 31int vpu_get_num_buffers(struct vpu_inst *inst, u32 type); 32bool vpu_is_source_empty(struct vpu_inst *inst); 33 34dma_addr_t vpu_get_vb_phy_addr(struct vb2_buffer *vb, u32 plane_no); 35static inline struct vpu_format *vpu_get_format(struct vpu_inst *inst, u32 type) 36{ 37 if (V4L2_TYPE_IS_OUTPUT(type)) 38 return &inst->out_format; 39 else 40 return &inst->cap_format; 41} 42#endif
~/
Read-only file preview.