diff options
author | Animesh Kishore <ankishore@nvidia.com> | 2013-08-01 08:44:43 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:05:42 -0400 |
commit | a877749647e93c63d8a18fc0fccb3eb5dc4961f2 (patch) | |
tree | d7b80abed6926612b4dc35f320b25e21c378f4af /drivers/video/tegra/dc/dsi.c | |
parent | e05cba8783bca10a8fc4df171ec20d41dff31e5a (diff) |
video: tegra: dsi: Fix dsi suspend sequence
- explicitly disable backlight before suspend
- power gate pad after panel power gate
Bug 1341152
Change-Id: Ibf664efc3db371d09ac6f380706528b139eafce5
Signed-off-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-on: http://git-master/r/256835
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Vineel Kumar Reddy Kovvuri <vineelkumarr@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/dc/dsi.c')
-rw-r--r-- | drivers/video/tegra/dc/dsi.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/drivers/video/tegra/dc/dsi.c b/drivers/video/tegra/dc/dsi.c index a27e69634..7d02d398c 100644 --- a/drivers/video/tegra/dc/dsi.c +++ b/drivers/video/tegra/dc/dsi.c | |||
@@ -4420,6 +4420,15 @@ fail: | |||
4420 | return err; | 4420 | return err; |
4421 | } | 4421 | } |
4422 | 4422 | ||
4423 | static void tegra_dsi_bl_off(struct backlight_device *bd) | ||
4424 | { | ||
4425 | if (!bd) | ||
4426 | return; | ||
4427 | |||
4428 | bd->props.brightness = 0; | ||
4429 | backlight_update_status(bd); | ||
4430 | } | ||
4431 | |||
4423 | static int tegra_dsi_deep_sleep(struct tegra_dc *dc, | 4432 | static int tegra_dsi_deep_sleep(struct tegra_dc *dc, |
4424 | struct tegra_dc_dsi_data *dsi) | 4433 | struct tegra_dc_dsi_data *dsi) |
4425 | { | 4434 | { |
@@ -4429,6 +4438,8 @@ static int tegra_dsi_deep_sleep(struct tegra_dc *dc, | |||
4429 | if (!dsi->enabled) | 4438 | if (!dsi->enabled) |
4430 | return 0; | 4439 | return 0; |
4431 | 4440 | ||
4441 | tegra_dsi_bl_off(get_backlight_device_by_name(dsi->info.bl_name)); | ||
4442 | |||
4432 | err = tegra_dsi_set_to_lp_mode(dc, dsi, DSI_LP_OP_WRITE); | 4443 | err = tegra_dsi_set_to_lp_mode(dc, dsi, DSI_LP_OP_WRITE); |
4433 | if (err < 0) { | 4444 | if (err < 0) { |
4434 | dev_err(&dc->ndev->dev, | 4445 | dev_err(&dc->ndev->dev, |
@@ -4475,8 +4486,6 @@ static int tegra_dsi_deep_sleep(struct tegra_dc *dc, | |||
4475 | /* Disable dsi source clock */ | 4486 | /* Disable dsi source clock */ |
4476 | tegra_dsi_clk_disable(dsi); | 4487 | tegra_dsi_clk_disable(dsi); |
4477 | 4488 | ||
4478 | regulator_disable(dsi->avdd_dsi_csi); | ||
4479 | |||
4480 | dsi->enabled = false; | 4489 | dsi->enabled = false; |
4481 | dsi->host_suspended = true; | 4490 | dsi->host_suspended = true; |
4482 | 4491 | ||
@@ -4485,6 +4494,14 @@ fail: | |||
4485 | return err; | 4494 | return err; |
4486 | } | 4495 | } |
4487 | 4496 | ||
4497 | static void tegra_dc_dsi_postpoweroff(struct tegra_dc *dc) | ||
4498 | { | ||
4499 | struct tegra_dc_dsi_data *dsi = tegra_dc_get_outdata(dc); | ||
4500 | |||
4501 | if (!dsi->enabled) | ||
4502 | regulator_disable(dsi->avdd_dsi_csi); | ||
4503 | } | ||
4504 | |||
4488 | static int tegra_dsi_host_resume(struct tegra_dc *dc) | 4505 | static int tegra_dsi_host_resume(struct tegra_dc *dc) |
4489 | { | 4506 | { |
4490 | int err = 0; | 4507 | int err = 0; |
@@ -4721,6 +4738,7 @@ struct tegra_dc_out_ops tegra_dc_dsi_ops = { | |||
4721 | .destroy = tegra_dc_dsi_destroy, | 4738 | .destroy = tegra_dc_dsi_destroy, |
4722 | .enable = tegra_dc_dsi_enable, | 4739 | .enable = tegra_dc_dsi_enable, |
4723 | .disable = tegra_dc_dsi_disable, | 4740 | .disable = tegra_dc_dsi_disable, |
4741 | .postpoweroff = tegra_dc_dsi_postpoweroff, | ||
4724 | .hold = tegra_dc_dsi_hold_host, | 4742 | .hold = tegra_dc_dsi_hold_host, |
4725 | .release = tegra_dc_dsi_release_host, | 4743 | .release = tegra_dc_dsi_release_host, |
4726 | #ifdef CONFIG_PM | 4744 | #ifdef CONFIG_PM |