drivers/staging/media/meson/vdec/codec_hevc_common.h
Source file repositories/reference/linux-study-clean/drivers/staging/media/meson/vdec/codec_hevc_common.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/media/meson/vdec/codec_hevc_common.h- Extension
.h- Size
- 1918 bytes
- Lines
- 70
- Domain
- Driver Families
- Bucket
- drivers/staging
- 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
vdec.h
Detected Declarations
struct codec_hevc_commonfunction codec_hevc_use_fbcfunction codec_hevc_use_downsamplefunction codec_hevc_use_mmu
Annotated Snippet
struct codec_hevc_common {
void *fbc_buffer_vaddr[MAX_REF_PIC_NUM];
dma_addr_t fbc_buffer_paddr[MAX_REF_PIC_NUM];
void *mmu_header_vaddr[MAX_REF_PIC_NUM];
dma_addr_t mmu_header_paddr[MAX_REF_PIC_NUM];
void *mmu_map_vaddr;
dma_addr_t mmu_map_paddr;
};
/* Returns 1 if we must use framebuffer compression */
static inline int codec_hevc_use_fbc(u32 pixfmt, int is_10bit)
{
/* TOFIX: Handle Amlogic Compressed buffer for 8bit also */
return is_10bit;
}
/* Returns 1 if we are decoding 10-bit but outputting 8-bit NV12 */
static inline int codec_hevc_use_downsample(u32 pixfmt, int is_10bit)
{
return is_10bit;
}
/* Returns 1 if we are decoding using the IOMMU */
static inline int codec_hevc_use_mmu(u32 revision, u32 pixfmt, int is_10bit)
{
return revision >= VDEC_REVISION_G12A &&
codec_hevc_use_fbc(pixfmt, is_10bit);
}
/* Configure decode head read mode */
void codec_hevc_setup_decode_head(struct amvdec_session *sess, int is_10bit);
void codec_hevc_free_fbc_buffers(struct amvdec_session *sess,
struct codec_hevc_common *comm);
void codec_hevc_free_mmu_headers(struct amvdec_session *sess,
struct codec_hevc_common *comm);
int codec_hevc_setup_buffers(struct amvdec_session *sess,
struct codec_hevc_common *comm,
int is_10bit);
void codec_hevc_fill_mmu_map(struct amvdec_session *sess,
struct codec_hevc_common *comm,
struct vb2_buffer *vb);
#endif
Annotation
- Immediate include surface: `vdec.h`.
- Detected declarations: `struct codec_hevc_common`, `function codec_hevc_use_fbc`, `function codec_hevc_use_downsample`, `function codec_hevc_use_mmu`.
- Atlas domain: Driver Families / drivers/staging.
- 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.