video: tegra: dc: fix bug causing drawing before flipping
I-Gene Leong [Fri, 18 Nov 2011 02:49:15 +0000 (18:49 -0800)]
The tegra_dc_trigger_windows function was improperly using the
WIN_x_UPDATE bits to determine when a flip has occurred instead of the
WIN_x_ACT_REQ bits. Without this change, it's possible for the postflip
syncpoint for a buffer to get incremented before it actually flips.
Still need to figure out why that's even possible...

Fixes bug 902955

Change-Id: I67ba093a0114646977cc8cb95a040ec4178cebfc
Reviewed-on: http://git-master/r/65389
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-by: Nate Huang <nhuang@nvidia.com>
Tested-by: Nate Huang <nhuang@nvidia.com>
Reviewed-on: http://git-master/r/98024
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

Rebase-Id: R80151b1c6b750e825e1b99e367fe960c072047ee

drivers/video/tegra/dc/dc.c

index 08863d0..5032118 100644 (file)
@@ -2345,7 +2345,7 @@ 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++) {
-               if (!(val & (WIN_A_UPDATE << i))) {
+               if (!(val & (WIN_A_ACT_REQ << i))) {
                        dc->windows[i].dirty = 0;
                        completed = 1;
                } else {