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.
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/acpi.hlinux/completion.hlinux/delay.hlinux/kernel.hlinux/mei_cl_bus.hlinux/module.hlinux/mutex.hlinux/pm_runtime.hlinux/slab.hlinux/uuid.hlinux/workqueue.h
Detected Declarations
struct ace_cmd_hdrstruct ace_cmdstruct _confirmstruct _eventstruct _responsestruct ace_notifstruct mei_aceenum ace_event_typeenum ace_camera_ownerenum ace_cmd_idfunction init_cmd_hdrfunction construct_commandfunction mei_ace_sendfunction ace_set_camera_ownerfunction ace_get_firmware_idfunction handle_command_responsefunction handle_command_ackfunction mei_ace_rxfunction mei_ace_setup_dev_linkfunction mei_ace_post_probe_workfunction mei_ace_probefunction mei_ace_removefunction mei_ace_runtime_suspendfunction mei_ace_runtime_resume
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
- Immediate include surface: `linux/acpi.h`, `linux/completion.h`, `linux/delay.h`, `linux/kernel.h`, `linux/mei_cl_bus.h`, `linux/module.h`, `linux/mutex.h`, `linux/pm_runtime.h`.
- Detected declarations: `struct ace_cmd_hdr`, `struct ace_cmd`, `struct _confirm`, `struct _event`, `struct _response`, `struct ace_notif`, `struct mei_ace`, `enum ace_event_type`, `enum ace_camera_owner`, `enum ace_cmd_id`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.