mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
msm_fb: display: add panel's late_init
Some panels need to be initialized after panel is on. Add late_init to support this feature. CRs-fixed: 433011 Change-Id: I73c623d1fe52363f070af79ce4bf7774cd84689e Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
This commit is contained in:
parent
1844bc38ac
commit
9f27d80763
6 changed files with 47 additions and 0 deletions
|
@ -2228,6 +2228,10 @@ static int mdp_on(struct platform_device *pdev)
|
|||
mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_OFF, FALSE);
|
||||
|
||||
mdp_histogram_ctrl_all(TRUE);
|
||||
|
||||
if (ret == 0)
|
||||
ret = panel_next_late_init(pdev);
|
||||
|
||||
pr_debug("%s:-\n", __func__);
|
||||
|
||||
return ret;
|
||||
|
@ -2534,6 +2538,7 @@ static int mdp_probe(struct platform_device *pdev)
|
|||
pdata = msm_fb_dev->dev.platform_data;
|
||||
pdata->on = mdp_on;
|
||||
pdata->off = mdp_off;
|
||||
pdata->late_init = NULL;
|
||||
pdata->next = pdev;
|
||||
|
||||
mdp_clk_ctrl(1);
|
||||
|
|
|
@ -330,6 +330,11 @@ static int mipi_dsi_on(struct platform_device *pdev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int mipi_dsi_late_init(struct platform_device *pdev)
|
||||
{
|
||||
return panel_next_late_init(pdev);
|
||||
}
|
||||
|
||||
|
||||
static int mipi_dsi_resource_initialized;
|
||||
|
||||
|
@ -477,6 +482,7 @@ static int mipi_dsi_probe(struct platform_device *pdev)
|
|||
pdata = mdp_dev->dev.platform_data;
|
||||
pdata->on = mipi_dsi_on;
|
||||
pdata->off = mipi_dsi_off;
|
||||
pdata->late_init = mipi_dsi_late_init;
|
||||
pdata->next = pdev;
|
||||
|
||||
/*
|
||||
|
|
|
@ -449,6 +449,11 @@ static int mipi_novatek_lcd_off(struct platform_device *pdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int mipi_novatek_lcd_late_init(struct platform_device *pdev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_LED_TRIGGER(bkl_led_trigger);
|
||||
|
||||
static char led_pwm1[2] = {0x51, 0x0}; /* DTYPE_DCS_WRITE1 */
|
||||
|
@ -547,6 +552,7 @@ static struct platform_driver this_driver = {
|
|||
static struct msm_fb_panel_data novatek_panel_data = {
|
||||
.on = mipi_novatek_lcd_on,
|
||||
.off = mipi_novatek_lcd_off,
|
||||
.late_init = mipi_novatek_lcd_late_init,
|
||||
.set_backlight = mipi_novatek_set_backlight,
|
||||
};
|
||||
|
||||
|
|
|
@ -224,6 +224,11 @@ static int mipi_toshiba_lcd_off(struct platform_device *pdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int mipi_toshiba_lcd_late_init(struct platform_device *pdev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void mipi_bklight_pwm_cfg(void)
|
||||
{
|
||||
if (mipi_toshiba_pdata && mipi_toshiba_pdata->dsi_pwm_cfg)
|
||||
|
@ -296,6 +301,7 @@ static struct platform_driver this_driver = {
|
|||
static struct msm_fb_panel_data toshiba_panel_data = {
|
||||
.on = mipi_toshiba_lcd_on,
|
||||
.off = mipi_toshiba_lcd_off,
|
||||
.late_init = mipi_toshiba_lcd_late_init,
|
||||
.set_backlight = mipi_toshiba_set_backlight,
|
||||
};
|
||||
|
||||
|
|
|
@ -78,6 +78,28 @@ int panel_next_off(struct platform_device *pdev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int panel_next_late_init(struct platform_device *pdev)
|
||||
{
|
||||
int ret = 0;
|
||||
struct msm_fb_panel_data *pdata;
|
||||
struct msm_fb_panel_data *next_pdata;
|
||||
struct platform_device *next_pdev;
|
||||
|
||||
pdata = (struct msm_fb_panel_data *)pdev->dev.platform_data;
|
||||
|
||||
if (pdata) {
|
||||
next_pdev = pdata->next;
|
||||
if (next_pdev) {
|
||||
next_pdata = (struct msm_fb_panel_data *)
|
||||
next_pdev->dev.platform_data;
|
||||
if ((next_pdata) && (next_pdata->late_init))
|
||||
ret = next_pdata->late_init(next_pdev);
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct platform_device *msm_fb_device_alloc(struct msm_fb_panel_data *pdata,
|
||||
u32 type, u32 id)
|
||||
{
|
||||
|
|
|
@ -195,6 +195,7 @@ struct msm_fb_panel_data {
|
|||
/* function entry chain */
|
||||
int (*on) (struct platform_device *pdev);
|
||||
int (*off) (struct platform_device *pdev);
|
||||
int (*late_init) (struct platform_device *pdev);
|
||||
int (*power_ctrl) (boolean enable);
|
||||
struct platform_device *next;
|
||||
int (*clk_func) (int enable);
|
||||
|
@ -207,6 +208,7 @@ struct platform_device *msm_fb_device_alloc(struct msm_fb_panel_data *pdata,
|
|||
u32 type, u32 id);
|
||||
int panel_next_on(struct platform_device *pdev);
|
||||
int panel_next_off(struct platform_device *pdev);
|
||||
int panel_next_late_init(struct platform_device *pdev);
|
||||
|
||||
int lcdc_device_register(struct msm_panel_info *pinfo);
|
||||
|
||||
|
|
Loading…
Reference in a new issue