]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: camera: set iso EMC clock
authorJihoon Bang <jbang@nvidia.com>
Fri, 8 Mar 2013 00:20:35 +0000 (16:20 -0800)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 20:04:21 +0000 (13:04 -0700)
Take into account iso efficiency of 35% in T114/vi
until isomgr is enabled.

Bug 1231863
Bug 1246180

Change-Id: I1994d54e51ed81631d0411bec49ca90059ef693a
Reviewed-on: http://git-master/r/207352
(cherry picked from commit 74fdabe70f1dac93c370a63ba799e8f352da704f)
Signed-off-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-on: http://git-master/r/210872
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
drivers/video/tegra/camera/camera_clk.c

index e39502065c71ef9db92a8117a194ffecce584d69..7bbb73c53e4b21de010e0885bf2b440387db3014 100644 (file)
@@ -109,15 +109,25 @@ int tegra_camera_clk_set_rate(struct tegra_camera *camera)
                         * When emc_clock is set through TEGRA_CAMERA_EMC_CLK,
                         * info->rate has peak memory bandwidth in Bps.
                         */
-                       unsigned long bw = info->rate >> 10;
+                       unsigned long bw = info->rate / 1000;
 #ifdef CONFIG_ARCH_TEGRA_11x_SOC
                        int ret = 0;
 #endif
-                       clk_set_rate(clk, tegra_emc_bw_to_freq_req(bw) << 10);
 
-                       dev_dbg(camera->dev, "%s: bw=%lu, emc_clk=%d\n",
-                               __func__, bw,
-                               tegra_emc_bw_to_freq_req(bw) << 10);
+                       dev_dbg(camera->dev, "%s: bw=%lu\n",
+                               __func__, bw);
+
+#ifdef CONFIG_ARCH_TEGRA_11x_SOC
+                       /*
+                        * Take into account iso client efficiency here until
+                        * isomgr is alive. It's 35%.
+                        */
+                       clk_set_rate(clk,
+                       ((100*tegra_emc_bw_to_freq_req(bw)) / 35) * 1000);
+#else
+                       clk_set_rate(clk, tegra_emc_bw_to_freq_req(bw) * 1000);
+#endif
+
 #ifdef CONFIG_ARCH_TEGRA_11x_SOC
                        /*
                         * There is no way to figure out what latency