aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-11-03 11:00:07 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-12-02 01:54:26 -0500
commitf38545da53d98055d8b2f58fe156c86626f3427e (patch)
tree8bd2fb904e2951d7145a072156be27ef30f9e14e /drivers/video
parent3ba2a1c01546a4980e7b7742445560ae4afd1fc1 (diff)
OMAPDSS: separate FIFO threshold setup from ovl_setup
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>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/dss/dispc.c10
-rw-r--r--drivers/video/omap2/dss/dss.h3
-rw-r--r--drivers/video/omap2/dss/manager.c5
3 files changed, 8 insertions, 10 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index f054972a5f57..094bb6e4179e 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -1769,8 +1769,7 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane,
1769} 1769}
1770 1770
1771int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi, 1771int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi,
1772 bool ilace, enum omap_channel channel, bool replication, 1772 bool ilace, enum omap_channel channel, bool replication)
1773 u32 fifo_low, u32 fifo_high)
1774{ 1773{
1775 struct omap_overlay *ovl = omap_dss_get_overlay(plane); 1774 struct omap_overlay *ovl = omap_dss_get_overlay(plane);
1776 bool five_taps = false; 1775 bool five_taps = false;
@@ -1784,11 +1783,11 @@ int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi,
1784 u16 outw, outh; 1783 u16 outw, outh;
1785 1784
1786 DSSDBG("dispc_ovl_setup %d, pa %x, pa_uv %x, sw %d, %d,%d, %dx%d -> " 1785 DSSDBG("dispc_ovl_setup %d, pa %x, pa_uv %x, sw %d, %d,%d, %dx%d -> "
1787 "%dx%d, cmode %x, rot %d, mir %d, ilace %d chan %d repl %d " 1786 "%dx%d, cmode %x, rot %d, mir %d, ilace %d chan %d repl %d\n",
1788 "fifo_low %d fifo high %d\n", plane, oi->paddr, oi->p_uv_addr, 1787 plane, oi->paddr, oi->p_uv_addr,
1789 oi->screen_width, oi->pos_x, oi->pos_y, oi->width, oi->height, 1788 oi->screen_width, oi->pos_x, oi->pos_y, oi->width, oi->height,
1790 oi->out_width, oi->out_height, oi->color_mode, oi->rotation, 1789 oi->out_width, oi->out_height, oi->color_mode, oi->rotation,
1791 oi->mirror, ilace, channel, replication, fifo_low, fifo_high); 1790 oi->mirror, ilace, channel, replication);
1792 1791
1793 if (oi->paddr == 0) 1792 if (oi->paddr == 0)
1794 return -EINVAL; 1793 return -EINVAL;
@@ -1896,7 +1895,6 @@ int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi,
1896 dispc_ovl_set_channel_out(plane, channel); 1895 dispc_ovl_set_channel_out(plane, channel);
1897 1896
1898 dispc_ovl_enable_replication(plane, replication); 1897 dispc_ovl_enable_replication(plane, replication);
1899 dispc_ovl_set_fifo_threshold(plane, fifo_low, fifo_high);
1900 1898
1901 return 0; 1899 return 0;
1902} 1900}
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index 39d48371c0ce..d56e916ca129 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -397,8 +397,7 @@ void dispc_ovl_set_fifo_threshold(enum omap_plane plane, u32 low, u32 high);
397u32 dispc_ovl_get_fifo_size(enum omap_plane plane); 397u32 dispc_ovl_get_fifo_size(enum omap_plane plane);
398u32 dispc_ovl_get_burst_size(enum omap_plane plane); 398u32 dispc_ovl_get_burst_size(enum omap_plane plane);
399int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi, 399int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi,
400 bool ilace, enum omap_channel channel, bool replication, 400 bool ilace, enum omap_channel channel, bool replication);
401 u32 fifo_low, u32 fifo_high);
402int dispc_ovl_enable(enum omap_plane plane, bool enable); 401int dispc_ovl_enable(enum omap_plane plane, bool enable);
403void dispc_ovl_set_channel_out(enum omap_plane plane, 402void dispc_ovl_set_channel_out(enum omap_plane plane,
404 enum omap_channel channel); 403 enum omap_channel channel);
diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
index d8d0d11d95d9..31637ba58f5f 100644
--- a/drivers/video/omap2/dss/manager.c
+++ b/drivers/video/omap2/dss/manager.c
@@ -777,8 +777,7 @@ static int configure_overlay(enum omap_plane plane)
777 777
778 ilace = ovl->manager->device->type == OMAP_DISPLAY_TYPE_VENC; 778 ilace = ovl->manager->device->type == OMAP_DISPLAY_TYPE_VENC;
779 779
780 r = dispc_ovl_setup(plane, oi, ilace, c->channel, 780 r = dispc_ovl_setup(plane, oi, ilace, c->channel, replication);
781 replication, c->fifo_low, c->fifo_high);
782 if (r) { 781 if (r) {
783 /* this shouldn't happen */ 782 /* this shouldn't happen */
784 DSSERR("dispc_ovl_setup failed for ovl %d\n", plane); 783 DSSERR("dispc_ovl_setup failed for ovl %d\n", plane);
@@ -786,6 +785,8 @@ static int configure_overlay(enum omap_plane plane)
786 return r; 785 return r;
787 } 786 }
788 787
788 dispc_ovl_set_fifo_threshold(plane, c->fifo_low, c->fifo_high);
789
789 dispc_ovl_enable(plane, 1); 790 dispc_ovl_enable(plane, 1);
790 791
791 return 0; 792 return 0;