diff options
author | Pavan Kunapuli <pkunapuli@nvidia.com> | 2016-01-06 09:03:46 -0500 |
---|---|---|
committer | Vinod Gopalakrishnakurup <vinodg@nvidia.com> | 2016-01-20 18:12:16 -0500 |
commit | b598d29d884c7a4563df504d0f564c0275d0f65f (patch) | |
tree | bba439ca1ae4e12fac85952372e6ea4138201290 /drivers/video/tegra/dc/dsi.c | |
parent | f787781d40d43671ac37f2d96042cbb717e047da (diff) |
video: tegra: dc: Correct dc,dsi clk settings
nvdisplay_disp clock needs to be adjusted according to current
dc clock rate. Added changes to update nvdisplay_disp clock
when setting dc clock rate.
Removed redundant dsi clock enable calls.
Bug 200164280
Change-Id: Iaa3e260534e9cb129f24eb8896453b4347a78437
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-on: http://git-master/r/929550
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Tested-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/dc/dsi.c')
-rw-r--r-- | drivers/video/tegra/dc/dsi.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/video/tegra/dc/dsi.c b/drivers/video/tegra/dc/dsi.c index fd349229c..dc76a0194 100644 --- a/drivers/video/tegra/dc/dsi.c +++ b/drivers/video/tegra/dc/dsi.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * drivers/video/tegra/dc/dsi.c | 2 | * drivers/video/tegra/dc/dsi.c |
3 | * | 3 | * |
4 | * Copyright (c) 2011-2015, NVIDIA CORPORATION, All rights reserved. | 4 | * Copyright (c) 2011-2016, NVIDIA CORPORATION, All rights reserved. |
5 | * | 5 | * |
6 | * This software is licensed under the terms of the GNU General Public | 6 | * This software is licensed under the terms of the GNU General Public |
7 | * License version 2, as published by the Free Software Foundation, and | 7 | * License version 2, as published by the Free Software Foundation, and |
@@ -2030,9 +2030,7 @@ static void tegra_dsi_set_dc_clk(struct tegra_dc *dc, | |||
2030 | * clock control register and not shift clk div programming. | 2030 | * clock control register and not shift clk div programming. |
2031 | */ | 2031 | */ |
2032 | #if defined CONFIG_ARCH_TEGRA_18x_SOC | 2032 | #if defined CONFIG_ARCH_TEGRA_18x_SOC |
2033 | if (clk_set_rate(dc->clk, dc->mode.pclk)) | 2033 | tegra_dc_clk_set_rate(dc, dc->mode.pclk); |
2034 | dev_err(&dc->ndev->dev, "Failed to set dc clk to %d\n", | ||
2035 | dc->mode.pclk); | ||
2036 | return; | 2034 | return; |
2037 | #endif | 2035 | #endif |
2038 | /* formula: (dsi->shift_clk_div - 1) * 2 */ | 2036 | /* formula: (dsi->shift_clk_div - 1) * 2 */ |
@@ -5760,16 +5758,11 @@ static void tegra_dc_dsi_destroy(struct tegra_dc *dc) | |||
5760 | static long tegra_dc_dsi_setup_clk(struct tegra_dc *dc, struct clk *clk) | 5758 | static long tegra_dc_dsi_setup_clk(struct tegra_dc *dc, struct clk *clk) |
5761 | { | 5759 | { |
5762 | unsigned long rate; | 5760 | unsigned long rate; |
5761 | struct tegra_dc_dsi_data *dsi = tegra_dc_get_outdata(dc); | ||
5763 | struct clk *parent_clk = NULL; | 5762 | struct clk *parent_clk = NULL; |
5764 | struct clk *base_clk = NULL; | 5763 | struct clk *base_clk = NULL; |
5765 | struct tegra_dc_dsi_data *dsi = tegra_dc_get_outdata(dc); | ||
5766 | int err; | 5764 | int err; |
5767 | #if defined(CONFIG_ARCH_TEGRA_18x_SOC) | ||
5768 | u8 i; | ||
5769 | 5765 | ||
5770 | for (i = 0; i < dsi->max_instances; i++) | ||
5771 | tegra_disp_clk_prepare_enable(dsi->dsi_clk[i]); | ||
5772 | #endif | ||
5773 | /* divide by 1000 to avoid overflow */ | 5766 | /* divide by 1000 to avoid overflow */ |
5774 | dc->mode.pclk /= 1000; | 5767 | dc->mode.pclk /= 1000; |
5775 | 5768 | ||
@@ -5812,8 +5805,8 @@ static long tegra_dc_dsi_setup_clk(struct tegra_dc *dc, struct clk *clk) | |||
5812 | base_clk = clk_get_parent(parent_clk); | 5805 | base_clk = clk_get_parent(parent_clk); |
5813 | } | 5806 | } |
5814 | } | 5807 | } |
5815 | tegra_dsi_config_phy_clk(dsi, TEGRA_DSI_ENABLE); | ||
5816 | #endif | 5808 | #endif |
5809 | tegra_dsi_config_phy_clk(dsi, TEGRA_DSI_ENABLE); | ||
5817 | 5810 | ||
5818 | /* Fix me: Revert bpmp check once bpmp FW is fixed */ | 5811 | /* Fix me: Revert bpmp check once bpmp FW is fixed */ |
5819 | #ifdef CONFIG_TEGRA_NVDISPLAY | 5812 | #ifdef CONFIG_TEGRA_NVDISPLAY |