diff options
author | Vineel Kumar Reddy Kovvuri <vineelkumarr@nvidia.com> | 2013-10-07 03:53:41 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:06:39 -0400 |
commit | 0061e6d99aaaa788a5e6eabe6869504b14806d5c (patch) | |
tree | 64c1913167f070f2799354c3d784b05ff7205d03 /drivers/video/tegra/dc/dsi.c | |
parent | 531937e1c97288104fe6c7cd8dc4a19dcc120305 (diff) |
video: tegra: dsi: Fix unbalanced clk API calls
Fixes unbalanced clk enable disable calls
Bug 1376053
Change-Id: I9a6933fa21b91989c5f36f110c47690455148909
Signed-off-by: Vineel Kumar Reddy Kovvuri <vineelkumarr@nvidia.com>
Reviewed-on: http://git-master/r/288740
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Animesh Kishore <ankishore@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 | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/video/tegra/dc/dsi.c b/drivers/video/tegra/dc/dsi.c index e14032be4..88e135a61 100644 --- a/drivers/video/tegra/dc/dsi.c +++ b/drivers/video/tegra/dc/dsi.c | |||
@@ -372,6 +372,11 @@ static int dbg_dsi_show(struct seq_file *s, void *unused) | |||
372 | u32 col = 0; | 372 | u32 col = 0; |
373 | u32 base[MAX_DSI_INSTANCE] = {TEGRA_DSI_BASE, TEGRA_DSIB_BASE}; | 373 | u32 base[MAX_DSI_INSTANCE] = {TEGRA_DSI_BASE, TEGRA_DSIB_BASE}; |
374 | 374 | ||
375 | if (!dsi->enabled) { | ||
376 | seq_printf(s, "DSI controller suspended\n"); | ||
377 | return 0; | ||
378 | } | ||
379 | |||
375 | tegra_dc_io_start(dsi->dc); | 380 | tegra_dc_io_start(dsi->dc); |
376 | tegra_dsi_clk_enable(dsi); | 381 | tegra_dsi_clk_enable(dsi); |
377 | 382 | ||
@@ -500,22 +505,18 @@ static inline void tegra_dc_dsi_debug_create(struct tegra_dc_dsi_data *dsi) | |||
500 | static inline void tegra_dsi_clk_enable(struct tegra_dc_dsi_data *dsi) | 505 | static inline void tegra_dsi_clk_enable(struct tegra_dc_dsi_data *dsi) |
501 | { | 506 | { |
502 | int i = 0; | 507 | int i = 0; |
503 | if (!tegra_is_clk_enabled(dsi->dsi_clk[0])) { | 508 | for (i = 0; i < dsi->max_instances; i++) { |
504 | for (i = 0; i < dsi->max_instances; i++) { | 509 | clk_prepare_enable(dsi->dsi_clk[i]); |
505 | clk_prepare_enable(dsi->dsi_clk[i]); | 510 | udelay(800); |
506 | udelay(800); | ||
507 | } | ||
508 | } | 511 | } |
509 | } | 512 | } |
510 | 513 | ||
511 | static inline void tegra_dsi_clk_disable(struct tegra_dc_dsi_data *dsi) | 514 | static inline void tegra_dsi_clk_disable(struct tegra_dc_dsi_data *dsi) |
512 | { | 515 | { |
513 | int i = 0; | 516 | int i = 0; |
514 | if (tegra_is_clk_enabled(dsi->dsi_clk[0])) { | 517 | for (i = 0; i < dsi->max_instances; i++) { |
515 | for (i = 0; i < dsi->max_instances; i++) { | 518 | clk_disable_unprepare(dsi->dsi_clk[i]); |
516 | clk_disable_unprepare(dsi->dsi_clk[i]); | 519 | udelay(800); |
517 | udelay(800); | ||
518 | } | ||
519 | } | 520 | } |
520 | } | 521 | } |
521 | 522 | ||
@@ -1971,9 +1972,7 @@ static void tegra_dsi_set_dsi_clk(struct tegra_dc *dc, | |||
1971 | dc->one_shot_delay_ms = 4 * | 1972 | dc->one_shot_delay_ms = 4 * |
1972 | DIV_ROUND_UP(S_TO_MS(1), dsi->info.refresh_rate); | 1973 | DIV_ROUND_UP(S_TO_MS(1), dsi->info.refresh_rate); |
1973 | 1974 | ||
1974 | /* Enable DSI clock */ | ||
1975 | tegra_dsi_setup_clk(dc, dsi); | 1975 | tegra_dsi_setup_clk(dc, dsi); |
1976 | tegra_dsi_clk_enable(dsi); | ||
1977 | tegra_dsi_reset_deassert(dsi); | 1976 | tegra_dsi_reset_deassert(dsi); |
1978 | 1977 | ||
1979 | dsi->current_dsi_clk_khz = | 1978 | dsi->current_dsi_clk_khz = |
@@ -2531,7 +2530,8 @@ static int tegra_dsi_init_hw(struct tegra_dc *dc, | |||
2531 | regulator_enable(dsi->avdd_dsi_csi); | 2530 | regulator_enable(dsi->avdd_dsi_csi); |
2532 | /* stablization delay */ | 2531 | /* stablization delay */ |
2533 | mdelay(50); | 2532 | mdelay(50); |
2534 | 2533 | /* Enable DSI clocks */ | |
2534 | tegra_dsi_clk_enable(dsi); | ||
2535 | tegra_dsi_set_dsi_clk(dc, dsi, dsi->target_lp_clk_khz); | 2535 | tegra_dsi_set_dsi_clk(dc, dsi, dsi->target_lp_clk_khz); |
2536 | 2536 | ||
2537 | /* Stop DC stream before configuring DSI registers | 2537 | /* Stop DC stream before configuring DSI registers |