drivers/media/platform/amd/isp4/isp4_fw_cmd_resp.h

Source file repositories/reference/linux-study-clean/drivers/media/platform/amd/isp4/isp4_fw_cmd_resp.h

File Facts

System
Linux kernel
Corpus path
drivers/media/platform/amd/isp4/isp4_fw_cmd_resp.h
Extension
.h
Size
9882 bytes
Lines
319
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 isp4fw_error_code {
	u32 code1;
	u32 code2;
	u32 code3;
	u32 code4;
	u32 code5;
};

/* Command Structure for FW */

struct isp4fw_cmd {
	u32 cmd_seq_num;
	u32 cmd_id;
	u32 cmd_param[12];
	u16 cmd_stream_id;
	u8 cmd_silent_resp;
	u8 reserved;
	u32 cmd_check_sum;
};

struct isp4fw_resp_cmd_done {
	/*
	 * The host2fw command seqNum.
	 * To indicate which command this response refers to.
	 */
	u32 cmd_seq_num;
	/* The host2fw command id for host double check. */
	u32 cmd_id;
	/*
	 * Indicate the command process status.
	 * 0 means success. 1 means fail. 2 means skipped
	 */
	u16 cmd_status;
	/*
	 * If cmd_status is 1, the command failed. The host can check
	 * isp4fw_error_code for details.
	 */
	u16 isp4fw_error_code;
	/* The response payload type varies by cmd. */
	u8 payload[36];
};

struct isp4fw_resp_param_package {
	u32 package_addr_lo;	/* The low 32 bit of the pkg address. */
	u32 package_addr_hi;	/* The high 32 bit of the pkg address. */
	u32 package_size;	/* The total pkg size in bytes. */
	u32 package_check_sum;	/* The byte sum of the pkg. */
};

struct isp4fw_resp {
	u32 resp_seq_num;
	u32 resp_id;
	union {
		struct isp4fw_resp_cmd_done cmd_done;
		struct isp4fw_resp_param_package frame_done;
		u32 resp_param[12];
	} param;
	u8  reserved[4];
	u32 resp_check_sum;
};

struct isp4fw_mipi_pipe_path_cfg {
	u32 b_enable;
	enum isp4fw_sensor_id isp4fw_sensor_id;
};

struct isp4fw_isp_pipe_path_cfg {
	u32  isp_pipe_id;	/* pipe ids for pipeline construction */
};

struct isp4fw_isp_stream_cfg {
	/* Isp mipi path */
	struct isp4fw_mipi_pipe_path_cfg mipi_pipe_path_cfg;
	/* Isp pipe path */
	struct isp4fw_isp_pipe_path_cfg  isp_pipe_path_cfg;
	/* enable TNR */
	u32 b_enable_tnr;
	/*
	 * Number of frames for RTA processing.
	 * Set to 0 to use the firmware's default value.
	 */
	u32 rta_frames_per_proc;
};

struct isp4fw_image_prop {
	enum isp4fw_image_format image_format;
	u32 width;
	u32 height;
	u32 luma_pitch;
	u32 chroma_pitch;

Annotation

Implementation Notes