]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
OMAPDSS: DISPC: Configure input and output sizes for writeback
authorArchit Taneja <archit@ti.com>
Sat, 28 Jul 2012 17:29:03 +0000 (22:59 +0530)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 26 Sep 2012 11:58:50 +0000 (14:58 +0300)
Writeback uses the WB_PICTURE_SIZE register to define the size of the content
written to memory, this is the output of the scaler. It uses the WB_SIZE
register to define the size of the content coming from the overlay/manager to
which it is connected, this is the input to the scaler. This naming is different
as compared to overlays.

Add checks for writeback in dispc_ovl_set_input_size() and
dispc_ovl_set_output_size() to write to the correct registers.

Signed-off-by: Archit Taneja <archit@ti.com>
drivers/video/omap2/dss/dispc.c

index b1b9e3f1be901a1dba6d0c18791be341a6a2cd78..b9e53b3cbe05ec40e57863f431145b1c7380c691 100644 (file)
@@ -719,7 +719,7 @@ static void dispc_ovl_set_input_size(enum omap_plane plane, int width,
 {
        u32 val = FLD_VAL(height - 1, 26, 16) | FLD_VAL(width - 1, 10, 0);
 
-       if (plane == OMAP_DSS_GFX)
+       if (plane == OMAP_DSS_GFX || plane == OMAP_DSS_WB)
                dispc_write_reg(DISPC_OVL_SIZE(plane), val);
        else
                dispc_write_reg(DISPC_OVL_PICTURE_SIZE(plane), val);
@@ -734,7 +734,10 @@ static void dispc_ovl_set_output_size(enum omap_plane plane, int width,
 
        val = FLD_VAL(height - 1, 26, 16) | FLD_VAL(width - 1, 10, 0);
 
-       dispc_write_reg(DISPC_OVL_SIZE(plane), val);
+       if (plane == OMAP_DSS_WB)
+               dispc_write_reg(DISPC_OVL_PICTURE_SIZE(plane), val);
+       else
+               dispc_write_reg(DISPC_OVL_SIZE(plane), val);
 }
 
 static void dispc_ovl_set_zorder(enum omap_plane plane,