Skip to content

Commit

Permalink
msm: HTC: ville: set CLK_CTRL for backlight and AUO panel
Browse files Browse the repository at this point in the history
Change-Id: I6d24b902b281a83d24e19557db5c88a0b4eaea40
  • Loading branch information
intervigilium committed Jan 13, 2014
1 parent 2f2a0ce commit 1fe2bda
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions arch/arm/mach-msm/htc/ville/display/mipi_ville.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,14 +318,17 @@ static struct gamma_curvy smd_gamma_tbl = {
};
#endif

static int ville_send_display_cmds(struct dsi_cmd_desc *cmd, int cnt)
static int ville_send_display_cmds(struct dsi_cmd_desc *cmd, int cnt,
bool clk_ctrl)
{
int ret = 0;
struct dcs_cmd_req cmdreq;

cmdreq.cmds = cmd;
cmdreq.cmds_cnt = cnt;
cmdreq.flags = CMD_REQ_COMMIT;
if (clk_ctrl)
cmdreq.flags |= CMD_CLK_CTRL;
cmdreq.rlen = 0;
cmdreq.cb = NULL;

Expand Down Expand Up @@ -357,9 +360,10 @@ static int mipi_ville_lcd_on(struct platform_device *pdev)
}

if (panel_type == PANEL_ID_VILLE_SAMSUNG_SG ||
panel_type == PANEL_ID_VILLE_SAMSUNG_SG_C2 ||
panel_type == PANEL_ID_VILLE_AUO) {
ville_send_display_cmds(cmd_on_cmds, cmd_on_cmds_count);
panel_type == PANEL_ID_VILLE_SAMSUNG_SG_C2) {
ville_send_display_cmds(cmd_on_cmds, cmd_on_cmds_count, false);
} else if (panel_type == PANEL_ID_VILLE_AUO) {
ville_send_display_cmds(cmd_on_cmds, cmd_on_cmds_count, true);
} else {
pr_err("%s: panel_type is not supported!(%d)\n",
__func__, panel_type);
Expand All @@ -385,7 +389,8 @@ static int mipi_ville_lcd_off(struct platform_device *pdev)
return 0;

if (panel_type != PANEL_ID_NONE)
ville_send_display_cmds(display_off_cmds, display_off_cmds_count);
ville_send_display_cmds(display_off_cmds,
display_off_cmds_count, false);

mipi_lcd_on = 0;

Expand Down Expand Up @@ -505,8 +510,10 @@ inline void mipi_dsi_set_backlight(struct msm_fb_data_type *mfd, int level)
else if (panel_type == PANEL_ID_VILLE_SAMSUNG_SG)
ville_shrink_pwm(mfd->bl_level);

if (panel_type == PANEL_ID_VILLE_SAMSUNG_SG || panel_type == PANEL_ID_VILLE_SAMSUNG_SG_C2)
ville_send_display_cmds(ville_cmd_backlight_cmds, ARRAY_SIZE(ville_cmd_backlight_cmds));
if (panel_type == PANEL_ID_VILLE_SAMSUNG_SG ||
panel_type == PANEL_ID_VILLE_SAMSUNG_SG_C2)
ville_send_display_cmds(ville_cmd_backlight_cmds,
ARRAY_SIZE(ville_cmd_backlight_cmds), true);
}

static void mipi_ville_set_backlight(struct msm_fb_data_type *mfd)
Expand Down

0 comments on commit 1fe2bda

Please sign in to comment.