drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.h

Source file repositories/reference/linux-study-clean/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.h

File Facts

System
Linux kernel
Corpus path
drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.h
Extension
.h
Size
4778 bytes
Lines
126
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 iris_hfi_header {
	u32 size;
	u32 session_id;
	u32 header_id;
	u32 reserved[4];
	u32 num_packets;
};

/**
 * struct iris_hfi_packet
 *
 * @size: size of the hfi_packet in bytes including payload
 * @type: one of the below hfi_packet types:
 *        HFI_CMD_*,
 *        HFI_PROP_*,
 *        HFI_ERROR_*,
 *        HFI_INFO_*,
 *        HFI_SYS_ERROR_*
 * @flags: hfi_packet flags. It is represented as bit masks.
 *         host packet flags are "enum hfi_packet_host_flags"
 *         firmware packet flags are "enum hfi_packet_firmware_flags"
 * @payload_info: payload information indicated by "enum hfi_packet_payload_info"
 * @port: hfi_packet port type indicated by "enum hfi_packet_port_type"
 *        This is bitmask and may be applicable to multiple ports.
 * @packet_id: host hfi_packet contains unique packet id.
 *             firmware returns host packet id in response packet
 *             wherever applicable. If not applicable firmware sets it to zero.
 * @reserved: reserved for future use.
 * @payload: flexible array of payload having additional packet information.
 */
struct iris_hfi_packet {
	u32 size;
	u32 type;
	u32 flags;
	u32 payload_info;
	u32 port;
	u32 packet_id;
	u32 reserved[2];
	u32 payload[];
};

/**
 * struct iris_hfi_buffer
 *
 * @type: buffer type indicated by "enum hfi_buffer_type"
 *        FW needs to return proper type for any buffer command.
 * @index: index of the buffer
 * @base_address: base address of the buffer.
 *                This buffer address is always 4KBytes aligned.
 * @addr_offset: accessible buffer offset from base address
 *               Decoder bitstream buffer: 256 Bytes aligned
 *               Firmware can uniquely identify a buffer based on
 *               base_address & addr_offset.
 *               HW can read memory only from base_address+addr_offset.
 * @buffer_size: accessible buffer size in bytes starting from addr_offset
 * @data_offset: data starts from "base_address + addr_offset + data_offset"
 *               RAW buffer: data_offset is 0. Restriction: 4KBytes aligned
 *               decoder bitstream buffer: no restriction (can be any value)
 * @data_size: data size in bytes
 * @flags: buffer flags. It is represented as bit masks.
 *         host buffer flags are "enum hfi_buffer_host_flags"
 *         firmware buffer flags are "enum hfi_buffer_firmware_flags"
 * @timestamp: timestamp of the buffer in nano seconds (ns)
 *             It is Presentation timestamp (PTS) for encoder & decoder.
 *             Decoder: it is pass through from bitstream to raw buffer.
 *                      firmware does not need to return as part of input buffer done.
 *             For any internal buffers: there is no timestamp. Host sets as 0.
 * @reserved: reserved for future use
 */
struct iris_hfi_buffer {
	u32 type;
	u32 index;
	u64 base_address;
	u32 addr_offset;
	u32 buffer_size;
	u32 data_offset;
	u32 data_size;
	u64 timestamp;
	u32 flags;
	u32 reserved[5];
};

u32 iris_hfi_gen2_get_color_primaries(u32 primaries);
u32 iris_hfi_gen2_get_transfer_char(u32 characterstics);
u32 iris_hfi_gen2_get_matrix_coefficients(u32 coefficients);
u32 iris_hfi_gen2_get_color_info(u32 matrix_coeff, u32 transfer_char, u32 primaries,
				 u32 colour_description_present_flag, u32 full_range,
				 u32 video_format, u32 video_signal_type_present_flag);

void iris_hfi_gen2_packet_sys_init(struct iris_core *core, struct iris_hfi_header *hdr);

Annotation

Implementation Notes