tegra: dc: Workaround a simulator bug.
Chao Xu [Tue, 30 Aug 2011 16:45:10 +0000 (09:45 -0700)]
  - Workaround the simulator issue that WIN_x_UPDATE fields are not cleared.

Change-Id: I8060a32740e7641eebefe650cee13fd49260df03
Reviewed-on: http://git-master/r/52994
Tested-by: Chao Xu <cxu@nvidia.com>
Reviewed-by: Mark Stadler <mastadler@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>

Rebase-Id: R2f813f017b8c009146c1c4a8dac80333a833e3fd

drivers/video/tegra/dc/dc.c

index 90aa979..0cb00ef 100644 (file)
@@ -2369,12 +2369,19 @@ static void tegra_dc_trigger_windows(struct tegra_dc *dc)
 
        val = tegra_dc_readl(dc, DC_CMD_STATE_CONTROL);
        for (i = 0; i < DC_N_WINDOWS; i++) {
+#ifdef CONFIG_TEGRA_SIMULATION_PLATFORM
+               /* FIXME: this is not needed when the simulator
+                  clears WIN_x_UPDATE bits as in HW */
+               dc->windows[i].dirty = 0;
+               completed = 1;
+#else
                if (!(val & (WIN_A_ACT_REQ << i))) {
                        dc->windows[i].dirty = 0;
                        completed = 1;
                } else {
                        dirty = 1;
                }
+#endif
        }
 
        if (!dirty) {