ARM: GPU: MALI: G3D ASV Lock Bit implementation
authorArjun KV <arjun.kv@samsung.com>
Wed, 19 Dec 2012 06:54:53 +0000 (12:24 +0530)
committerChromeBot <chrome-bot@google.com>
Fri, 1 Mar 2013 21:52:00 +0000 (13:52 -0800)
If G3D ASV lock bit is configured, all voltages in the G3D ASV table
have to be increased by 25mV.

BUG=chrome-os-partner:16615
TEST=Compile and boot kernel, cannot test
the exact changes till we get the new chip.

Change-Id: I8784ed290807ac5db86c706177403260742bbe89
Signed-off-by: Arjun.K.V <arjun.kv@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/39467
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
Commit-Queue: Doug Anderson <dianders@chromium.org>

arch/arm/mach-exynos/include/mach/busfreq_exynos5.h
drivers/gpu/arm/t6xx/kbase/src/linux/config/tpip/mali_kbase_config_exynos5.c

index d328839..1f24545 100644 (file)
@@ -28,6 +28,7 @@ extern unsigned int exynos_result_mif_asv;
 extern bool exynos_lot_id;
 extern bool exynos_lot_is_nzvpu;
 extern bool int_vol_lock;
+extern bool g3d_vol_lock;
 
 enum busfreq_level_idx {
        LV_0,
index e32efd9..d1f3c87 100644 (file)
@@ -80,6 +80,7 @@
 #define VITHAR_DEFAULT_CLOCK 533000000
 #define RUNTIME_PM_DELAY_TIME 10
 #define CONFIG_T6XX_HWVER_R0P0 1
+#define G3D_ASV_VOL_OFFSET     25000
 
 struct regulator *kbase_platform_get_regulator(void);
 int kbase_platform_regulator_init(void);
@@ -1458,8 +1459,12 @@ static int mali_dvfs_update_asv(int group)
                if (exynos_lot_id)
                        mali_dvfs_infotbl[i].voltage =
                                mali_dvfs_asv_vol_tbl_special[group-1][i];
-                else
-                        mali_dvfs_infotbl[i].voltage =
+               else if (g3d_vol_lock)
+                               mali_dvfs_infotbl[i].voltage =
+                                       mali_dvfs_asv_vol_tbl[group][i] +
+                                               G3D_ASV_VOL_OFFSET;
+               else
+                       mali_dvfs_infotbl[i].voltage =
                                mali_dvfs_asv_vol_tbl[group][i];
        }