video: tegra: host: Add VIC support to nvhost_pod
Arto Merilainen [Wed, 25 Sep 2013 11:41:13 +0000 (14:41 +0300)]
nvhost_pod has traditionally been used in 3d scaling. We now want
to use the same scaling policy to scale VIC03. At this point we
enable only scaling based on actmon value.

Bug 1364804

Change-Id: I37ff51a5e2b5dedb8c943a3e7008e88dc46ebf42
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
(cherry picked from commit fcb0a30c8aa9d62315bf07adb6c851527f6e1658)
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>

drivers/video/tegra/host/gr3d/pod_scaling.c

index 72f11cf..130c4d3 100644 (file)
@@ -1064,39 +1064,49 @@ static int nvhost_pod_init(struct devfreq *df)
        podgov->block = 0;
        podgov->p_use_throughput_hint = 1;
 
-       switch (cid) {
-       case TEGRA_CHIPID_TEGRA14:
-               podgov->idle_min = podgov->p_idle_min = 500;
+       if (!strcmp(d->name, "vic03")) {
+               podgov->idle_min = podgov->p_idle_min = 300;
                podgov->idle_max = podgov->p_idle_max = 700;
                podgov->p_hint_lo_limit = 500;
                podgov->p_hint_hi_limit = 997;
-               podgov->p_scaleup_limit = 1500;
-               podgov->p_scaledown_limit = 1700;
-               podgov->p_smooth = 3;
-               break;
-       case TEGRA_CHIPID_TEGRA11:
-       case TEGRA_CHIPID_TEGRA12:
-               podgov->idle_min = podgov->p_idle_min = 400;
-               podgov->idle_max = podgov->p_idle_max = 500;
-               podgov->p_hint_lo_limit = 500;
-               podgov->p_hint_hi_limit = 997;
                podgov->p_scaleup_limit = 1100;
                podgov->p_scaledown_limit = 1300;
                podgov->p_smooth = 3;
-               break;
-       case TEGRA_CHIPID_TEGRA3:
-               podgov->idle_min = podgov->p_idle_min = 100;
-               podgov->idle_max = podgov->p_idle_max = 150;
-               podgov->p_hint_lo_limit = 800;
-               podgov->p_hint_hi_limit = 1015;
-               podgov->p_scaleup_limit = 1275;
-               podgov->p_scaledown_limit = 1475;
-               podgov->p_smooth = 7;
-               break;
-       default:
-               pr_err("%s: un-supported chip id\n", __func__);
-               goto err_unsupported_chip_id;
-               break;
+       } else {
+               switch (cid) {
+               case TEGRA_CHIPID_TEGRA14:
+                       podgov->idle_min = podgov->p_idle_min = 500;
+                       podgov->idle_max = podgov->p_idle_max = 700;
+                       podgov->p_hint_lo_limit = 500;
+                       podgov->p_hint_hi_limit = 997;
+                       podgov->p_scaleup_limit = 1500;
+                       podgov->p_scaledown_limit = 1700;
+                       podgov->p_smooth = 3;
+                       break;
+               case TEGRA_CHIPID_TEGRA11:
+               case TEGRA_CHIPID_TEGRA12:
+                       podgov->idle_min = podgov->p_idle_min = 400;
+                       podgov->idle_max = podgov->p_idle_max = 500;
+                       podgov->p_hint_lo_limit = 500;
+                       podgov->p_hint_hi_limit = 997;
+                       podgov->p_scaleup_limit = 1100;
+                       podgov->p_scaledown_limit = 1300;
+                       podgov->p_smooth = 3;
+                       break;
+               case TEGRA_CHIPID_TEGRA3:
+                       podgov->idle_min = podgov->p_idle_min = 100;
+                       podgov->idle_max = podgov->p_idle_max = 150;
+                       podgov->p_hint_lo_limit = 800;
+                       podgov->p_hint_hi_limit = 1015;
+                       podgov->p_scaleup_limit = 1275;
+                       podgov->p_scaledown_limit = 1475;
+                       podgov->p_smooth = 7;
+                       break;
+               default:
+                       pr_err("%s: un-supported chip id\n", __func__);
+                       goto err_unsupported_chip_id;
+                       break;
+               }
        }
        podgov->p_estimation_window = 10000;
        podgov->adjustment_type = ADJUSTMENT_DEVICE_REQ;