ARM: tegra: dvfs: Add GPU scaling trip-points interfaces
Alex Frid [Sat, 28 Sep 2013 02:17:32 +0000 (19:17 -0700)]
Added common interfaces to set GPU scaling trip-points.

Bug 1273253

Change-Id: I25f5870c00b1e3b8fb4fdcd685900512954a9125
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/280079
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
(cherry picked from commit 840ed28c2d5f35b3c6c8f8ce9c6a044a4bc57705)
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>

arch/arm/mach-tegra/board-common.c
arch/arm/mach-tegra/board-common.h
arch/arm/mach-tegra/dvfs.c
arch/arm/mach-tegra/dvfs.h

index 22468de..df2bb69 100644 (file)
@@ -179,3 +179,8 @@ void tegra_add_tj_trips(struct thermal_trip_info *trips, int *num_trips)
        tegra_add_trip_points(trips, num_trips, tegra_dvfs_get_cpu_vmax_cdev());
        tegra_add_trip_points(trips, num_trips, tegra_core_edp_get_cdev());
 }
+
+void tegra_add_tgpu_trips(struct thermal_trip_info *trips, int *num_trips)
+{
+       tegra_add_trip_points(trips, num_trips, tegra_dvfs_get_gpu_vts_cdev());
+}
index 11f1622..4f4810a 100644 (file)
@@ -29,4 +29,5 @@ int  uart_console_debug_init(int defaul_debug_port);
 int tegra_vibrator_init(void);
 void tegra_add_cdev_trips(struct thermal_trip_info *trips, int *num_trips);
 void tegra_add_tj_trips(struct thermal_trip_info *trips, int *num_trips);
+void tegra_add_tgpu_trips(struct thermal_trip_info *trips, int *num_trips);
 #endif
index 7a5e81a..6596701 100644 (file)
@@ -1275,6 +1275,13 @@ struct tegra_cooling_device *tegra_dvfs_get_gpu_vmin_cdev(void)
        return NULL;
 }
 
+struct tegra_cooling_device *tegra_dvfs_get_gpu_vts_cdev(void)
+{
+       if (tegra_gpu_rail)
+               return tegra_gpu_rail->vts_cdev;
+       return NULL;
+}
+
 static void make_safe_thermal_dvfs_one(struct dvfs *d,
                                  struct tegra_cooling_device *cdev)
 {
index 8698781..52eda0a 100644 (file)
@@ -247,6 +247,7 @@ struct tegra_cooling_device *tegra_dvfs_get_cpu_vmax_cdev(void);
 struct tegra_cooling_device *tegra_dvfs_get_cpu_vmin_cdev(void);
 struct tegra_cooling_device *tegra_dvfs_get_core_vmin_cdev(void);
 struct tegra_cooling_device *tegra_dvfs_get_gpu_vmin_cdev(void);
+struct tegra_cooling_device *tegra_dvfs_get_gpu_vts_cdev(void);
 void tegra_dvfs_rail_init_vmin_thermal_profile(
        int *therm_trips_table, int *therm_floors_table,
        struct dvfs_rail *rail, struct dvfs_dfll_data *d);