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

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

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h
Extension
.h
Size
10364 bytes
Lines
383
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 dpp {
	const struct dpp_funcs *funcs;
	struct dc_context *ctx;
	/**
	 * @inst:
	 *
	 * inst stands for "instance," and it is an id number that references a
	 * specific DPP.
	 */
	int inst;
	struct dpp_caps *caps;
	struct pwl_params regamma_params;
	struct pwl_params degamma_params;
	struct dpp_cursor_attributes cur_attr;
	union defer_reg_writes deferred_reg_writes;

	struct pwl_params shaper_params;
	bool cm_bypass_mode;
	bool cursor_offload;

	struct cursor_position_cache_dpp  pos;
	struct cursor_attribute_cache_dpp att;
};

struct dpp_input_csc_matrix {
	enum dc_color_space color_space;
	uint16_t regval[12];
};

static const struct dpp_input_csc_matrix __maybe_unused dpp_input_csc_matrix[] = {
	{ COLOR_SPACE_SRGB,
		{ 0x2000, 0,      0,      0,
		  0,      0x2000, 0,      0,
		  0,      0,      0x2000, 0 } },
	{ COLOR_SPACE_SRGB_LIMITED,
		{ 0x2000, 0,      0,      0,
		  0,      0x2000, 0,      0,
		  0,      0,      0x2000, 0 } },
	{ COLOR_SPACE_YCBCR601,
		{ 0x2cdd, 0x2000, 0,      0xe991,
		  0xe926, 0x2000, 0xf4fd, 0x10ef,
		  0,      0x2000, 0x38b4, 0xe3a6 } },
	{ COLOR_SPACE_YCBCR601_LIMITED,
		{ 0x3353, 0x2568, 0,      0xe400,
		  0xe5dc, 0x2568, 0xf367, 0x1108,
		  0,      0x2568, 0x40de, 0xdd3a } },
	{ COLOR_SPACE_YCBCR709,
		{ 0x3265, 0x2000, 0,      0xe6ce,
		  0xf105, 0x2000, 0xfa01, 0xa7d,
		  0,      0x2000, 0x3b61, 0xe24f } },
	{ COLOR_SPACE_YCBCR709_LIMITED,
		{ 0x39a6, 0x2568, 0,      0xe0d6,
		  0xeedd, 0x2568, 0xf925, 0x9a8,
		  0,      0x2568, 0x43ee, 0xdbb2 } },
	{ COLOR_SPACE_2020_YCBCR_FULL,
		{ 0x2F30, 0x2000, 0,      0xE869,
		  0xEDB7, 0x2000, 0xFABC, 0xBC6,
		  0,      0x2000, 0x3C34, 0xE1E6 } },
	{ COLOR_SPACE_2020_YCBCR_LIMITED,
		{ 0x35B9, 0x2543, 0,      0xE2B2,
		  0xEB2F, 0x2543, 0xFA01, 0x0B1F,
		  0,      0x2543, 0x4489, 0xDB42 } },
	{ COLOR_SPACE_2020_RGB_LIMITEDRANGE,
		{ 0x35E0, 0x255F, 0,      0xE2B3,
		  0xEB20, 0x255F, 0xF9FD, 0xB1E,
		  0,      0x255F, 0x44BD, 0xDB43 } }
};

struct dpp_grph_csc_adjustment {
	struct fixed31_32 temperature_matrix[CSC_TEMPERATURE_MATRIX_SIZE];
	enum graphics_gamut_adjust_type gamut_adjust_type;
};

struct cnv_color_keyer_params {
	int color_keyer_en;
	int color_keyer_mode;
	int color_keyer_alpha_low;
	int color_keyer_alpha_high;
	int color_keyer_red_low;
	int color_keyer_red_high;
	int color_keyer_green_low;
	int color_keyer_green_high;
	int color_keyer_blue_low;
	int color_keyer_blue_high;
};

/**
 * struct cnv_alpha_2bit_lut - Set the 8bit alpha values based on the 2 bit alpha
 */
struct cnv_alpha_2bit_lut {

Annotation

Implementation Notes