drivers/staging/media/ipu7/abi/ipu7_fw_common_abi.h

Source file repositories/reference/linux-study-clean/drivers/staging/media/ipu7/abi/ipu7_fw_common_abi.h

File Facts

System
Linux kernel
Corpus path
drivers/staging/media/ipu7/abi/ipu7_fw_common_abi.h
Extension
.h
Size
4220 bytes
Lines
176
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct ia_gofo_version_s {
	u8 patch;
	u8 subminor;
	u8 minor;
	u8 major;
};

#define IA_GOFO_MSG_VERSION_INIT(major_val, minor_val, subminor_val, patch_val)\
	{.major = (major_val), .minor = (minor_val), .subminor = \
	(subminor_val), .patch = (patch_val)}

#define IA_GOFO_MSG_VERSION_LIST_MAX_ENTRIES	(3U)
#define IA_GOFO_MSG_RESERVED_SIZE		(3U)

struct ia_gofo_msg_version_list {
	u8 num_versions;
	u8 reserved[IA_GOFO_MSG_RESERVED_SIZE];
	struct ia_gofo_version_s versions[IA_GOFO_MSG_VERSION_LIST_MAX_ENTRIES];
};

#pragma pack(pop)

#define TLV_TYPE_PADDING		(0U)

#pragma pack(push, 1)

#define IA_GOFO_ABI_BITS_PER_BYTE	(8U)

struct ia_gofo_tlv_header {
	u16 tlv_type;
	u16 tlv_len32;
};

struct ia_gofo_tlv_list {
	u16 num_elems;
	u16 head_offset;
};

#define TLV_ITEM_ALIGNMENT	((u32)sizeof(u32))
#define TLV_MSG_ALIGNMENT	((u32)sizeof(u64))
#define TLV_LIST_ALIGNMENT	TLV_ITEM_ALIGNMENT
#pragma pack(pop)

#define IA_GOFO_MODULO(dividend, divisor) ((dividend) % (divisor))

#define IA_GOFO_MSG_ERR_MAX_DETAILS		(4U)
#define IA_GOFO_MSG_ERR_OK			(0U)
#define IA_GOFO_MSG_ERR_UNSPECIFED		(0xffffffff)
#define IA_GOFO_MSG_ERR_GROUP_UNSPECIFIED	(0U)
#define IA_GOFO_MSG_ERR_IS_OK(err)	(IA_GOFO_MSG_ERR_OK == (err).err_code)

#pragma pack(push, 1)
struct ia_gofo_msg_err {
	u32 err_group;
	u32 err_code;
	u32 err_detail[IA_GOFO_MSG_ERR_MAX_DETAILS];
};

#pragma pack(pop)

#define IA_GOFO_MSG_ERR_GROUP_APP_EXT_START	(16U)
#define IA_GOFO_MSG_ERR_GROUP_MAX		(31U)
#define IA_GOFO_MSG_ERR_GROUP_INTERNAL_START	(IA_GOFO_MSG_ERR_GROUP_MAX + 1U)
#define IA_GOFO_MSG_ERR_GROUP_RESERVED	IA_GOFO_MSG_ERR_GROUP_UNSPECIFIED
#define IA_GOFO_MSG_ERR_GROUP_GENERAL		1

enum ia_gofo_msg_err_general {
	IA_GOFO_MSG_ERR_GENERAL_OK = IA_GOFO_MSG_ERR_OK,
	IA_GOFO_MSG_ERR_GENERAL_MSG_TOO_SMALL = 1,
	IA_GOFO_MSG_ERR_GENERAL_MSG_TOO_LARGE = 2,
	IA_GOFO_MSG_ERR_GENERAL_DEVICE_STATE = 3,
	IA_GOFO_MSG_ERR_GENERAL_ALIGNMENT = 4,
	IA_GOFO_MSG_ERR_GENERAL_INDIRECT_REF_PTR_INVALID = 5,
	IA_GOFO_MSG_ERR_GENERAL_INVALID_MSG_TYPE = 6,
	IA_GOFO_MSG_ERR_GENERAL_SYSCOM_FAIL = 7,
	IA_GOFO_MSG_ERR_GENERAL_N
};

#pragma pack(push, 1)
#define IA_GOFO_MSG_TYPE_RESERVED	0
#define IA_GOFO_MSG_TYPE_INDIRECT	1
#define IA_GOFO_MSG_TYPE_LOG		2
#define IA_GOFO_MSG_TYPE_GENERAL_ERR	3

struct ia_gofo_msg_header {
	struct ia_gofo_tlv_header tlv_header;
	struct ia_gofo_tlv_list msg_options;
	u64 user_token;
};

Annotation

Implementation Notes