drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_dbgfs.h

Source file repositories/reference/linux-study-clean/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_dbgfs.h

File Facts

System
Linux kernel
Corpus path
drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_dbgfs.h
Extension
.h
Size
1934 bytes
Lines
75
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct mtk_vcodec_dbgfs_inst {
	struct list_head node;
	struct mtk_vcodec_dec_ctx *vcodec_ctx;
	int inst_id;
};

/**
 * struct mtk_vcodec_dbgfs  - dbgfs information
 * @dbgfs_head:  list head used to link each instance
 * @vcodec_root: vcodec dbgfs entry
 * @dbgfs_lock:  dbgfs lock used to protect dbgfs_buf
 * @dbgfs_buf:   dbgfs buf used to store dbgfs cmd
 * @buf_size:    buffer size of dbgfs
 * @inst_count:  the count of total instance
 */
struct mtk_vcodec_dbgfs {
	struct list_head dbgfs_head;
	struct dentry *vcodec_root;
	struct mutex dbgfs_lock;
	char dbgfs_buf[1024];
	int buf_size;
	int inst_count;
};

#if defined(CONFIG_DEBUG_FS)
void mtk_vcodec_dbgfs_create(struct mtk_vcodec_dec_ctx *ctx);
void mtk_vcodec_dbgfs_remove(struct mtk_vcodec_dec_dev *vcodec_dev, int ctx_id);
void mtk_vcodec_dbgfs_init(void *vcodec_dev, bool is_encode);
void mtk_vcodec_dbgfs_deinit(struct mtk_vcodec_dbgfs *dbgfs);
#else
static inline void mtk_vcodec_dbgfs_create(struct mtk_vcodec_dec_ctx *ctx)
{
}

static inline void mtk_vcodec_dbgfs_remove(struct mtk_vcodec_dec_dev *vcodec_dev, int ctx_id)
{
}

static inline void mtk_vcodec_dbgfs_init(void *vcodec_dev, bool is_encode)
{
}

static inline void mtk_vcodec_dbgfs_deinit(struct mtk_vcodec_dbgfs *dbgfs)
{
}
#endif
#endif

Annotation

Implementation Notes