drivers/media/platform/nvidia/tegra-vde/vde.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/nvidia/tegra-vde/vde.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/nvidia/tegra-vde/vde.h- Extension
.h- Size
- 6057 bytes
- Lines
- 243
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/completion.hlinux/dma-direction.hlinux/iova.hlinux/list.hlinux/mutex.hlinux/types.hlinux/workqueue.hmedia/media-device.hmedia/videobuf2-dma-contig.hmedia/videobuf2-dma-sg.hmedia/v4l2-ctrls.hmedia/v4l2-device.hmedia/v4l2-event.hmedia/v4l2-ioctl.hmedia/v4l2-mem2mem.h
Detected Declarations
struct clkstruct dma_bufstruct gen_poolstruct tegra_ctxstruct iommu_groupstruct iommu_domainstruct reset_controlstruct dma_buf_attachmentstruct tegra_vde_h264_decoder_ctxstruct tegra_video_framestruct tegra_coded_fmt_descstruct tegra_vde_socstruct tegra_vde_bostruct tegra_vdestruct tegra_ctx_h264struct tegra_ctxstruct tegra_m2m_bufferfunction vb_to_tegra_buffunction tegra_vde_reg_base_name
Annotated Snippet
struct tegra_video_frame {
struct dma_buf_attachment *y_dmabuf_attachment;
struct dma_buf_attachment *cb_dmabuf_attachment;
struct dma_buf_attachment *cr_dmabuf_attachment;
struct dma_buf_attachment *aux_dmabuf_attachment;
dma_addr_t y_addr;
dma_addr_t cb_addr;
dma_addr_t cr_addr;
dma_addr_t aux_addr;
u32 frame_num;
u32 flags;
u32 luma_atoms_pitch;
u32 chroma_atoms_pitch;
};
struct tegra_coded_fmt_desc {
u32 fourcc;
struct v4l2_frmsize_stepwise frmsize;
unsigned int num_decoded_fmts;
const u32 *decoded_fmts;
int (*decode_run)(struct tegra_ctx *ctx);
int (*decode_wait)(struct tegra_ctx *ctx);
};
struct tegra_vde_soc {
bool supports_ref_pic_marking;
const struct tegra_coded_fmt_desc *coded_fmts;
u32 num_coded_fmts;
};
struct tegra_vde_bo {
struct iova *iova;
struct sg_table sgt;
struct tegra_vde *vde;
enum dma_data_direction dma_dir;
unsigned long dma_attrs;
dma_addr_t dma_handle;
dma_addr_t dma_addr;
void *dma_cookie;
size_t size;
};
struct tegra_vde {
void __iomem *sxe;
void __iomem *bsev;
void __iomem *mbe;
void __iomem *ppe;
void __iomem *mce;
void __iomem *tfe;
void __iomem *ppb;
void __iomem *vdma;
void __iomem *frameid;
struct device *dev;
struct mutex lock;
struct mutex map_lock;
struct list_head map_list;
struct reset_control *rst;
struct reset_control *rst_mc;
struct tegra_pmc *pmc;
struct gen_pool *iram_pool;
struct completion decode_completion;
struct clk *clk;
struct iommu_domain *domain;
struct iommu_group *group;
struct iova_domain iova;
struct iova *iova_resv_static_addresses;
struct iova *iova_resv_last_page;
const struct tegra_vde_soc *soc;
struct tegra_vde_bo *secure_bo;
dma_addr_t bitstream_data_addr;
dma_addr_t iram_lists_addr;
u32 *iram;
struct v4l2_device v4l2_dev;
struct v4l2_m2m_dev *m2m;
struct media_device mdev;
struct video_device vdev;
struct mutex v4l2_lock;
struct workqueue_struct *wq;
struct tegra_video_frame frames[V4L2_H264_NUM_DPB_ENTRIES + 1];
};
int tegra_vde_alloc_bo(struct tegra_vde *vde,
struct tegra_vde_bo **ret_bo,
enum dma_data_direction dma_dir,
size_t size);
void tegra_vde_free_bo(struct tegra_vde_bo *bo);
struct tegra_ctx_h264 {
const struct v4l2_ctrl_h264_decode_params *decode_params;
const struct v4l2_ctrl_h264_sps *sps;
Annotation
- Immediate include surface: `linux/completion.h`, `linux/dma-direction.h`, `linux/iova.h`, `linux/list.h`, `linux/mutex.h`, `linux/types.h`, `linux/workqueue.h`, `media/media-device.h`.
- Detected declarations: `struct clk`, `struct dma_buf`, `struct gen_pool`, `struct tegra_ctx`, `struct iommu_group`, `struct iommu_domain`, `struct reset_control`, `struct dma_buf_attachment`, `struct tegra_vde_h264_decoder_ctx`, `struct tegra_video_frame`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
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.