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

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

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/amd/display/dc/inc/hw/panel_cntl.h
Extension
.h
Size
2445 bytes
Lines
73
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 panel_cntl_backlight_registers {
	unsigned int BL_PWM_CNTL;
	unsigned int BL_PWM_CNTL2;
	unsigned int BL_PWM_PERIOD_CNTL;
	unsigned int LVTMA_PWRSEQ_REF_DIV_BL_PWM_REF_DIV;
	unsigned int PANEL_PWRSEQ_REF_DIV2;
	unsigned int USER_LEVEL;
};

struct panel_cntl_funcs {
	void (*destroy)(struct panel_cntl **panel_cntl);
	uint32_t (*hw_init)(struct panel_cntl *panel_cntl);
	bool (*is_panel_backlight_on)(struct panel_cntl *panel_cntl);
	bool (*is_panel_powered_on)(struct panel_cntl *panel_cntl);
	void (*store_backlight_level)(struct panel_cntl *panel_cntl);
	void (*driver_set_backlight)(struct panel_cntl *panel_cntl,
			uint32_t backlight_pwm_u16_16);
	uint32_t (*get_current_backlight)(struct panel_cntl *panel_cntl);
};

struct panel_cntl_init_data {
	struct dc_context *ctx;
	uint32_t inst;
	uint32_t eng_id;
};

struct panel_cntl {
	const struct panel_cntl_funcs *funcs;
	struct dc_context *ctx;
	uint32_t inst;
	uint32_t pwrseq_inst;
	/* registers setting needs to be saved and restored at InitBacklight */
	struct panel_cntl_backlight_registers stored_backlight_registers;
};

#endif /* DC_PANEL_CNTL_H_ */

Annotation

Implementation Notes