msm: kgsl: Update graphics clock plan

Update old 8660 clock plan for 8960 v1 & v2.

Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-msm8960.c b/arch/arm/mach-msm/board-msm8960.c
index 924febd..d7d59d0 100644
--- a/arch/arm/mach-msm/board-msm8960.c
+++ b/arch/arm/mach-msm/board-msm8960.c
@@ -24,6 +24,7 @@
 #include <linux/spi/spi.h>
 #include <linux/slimbus/slimbus.h>
 #include <linux/bootmem.h>
+#include <linux/msm_kgsl.h>
 #ifdef CONFIG_ANDROID_PMEM
 #include <linux/android_pmem.h>
 #endif
@@ -2874,6 +2875,19 @@
 					&msm8960_i2c_qup_gsbi12_pdata;
 }
 
+static void __init msm8960_gfx_init(void)
+{
+	uint32_t soc_platform_version = socinfo_get_platform_version();
+	if (SOCINFO_VERSION_MAJOR(soc_platform_version) == 1) {
+		struct kgsl_device_platform_data *kgsl_3d0_pdata =
+				msm_kgsl_3d0.dev.platform_data;
+		kgsl_3d0_pdata->pwr_data.pwrlevel[0].gpu_freq =
+				320000000;
+		kgsl_3d0_pdata->pwr_data.pwrlevel[1].gpu_freq =
+				266667000;
+	}
+}
+
 static struct pm8xxx_irq_platform_data pm8xxx_irq_pdata __devinitdata = {
 	.irq_base		= PM8921_IRQ_BASE,
 	.devirq			= MSM_GPIO_TO_INT(104),
@@ -3517,6 +3531,7 @@
 				&msm8960_ssbi_pm8921_pdata;
 	pm8921_platform_data.num_regulators = msm_pm8921_regulator_pdata_len;
 	msm8960_i2c_init();
+	msm8960_gfx_init();
 	msm_spm_init(msm_spm_data, ARRAY_SIZE(msm_spm_data));
 	msm_spm_l2_init(msm_spm_l2_data);
 	msm8960_init_buses();
diff --git a/arch/arm/mach-msm/devices-8960.c b/arch/arm/mach-msm/devices-8960.c
index c338868..a48266d 100644
--- a/arch/arm/mach-msm/devices-8960.c
+++ b/arch/arm/mach-msm/devices-8960.c
@@ -1661,12 +1661,30 @@
 	},
 };
 
-static struct msm_bus_vectors grp3d_nominal_vectors[] = {
+static struct msm_bus_vectors grp3d_low_vectors[] = {
 	{
 		.src = MSM_BUS_MASTER_GRAPHICS_3D,
 		.dst = MSM_BUS_SLAVE_EBI_CH0,
 		.ab = 0,
-		.ib = 200800000U,
+		.ib = 1200000000U,
+	},
+};
+
+static struct msm_bus_vectors grp3d_nominal_low_vectors[] = {
+	{
+		.src = MSM_BUS_MASTER_GRAPHICS_3D,
+		.dst = MSM_BUS_SLAVE_EBI_CH0,
+		.ab = 0,
+		.ib = 2048000000U,
+	},
+};
+
+static struct msm_bus_vectors grp3d_nominal_high_vectors[] = {
+	{
+		.src = MSM_BUS_MASTER_GRAPHICS_3D,
+		.dst = MSM_BUS_SLAVE_EBI_CH0,
+		.ab = 0,
+		.ib = 2656000000U,
 	},
 };
 
@@ -1675,7 +1693,7 @@
 		.src = MSM_BUS_MASTER_GRAPHICS_3D,
 		.dst = MSM_BUS_SLAVE_EBI_CH0,
 		.ab = 0,
-		.ib = 2096000000U,
+		.ib = 3968000000U,
 	},
 };
 
@@ -1685,8 +1703,16 @@
 		grp3d_init_vectors,
 	},
 	{
-		ARRAY_SIZE(grp3d_nominal_vectors),
-		grp3d_nominal_vectors,
+		ARRAY_SIZE(grp3d_low_vectors),
+		grp3d_low_vectors,
+	},
+	{
+		ARRAY_SIZE(grp3d_nominal_low_vectors),
+		grp3d_nominal_low_vectors,
+	},
+	{
+		ARRAY_SIZE(grp3d_nominal_high_vectors),
+		grp3d_nominal_high_vectors,
 	},
 	{
 		ARRAY_SIZE(grp3d_max_vectors),
@@ -1714,7 +1740,7 @@
 		.src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
 		.dst = MSM_BUS_SLAVE_EBI_CH0,
 		.ab = 0,
-		.ib = 248000000,
+		.ib = 204800000U,
 	},
 };
 
@@ -1749,7 +1775,7 @@
 		.src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
 		.dst = MSM_BUS_SLAVE_EBI_CH0,
 		.ab = 0,
-		.ib = 248000000,
+		.ib = 204800000U,
 	},
 };
 
@@ -1790,20 +1816,28 @@
 	.pwr_data = {
 		.pwrlevel = {
 			{
-				.gpu_freq = 266667000,
+				.gpu_freq = 400000000,
+				.bus_freq = 4,
+			},
+			{
+				.gpu_freq = 300000000,
+				.bus_freq = 3,
+			},
+			{
+				.gpu_freq = 200000000,
 				.bus_freq = 2,
 			},
 			{
-				.gpu_freq = 228571000,
+				.gpu_freq = 128000000,
 				.bus_freq = 1,
 			},
 			{
-				.gpu_freq = 266667000,
+				.gpu_freq = 27000000,
 				.bus_freq = 0,
 			},
 		},
-		.init_level = 0,
-		.num_levels = 3,
+		.init_level = 1,
+		.num_levels = 5,
 		.set_grp_async = NULL,
 		.idle_timeout = HZ/5,
 		.nap_allowed = true,