ARM: tegra: la: use lower LA for display clients
Jon Mayo [Wed, 10 Aug 2011 23:16:10 +0000 (16:16 -0700)]
In order to prevent display underflow until latency allowance scaling is
enabled, use the LA value corresponding to low threshold, instead of max
LA for full FIFO.

Bug 840688

Original-Change-Id: If405e5931b817cdadec0294d487af1a4b921894a
Reviewed-on: http://git-master/r/46342
Reviewed-by: Jonathan Mayo <jmayo@nvidia.com>
Tested-by: Jonathan Mayo <jmayo@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Kevin Huang <kevinh@nvidia.com>

Rebase-Id: Rca14600452178655a8864b0b7bc7bf66576b8ca1

arch/arm/mach-tegra/latency_allowance.c

index 4c2de2a..ecc1e4d 100644 (file)
@@ -398,6 +398,11 @@ int tegra_set_latency_allowance(enum tegra_la_id id,
        la_to_set = (la_to_set < 0) ? 0 : la_to_set;
        la_to_set = (la_to_set > 255) ? 255 : la_to_set;
 
+       /* until display can use latency allowance scaling, use a more
+        * aggressive LA setting. Bug 862709 */
+       if (id >= ID(DISPLAY_0A) && id <= ID(DISPLAY_HCB))
+               la_to_set /= 3;
+
        spin_lock(&safety_lock);
        reg_read = readl(la_info[id].reg_addr);
        reg_write = (reg_read & ~la_info[id].mask) |