drivers/staging/media/ipu3/include/uapi/intel-ipu3.h

Source file repositories/reference/linux-study-clean/drivers/staging/media/ipu3/include/uapi/intel-ipu3.h

File Facts

System
Linux kernel
Corpus path
drivers/staging/media/ipu3/include/uapi/intel-ipu3.h
Extension
.h
Size
90757 bytes
Lines
2821
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 ipu3_uapi_grid_config {
	__u8 width;
	__u8 height;
	__u16 block_width_log2:3;
	__u16 block_height_log2:3;
	__u16 height_per_slice:8;
	__u16 x_start;
	__u16 y_start;
	__u16 x_end;
	__u16 y_end;
} __packed;

/**
 * struct ipu3_uapi_awb_set_item - Memory layout for each cell in AWB
 *
 * @Gr_avg:	Green average for red lines in the cell.
 * @R_avg:	Red average in the cell.
 * @B_avg:	Blue average in the cell.
 * @Gb_avg:	Green average for blue lines in the cell.
 * @sat_ratio:  Percentage of pixels over the thresholds specified in
 *		ipu3_uapi_awb_config_s, coded from 0 to 255.
 * @padding0:   Unused byte for padding.
 * @padding1:   Unused byte for padding.
 * @padding2:   Unused byte for padding.
 */
struct ipu3_uapi_awb_set_item {
	__u8 Gr_avg;
	__u8 R_avg;
	__u8 B_avg;
	__u8 Gb_avg;
	__u8 sat_ratio;
	__u8 padding0;
	__u8 padding1;
	__u8 padding2;
} __attribute__((packed));

/*
 * The grid based data is divided into "slices" called set, each slice of setX
 * refers to ipu3_uapi_grid_config width * height_per_slice.
 */
#define IPU3_UAPI_AWB_MAX_SETS				60
/* Based on grid size 80 * 60 and cell size 16 x 16 */
#define IPU3_UAPI_AWB_SET_SIZE				160
#define IPU3_UAPI_AWB_SPARE_FOR_BUBBLES \
	(IPU3_UAPI_MAX_BUBBLE_SIZE * IPU3_UAPI_MAX_STRIPES)
#define IPU3_UAPI_AWB_MAX_BUFFER_SIZE \
	(IPU3_UAPI_AWB_MAX_SETS * \
	 (IPU3_UAPI_AWB_SET_SIZE + IPU3_UAPI_AWB_SPARE_FOR_BUBBLES))

/**
 * struct ipu3_uapi_awb_raw_buffer - AWB raw buffer
 *
 * @meta_data: buffer to hold auto white balance meta data which is
 *		the average values for each color channel.
 */
struct ipu3_uapi_awb_raw_buffer {
	struct ipu3_uapi_awb_set_item meta_data[IPU3_UAPI_AWB_MAX_BUFFER_SIZE]
		__attribute__((aligned(32)));
} __packed;

/**
 * struct ipu3_uapi_awb_config_s - AWB config
 *
 * @rgbs_thr_gr: gr threshold value.
 * @rgbs_thr_r: Red threshold value.
 * @rgbs_thr_gb: gb threshold value.
 * @rgbs_thr_b: Blue threshold value.
 * @grid: &ipu3_uapi_grid_config, the default grid resolution is 16x16 cells.
 *
 * The threshold is a saturation measure range [0, 8191], 8191 is default.
 * Values over threshold may be optionally rejected for averaging.
 */
struct ipu3_uapi_awb_config_s {
	__u16 rgbs_thr_gr;
	__u16 rgbs_thr_r;
	__u16 rgbs_thr_gb;
	__u16 rgbs_thr_b;
	struct ipu3_uapi_grid_config grid;
} __attribute__((aligned(32))) __packed;

/**
 * struct ipu3_uapi_awb_config - AWB config wrapper
 *
 * @config: config for auto white balance as defined by &ipu3_uapi_awb_config_s
 */
struct ipu3_uapi_awb_config {
	struct ipu3_uapi_awb_config_s config __attribute__((aligned(32)));
} __packed;

#define IPU3_UAPI_AE_COLORS				4	/* R, G, B, Y */

Annotation

Implementation Notes