Edit online

初始化流程

在 menuconfig 中使能 LVDS 显示接口和 simple panel 后,显示驱动的初始化过程如下:

../../images/probe.png

DE 和 DI 匹配

DI 在 menuconfig 配置时进行选择,三个显示接口只能使能一个。DE, DI 的 driver 会被存放在一个指针数组中。
static struct platform_driver *drivers[] = {
#ifdef AIC_DISP_DE_DRV
    &artinchip_de_driver,
#endif
#ifdef AIC_DISP_RGB
    &artinchip_rgb_driver,
#endif
#ifdef AIC_DISP_LVDS
    &artinchip_lvds_driver,
#endif
#ifdef AIC_DISP_MIPI_DSI
    &artinchip_dsi_driver
#endif
#ifdef AIC_DISP_MIPI_DBI
    &artinchip_dbi_driver
#endif
};

通过 component_type 来适配 menuconfig 指定的 driver。

panel 的匹配

panel_com.c 维护了一个 panel 的指针数组。
static struct aic_panel *panels[] = {
#ifdef AIC_DISP_RGB
    &aic_panel_rgb,
#endif
#ifdef AIC_DISP_LVDS
    &aic_panel_lvds,
#endif
#ifdef AIC_PANEL_DSI_XM91080
    &dsi_xm91080,
#endif
};

通过 struct aic_panel *aic_find_panel(u32 connector_type) 即可获取一个跟显示接口匹配的 LCD panel。

在 menuconfig 中选择 panel 时,只能使能其中一个。

panel_simple.c 为不需要初始化命令的 LCD 提供 panel,例如:常用的 prgb, lvds 屏幕。

backlight

Luban-Lite 提供两种方式控制背光:
  • GPIO

  • PWM

在 menuconfig 中配置 backlight,详情参考 背光配置