xref: /aosp_15_r20/external/coreboot/src/soc/mediatek/common/include/soc/display.h (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef __SOC_MEDIATEK_COMMON_DISPLAY_H__
4 #define __SOC_MEDIATEK_COMMON_DISPLAY_H__
5 
6 #include <commonlib/coreboot_tables.h>
7 #include <mipi/panel.h>
8 
9 enum disp_path_sel {
10 	DISP_PATH_NONE = 0,
11 	DISP_PATH_EDP,
12 	DISP_PATH_MIPI,
13 };
14 
15 struct panel_description {
16 	const char *name;
17 	void (*configure_backlight)(void);
18 	void (*power_on)(void);
19 	int (*get_edid)(struct edid *edid);
20 	int (*post_power_on)(const struct edid *edid);
21 	enum lb_fb_orientation orientation;
22 	enum disp_path_sel disp_path;
23 	bool pwm_ctrl_gpio;
24 };
25 
26 int mtk_display_init(void);
27 struct panel_description *get_active_panel(void);
28 
29 void mtk_ddp_init(void);
30 void mtk_ddp_mode_set(const struct edid *edid, enum disp_path_sel path);
31 
32 #endif
33