drivers/media/pci/intel/ivsc/mei_ace.c

Source file repositories/reference/linux-study-clean/drivers/media/pci/intel/ivsc/mei_ace.c

File Facts

System
Linux kernel
Corpus path
drivers/media/pci/intel/ivsc/mei_ace.c
Extension
.c
Size
12718 bytes
Lines
583
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 ace_cmd_hdr {
	u32 firmware_id : 16;
	u32 instance_id : 8;
	u32 type : 5;
	u32 rsp : 1;
	u32 msg_tgt : 1;
	u32 _hw_rsvd_1 : 1;
	u32 param_size : 20;
	u32 cmd_id : 8;
	u32 final_block : 1;
	u32 init_block : 1;
	u32 _hw_rsvd_2 : 2;
} __packed;

/* ACE command parameter structure */
union ace_cmd_param {
	uuid_le uuid;
	u32 param;
};

/* ACE command structure */
struct ace_cmd {
	struct ace_cmd_hdr hdr;
	union ace_cmd_param param;
} __packed;

/* ACE notification header */
union ace_notif_hdr {
	struct _confirm {
		u32 status : 24;
		u32 type : 5;
		u32 rsp : 1;
		u32 msg_tgt : 1;
		u32 _hw_rsvd_1 : 1;
		u32 param_size : 20;
		u32 cmd_id : 8;
		u32 final_block : 1;
		u32 init_block : 1;
		u32 _hw_rsvd_2 : 2;
	} __packed ack;

	struct _event {
		u32 rsvd1 : 16;
		u32 event_type : 8;
		u32 type : 5;
		u32 ack : 1;
		u32 msg_tgt : 1;
		u32 _hw_rsvd_1 : 1;
		u32 rsvd2 : 30;
		u32 _hw_rsvd_2 : 2;
	} __packed event;

	struct _response {
		u32 event_id : 16;
		u32 notif_type : 8;
		u32 type : 5;
		u32 rsp : 1;
		u32 msg_tgt : 1;
		u32 _hw_rsvd_1 : 1;
		u32 event_data_size : 16;
		u32 request_target : 1;
		u32 request_type : 5;
		u32 cmd_id : 8;
		u32 _hw_rsvd_2 : 2;
	} __packed response;
};

/* ACE notification content */
union ace_notif_cont {
	u16 firmware_id;
	u8 state_notif;
	u8 camera_status[ACE_CAMERA_STATUS_SIZE];
};

/* ACE notification structure */
struct ace_notif {
	union ace_notif_hdr hdr;
	union ace_notif_cont cont;
} __packed;

struct mei_ace {
	struct mei_cl_device *cldev;

	/* command ack */
	struct ace_notif cmd_ack;
	/* command response */
	struct ace_notif cmd_response;
	/* used to wait for command ack and response */
	struct completion cmd_completion;
	/* lock used to prevent multiple call to send command */

Annotation

Implementation Notes