drivers/gpu/drm/amd/display/dc/inc/hw/dwb.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/inc/hw/dwb.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/amd/display/dc/inc/hw/dwb.h
Extension
.h
Size
6331 bytes
Lines
241
Domain
Driver Families
Bucket
drivers/gpu
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 dwb_efc_hdr_metadata {
	/*display chromaticities and white point in units of 0.00001 */
	unsigned int	chromaticity_green_x;
	unsigned int	chromaticity_green_y;
	unsigned int	chromaticity_blue_x;
	unsigned int	chromaticity_blue_y;
	unsigned int	chromaticity_red_x;
	unsigned int	chromaticity_red_y;
	unsigned int	chromaticity_white_point_x;
	unsigned int	chromaticity_white_point_y;

	/*in units of candelas per square meter */
	unsigned int	min_luminance;
	unsigned int	max_luminance;

	/*in units of nits */
	unsigned int	maximum_content_light_level;
	unsigned int	maximum_frame_average_light_level;
};

struct dwb_efc_display_settings {
	unsigned int	inputColorVolume;
	unsigned int	inputColorSpace;
	unsigned int	inputBitDepthMinus8;
	struct dwb_efc_hdr_metadata	hdr_metadata;
	unsigned int	dwbOutputBlack;	// 0 - Normal, 1 - Output Black
};

struct dwb_warmup_params {
	bool	warmup_en;	/* false: normal mode, true: enable pattern generator */
	bool	warmup_mode;	/* false: 420, true: 444 */
	bool	warmup_depth;	/* false: 8bit, true: 10bit */
	int	warmup_data;	/* Data to be sent by pattern generator (same for each pixel component) */
	int	warmup_width;	/* Pattern width (pixels) */
	int	warmup_height;	/* Pattern height (lines) */
};

struct dwb_caps {
	enum dce_version hw_version;	/* DCN engine version. */
	enum dwb_sw_version sw_version;	/* DWB sw implementation version. */
	unsigned int	reserved[6];	/* Reserved for future use, MUST BE 0. */
	unsigned int	adapter_id;
	unsigned int	num_pipes;	/* number of DWB pipes */
	struct {
		unsigned int support_dwb	:1;
		unsigned int support_ogam	:1;
		unsigned int support_wbscl	:1;
		unsigned int support_ocsc	:1;
		unsigned int support_stereo	:1;
		unsigned int support_4k_120p	:1;
	} caps;
	unsigned int	 reserved2[10];	/* Reserved for future use, MUST BE 0. */
};

struct dwbc {
	const struct dwbc_funcs *funcs;
	struct dc_context *ctx;
	int inst;
	struct mcif_wb *mcif;
	bool status;
	int inputSrcSelect;
	bool dwb_output_black;
	enum dc_transfer_func_predefined tf;
	enum dc_color_space output_color_space;
	bool dwb_is_efc_transition;
	bool dwb_is_drc;
	int wb_src_plane_inst;/*hubp, mpcc, inst*/
	uint32_t mask_id;
	int otg_inst;
	bool mvc_cfg;
	struct dc_dwb_params params;
};

struct dwbc_funcs {
	bool (*get_caps)(
		struct dwbc *dwbc,
		struct dwb_caps *caps);

	bool (*enable)(
		struct dwbc *dwbc,
		struct dc_dwb_params *params);

	bool (*disable)(struct dwbc *dwbc);

	bool (*update)(
		struct dwbc *dwbc,
		struct dc_dwb_params *params);

	bool (*is_enabled)(
		struct dwbc *dwbc);

Annotation

Implementation Notes