video: tegra: host: WAR: fallback 3dfs on ap37
Ilan Aelion [Fri, 24 Aug 2012 09:09:38 +0000 (14:09 +0530)]
Disabling throughput-hint based scaling on ap37

Bug 1034948

Change-Id: I60570e1a6b95a2f27918959dfd8d3449b286627c
Signed-off-by: Ilan Aelion <iaelion@nvidia.com>
Reviewed-on: http://git-master/r/127129
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

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

index fc30c22..dbbc355 100644 (file)
@@ -639,6 +639,12 @@ static ssize_t enable_3d_scaling_store(struct device *dev,
 static DEVICE_ATTR(enable_3d_scaling, S_IRUGO | S_IWUSR,
        enable_3d_scaling_show, enable_3d_scaling_store);
 
+/*
+ * WAR: disable use_throughput_hint on ap37
+ * this is defined in arch/arm/mach-tegra/tegra3_speedo.c
+ */
+int app_profiles_enabled(void);
+
 void nvhost_scale3d_init(struct nvhost_device *d)
 {
        if (!scale3d.init) {
@@ -750,6 +756,8 @@ void nvhost_scale3d_init(struct nvhost_device *d)
                scale3d.p_verbosity = 0;
                scale3d.p_adjust = 1;
                scale3d.p_use_throughput_hint = 1;
+               /* app profiles only enabled on ap37 */
+               scale3d.p_use_throughput_hint = !app_profiles_enabled();
                scale3d.p_throughput_lo_limit = 95;
                scale3d.p_throughput_hi_limit = 100;
                scale3d.p_scale_step = 60000000;