DSS2: Fix DISPC_VID_FIR value for omap34xx
authorVille Syrjälä <ville.syrjala@nokia.com>
Thu, 9 Apr 2009 13:04:44 +0000 (15:04 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Fri, 1 May 2009 16:45:05 +0000 (19:45 +0300)
The msbs of the DISPC_VID_FIR fields were incorrectly masked out on
omap34xx and thus 4:1 downscale did not work correctly.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
drivers/video/omap2/dss/dispc.c

index 076d3d4..b8a3329 100644 (file)
@@ -994,7 +994,10 @@ static void _dispc_set_fir(enum omap_plane plane, int hinc, int vinc)
 
        BUG_ON(plane == OMAP_DSS_GFX);
 
-       val = FLD_VAL(vinc, 27, 16) | FLD_VAL(hinc, 11, 0);
+       if (cpu_is_omap24xx())
+               val = FLD_VAL(vinc, 27, 16) | FLD_VAL(hinc, 11, 0);
+       else
+               val = FLD_VAL(vinc, 28, 16) | FLD_VAL(hinc, 12, 0);
        dispc_write_reg(fir_reg[plane-1], val);
 }