OMAPDSS: separate FIFO threshold setup from ovl_setup
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 3 Nov 2011 15:00:07 +0000 (17:00 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 2 Dec 2011 06:54:26 +0000 (08:54 +0200)
Overlay FIFO thresholds are configured with ovl_setup, with all the
other overlay attributes. This patch separates FIFO threshold setup so
that we can later configure FIFO thresholds only when needed.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/omap2/dss/dispc.c
drivers/video/omap2/dss/dss.h
drivers/video/omap2/dss/manager.c

index f054972a5f57b1dc592b6b6e27ab025ec769dcc7..094bb6e4179e8a33e1e60fc506a3d82a450aab95 100644 (file)
@@ -1769,8 +1769,7 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane,
 }
 
 int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi,
-               bool ilace, enum omap_channel channel, bool replication,
-               u32 fifo_low, u32 fifo_high)
+               bool ilace, enum omap_channel channel, bool replication)
 {
        struct omap_overlay *ovl = omap_dss_get_overlay(plane);
        bool five_taps = false;
@@ -1784,11 +1783,11 @@ int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi,
        u16 outw, outh;
 
        DSSDBG("dispc_ovl_setup %d, pa %x, pa_uv %x, sw %d, %d,%d, %dx%d -> "
-               "%dx%d, cmode %x, rot %d, mir %d, ilace %d chan %d repl %d "
-               "fifo_low %d fifo high %d\n", plane, oi->paddr, oi->p_uv_addr,
+               "%dx%d, cmode %x, rot %d, mir %d, ilace %d chan %d repl %d\n",
+               plane, oi->paddr, oi->p_uv_addr,
                oi->screen_width, oi->pos_x, oi->pos_y, oi->width, oi->height,
                oi->out_width, oi->out_height, oi->color_mode, oi->rotation,
-               oi->mirror, ilace, channel, replication, fifo_low, fifo_high);
+               oi->mirror, ilace, channel, replication);
 
        if (oi->paddr == 0)
                return -EINVAL;
@@ -1896,7 +1895,6 @@ int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi,
        dispc_ovl_set_channel_out(plane, channel);
 
        dispc_ovl_enable_replication(plane, replication);
-       dispc_ovl_set_fifo_threshold(plane, fifo_low, fifo_high);
 
        return 0;
 }
index 39d48371c0ce21d61c45c03085b78c7858942eb7..d56e916ca129ac5e666f2326d8cb6eb6f9fb55a2 100644 (file)
@@ -397,8 +397,7 @@ void dispc_ovl_set_fifo_threshold(enum omap_plane plane, u32 low, u32 high);
 u32 dispc_ovl_get_fifo_size(enum omap_plane plane);
 u32 dispc_ovl_get_burst_size(enum omap_plane plane);
 int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi,
-               bool ilace, enum omap_channel channel, bool replication,
-               u32 fifo_low, u32 fifo_high);
+               bool ilace, enum omap_channel channel, bool replication);
 int dispc_ovl_enable(enum omap_plane plane, bool enable);
 void dispc_ovl_set_channel_out(enum omap_plane plane,
                enum omap_channel channel);
index d8d0d11d95d9cfb5fac4f8d861456fbdf47c564e..31637ba58f5fff188663a3c448ff1646b3f0bc62 100644 (file)
@@ -777,8 +777,7 @@ static int configure_overlay(enum omap_plane plane)
 
        ilace = ovl->manager->device->type == OMAP_DISPLAY_TYPE_VENC;
 
-       r = dispc_ovl_setup(plane, oi, ilace, c->channel,
-               replication, c->fifo_low, c->fifo_high);
+       r = dispc_ovl_setup(plane, oi, ilace, c->channel, replication);
        if (r) {
                /* this shouldn't happen */
                DSSERR("dispc_ovl_setup failed for ovl %d\n", plane);
@@ -786,6 +785,8 @@ static int configure_overlay(enum omap_plane plane)
                return r;
        }
 
+       dispc_ovl_set_fifo_threshold(plane, c->fifo_low, c->fifo_high);
+
        dispc_ovl_enable(plane, 1);
 
        return 0;