以前点屏的时候遇到个问题,开机的瞬间显示屏会出现持续大概一秒钟的雪花。当时想的解决方法是在屏驱动中初始化函数里,先加载显示屏初始化参数,然后加个延迟函数,再将背光IC的使能脚拉高,当时验证无效。后来改了另一个文件mt_leds.c才解决出现雪花的这个问题,修改如下: (背光IC的使能脚默认拉低)
+++ b/vendor/mediatek/proprietary/bootable/bootloader/lk/platform/mt6761/mt_leds.c
@@ -48,6 +48,9 @@
#include <platform/mt6370_pmu_bled.h>
#endif
+#define LCD_BL_EN (GPIO43 | 0x80000000)
+
+
#define LEDS_PMIC_CONTROL_ENABLE 0
struct cust_mt65xx_led *get_cust_led_dtsi(void);
struct cust_mt65xx_led pled_dtsi[MT65XX_LED_TYPE_TOTAL];
@@ -433,15 +436,21 @@ void leds_deinit(void)
void mt65xx_backlight_on(void)
{
- enum led_brightness backlight_level = get_cust_led_default_level();
- LEDS_INFO("[LEDS]LK: mt65xx_backlight_on:level = %d\n\r",backlight_level);
- mt65xx_leds_brightness_set(MT65XX_LED_TYPE_LCD, backlight_level);
+
+
+
+ mt_set_gpio_mode(LCD_BL_EN, GPIO_MODE_00);
+ mt_set_gpio_dir(LCD_BL_EN, GPIO_DIR_OUT);
+ mt_set_gpio_out(LCD_BL_EN, GPIO_OUT_ONE);
}
void mt65xx_backlight_off(void)
{
- LEDS_INFO("[LEDS]LK: mt65xx_backlight_off \n\r");
- mt65xx_leds_brightness_set(MT65XX_LED_TYPE_LCD, LED_OFF);
+
+
+ mt_set_gpio_mode(LCD_BL_EN, GPIO_MODE_00);
+ mt_set_gpio_dir(LCD_BL_EN, GPIO_DIR_OUT);
+ mt_set_gpio_out(LCD_BL_EN, GPIO_OUT_ZERO);
}
|