aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2014-09-29 16:46:17 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2015-02-26 05:15:13 -0500
commit47fc469b3af5fc63d65a51e21acaa3ed06c288e7 (patch)
tree5ff5e3183c19cfdd842cd5dea1d6a21d4f73aba0 /drivers/video
parentd49cd15550d9d4495f6187425318c245d58cb63f (diff)
OMAPDSS: setup default fifo thresholds
At the moment we don't setup FIFO thresholds by default in omapdss. It's supposed to be done by the user of omapdss. And that is missing from omapdrm, causing unoptimal thresholds to be used when using omapdrm. While I believe it's in theory better to allow the user of omapdss to setup the fifo thresholds, in practice we always use the same values, and we could as well setup the thresholds in omapdss. Furthermore, in omapdss init we always swap the FIFO used for GFX and WB overlays, but we don't swap the FIFO thresholds for those overlays (which is the reason for omapdrm using unoptimal HW reset values). So it would make sense to setup the thresholds to account for the swapping of the FIFOs. So, this patch adds code to setup default FIFO tresholds at omapdss init. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/omap2/dss/dispc.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c
index 766c985cbfa7..6296a3e5124f 100644
--- a/drivers/video/fbdev/omap2/dss/dispc.c
+++ b/drivers/video/fbdev/omap2/dss/dispc.c
@@ -1138,6 +1138,7 @@ static void dispc_init_fifos(void)
1138 int fifo; 1138 int fifo;
1139 u8 start, end; 1139 u8 start, end;
1140 u32 unit; 1140 u32 unit;
1141 int i;
1141 1142
1142 unit = dss_feat_get_buffer_size_unit(); 1143 unit = dss_feat_get_buffer_size_unit();
1143 1144
@@ -1177,6 +1178,20 @@ static void dispc_init_fifos(void)
1177 dispc.fifo_assignment[OMAP_DSS_GFX] = OMAP_DSS_WB; 1178 dispc.fifo_assignment[OMAP_DSS_GFX] = OMAP_DSS_WB;
1178 dispc.fifo_assignment[OMAP_DSS_WB] = OMAP_DSS_GFX; 1179 dispc.fifo_assignment[OMAP_DSS_WB] = OMAP_DSS_GFX;
1179 } 1180 }
1181
1182 /*
1183 * Setup default fifo thresholds.
1184 */
1185 for (i = 0; i < dss_feat_get_num_ovls(); ++i) {
1186 u32 low, high;
1187 const bool use_fifomerge = false;
1188 const bool manual_update = false;
1189
1190 dispc_ovl_compute_fifo_thresholds(i, &low, &high,
1191 use_fifomerge, manual_update);
1192
1193 dispc_ovl_set_fifo_threshold(i, low, high);
1194 }
1180} 1195}
1181 1196
1182static u32 dispc_ovl_get_fifo_size(enum omap_plane plane) 1197static u32 dispc_ovl_get_fifo_size(enum omap_plane plane)