aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dispc.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-01-13 06:17:01 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-01-25 06:46:19 -0500
commit83fa2f2e940dc21a204cff697d84d37214a91708 (patch)
treeeacddc1ef46bf0dbd917667eb4d22b84d9e7b54f /drivers/video/omap2/dss/dispc.c
parent3cb5d966e233167fcbeb7c7d7a66294e13ee9d90 (diff)
OMAPDSS: DISPC: move fifo threhold calc to dispc.c
Move fifo threshold calculation into dispc.c, as the thresholds are really dispc internal thing. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/dispc.c')
-rw-r--r--drivers/video/omap2/dss/dispc.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index ba907bd60099..a75972250a20 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -909,7 +909,7 @@ static void dispc_configure_burst_sizes(void)
909 dispc_ovl_set_burst_size(i, burst_size); 909 dispc_ovl_set_burst_size(i, burst_size);
910} 910}
911 911
912u32 dispc_ovl_get_burst_size(enum omap_plane plane) 912static u32 dispc_ovl_get_burst_size(enum omap_plane plane)
913{ 913{
914 unsigned unit = dss_feat_get_burst_size_unit(); 914 unsigned unit = dss_feat_get_burst_size_unit();
915 /* burst multiplier is always x8 (see dispc_configure_burst_sizes()) */ 915 /* burst multiplier is always x8 (see dispc_configure_burst_sizes()) */
@@ -1018,7 +1018,7 @@ static void dispc_read_plane_fifo_sizes(void)
1018 } 1018 }
1019} 1019}
1020 1020
1021u32 dispc_ovl_get_fifo_size(enum omap_plane plane) 1021static u32 dispc_ovl_get_fifo_size(enum omap_plane plane)
1022{ 1022{
1023 return dispc.fifo_size[plane]; 1023 return dispc.fifo_size[plane];
1024} 1024}
@@ -1063,6 +1063,24 @@ void dispc_enable_fifomerge(bool enable)
1063 REG_FLD_MOD(DISPC_CONFIG, enable ? 1 : 0, 14, 14); 1063 REG_FLD_MOD(DISPC_CONFIG, enable ? 1 : 0, 14, 14);
1064} 1064}
1065 1065
1066void dispc_ovl_compute_fifo_thresholds(enum omap_plane plane,
1067 u32 *fifo_low, u32 *fifo_high, bool use_fifomerge)
1068{
1069 /*
1070 * All sizes are in bytes. Both the buffer and burst are made of
1071 * buffer_units, and the fifo thresholds must be buffer_unit aligned.
1072 */
1073
1074 unsigned buf_unit = dss_feat_get_buffer_size_unit();
1075 unsigned fifo_size, burst_size;
1076
1077 burst_size = dispc_ovl_get_burst_size(plane);
1078 fifo_size = dispc_ovl_get_fifo_size(plane);
1079
1080 *fifo_low = fifo_size - burst_size;
1081 *fifo_high = fifo_size - buf_unit;
1082}
1083
1066static void dispc_ovl_set_fir(enum omap_plane plane, 1084static void dispc_ovl_set_fir(enum omap_plane plane,
1067 int hinc, int vinc, 1085 int hinc, int vinc,
1068 enum omap_color_component color_comp) 1086 enum omap_color_component color_comp)