diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-01-13 06:18:11 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-01-25 06:46:20 -0500 |
commit | e0e405b9252e5e8926786d796e0d4293bc90cd56 (patch) | |
tree | c6ff1b50949cd70256024e7403fbfa206aca8d47 /drivers | |
parent | 83fa2f2e940dc21a204cff697d84d37214a91708 (diff) |
OMAPDSS: DISPC: Add naive threshold calc for fifomerge
Take fifo merge into use by implementing a rather naive fifo merge
threshold calculation: keep the low threshold always the same, but
increase the high threshold when fifo merge is used.
This should greatly increase the time between pixel data fetches from
SDRAM, as the usable fifo size is much larger. However, it probably
won't help for fifo underflows, as the low threshols is kept the same.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/omap2/dss/dispc.c | 28 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss_features.c | 6 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss_features.h | 2 |
3 files changed, 30 insertions, 6 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index a75972250a20..374c987038ac 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c | |||
@@ -1072,13 +1072,33 @@ void dispc_ovl_compute_fifo_thresholds(enum omap_plane plane, | |||
1072 | */ | 1072 | */ |
1073 | 1073 | ||
1074 | unsigned buf_unit = dss_feat_get_buffer_size_unit(); | 1074 | unsigned buf_unit = dss_feat_get_buffer_size_unit(); |
1075 | unsigned fifo_size, burst_size; | 1075 | unsigned ovl_fifo_size, total_fifo_size, burst_size; |
1076 | int i; | ||
1076 | 1077 | ||
1077 | burst_size = dispc_ovl_get_burst_size(plane); | 1078 | burst_size = dispc_ovl_get_burst_size(plane); |
1078 | fifo_size = dispc_ovl_get_fifo_size(plane); | 1079 | ovl_fifo_size = dispc_ovl_get_fifo_size(plane); |
1079 | 1080 | ||
1080 | *fifo_low = fifo_size - burst_size; | 1081 | if (use_fifomerge) { |
1081 | *fifo_high = fifo_size - buf_unit; | 1082 | total_fifo_size = 0; |
1083 | for (i = 0; i < omap_dss_get_num_overlays(); ++i) | ||
1084 | total_fifo_size += dispc_ovl_get_fifo_size(i); | ||
1085 | } else { | ||
1086 | total_fifo_size = ovl_fifo_size; | ||
1087 | } | ||
1088 | |||
1089 | /* | ||
1090 | * We use the same low threshold for both fifomerge and non-fifomerge | ||
1091 | * cases, but for fifomerge we calculate the high threshold using the | ||
1092 | * combined fifo size | ||
1093 | */ | ||
1094 | |||
1095 | if (dss_has_feature(FEAT_OMAP3_DSI_FIFO_BUG)) { | ||
1096 | *fifo_low = ovl_fifo_size - burst_size * 2; | ||
1097 | *fifo_high = total_fifo_size - burst_size; | ||
1098 | } else { | ||
1099 | *fifo_low = ovl_fifo_size - burst_size; | ||
1100 | *fifo_high = total_fifo_size - buf_unit; | ||
1101 | } | ||
1082 | } | 1102 | } |
1083 | 1103 | ||
1084 | static void dispc_ovl_set_fir(enum omap_plane plane, | 1104 | static void dispc_ovl_set_fir(enum omap_plane plane, |
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c index c2456c5bcd35..419419ad0493 100644 --- a/drivers/video/omap2/dss/dss_features.c +++ b/drivers/video/omap2/dss/dss_features.c | |||
@@ -370,7 +370,8 @@ static const struct omap_dss_features omap3430_dss_features = { | |||
370 | FEAT_LINEBUFFERSPLIT | FEAT_RESIZECONF | | 370 | FEAT_LINEBUFFERSPLIT | FEAT_RESIZECONF | |
371 | FEAT_DSI_PLL_FREQSEL | FEAT_DSI_REVERSE_TXCLKESC | | 371 | FEAT_DSI_PLL_FREQSEL | FEAT_DSI_REVERSE_TXCLKESC | |
372 | FEAT_VENC_REQUIRES_TV_DAC_CLK | FEAT_CPR | FEAT_PRELOAD | | 372 | FEAT_VENC_REQUIRES_TV_DAC_CLK | FEAT_CPR | FEAT_PRELOAD | |
373 | FEAT_FIR_COEF_V | FEAT_ALPHA_FIXED_ZORDER | FEAT_FIFO_MERGE, | 373 | FEAT_FIR_COEF_V | FEAT_ALPHA_FIXED_ZORDER | FEAT_FIFO_MERGE | |
374 | FEAT_OMAP3_DSI_FIFO_BUG, | ||
374 | 375 | ||
375 | .num_mgrs = 2, | 376 | .num_mgrs = 2, |
376 | .num_ovls = 3, | 377 | .num_ovls = 3, |
@@ -394,7 +395,8 @@ static const struct omap_dss_features omap3630_dss_features = { | |||
394 | FEAT_ROWREPEATENABLE | FEAT_LINEBUFFERSPLIT | | 395 | FEAT_ROWREPEATENABLE | FEAT_LINEBUFFERSPLIT | |
395 | FEAT_RESIZECONF | FEAT_DSI_PLL_PWR_BUG | | 396 | FEAT_RESIZECONF | FEAT_DSI_PLL_PWR_BUG | |
396 | FEAT_DSI_PLL_FREQSEL | FEAT_CPR | FEAT_PRELOAD | | 397 | FEAT_DSI_PLL_FREQSEL | FEAT_CPR | FEAT_PRELOAD | |
397 | FEAT_FIR_COEF_V | FEAT_ALPHA_FIXED_ZORDER | FEAT_FIFO_MERGE, | 398 | FEAT_FIR_COEF_V | FEAT_ALPHA_FIXED_ZORDER | FEAT_FIFO_MERGE | |
399 | FEAT_OMAP3_DSI_FIFO_BUG, | ||
398 | 400 | ||
399 | .num_mgrs = 2, | 401 | .num_mgrs = 2, |
400 | .num_ovls = 3, | 402 | .num_ovls = 3, |
diff --git a/drivers/video/omap2/dss/dss_features.h b/drivers/video/omap2/dss/dss_features.h index 50caee9192a2..5f9b82156778 100644 --- a/drivers/video/omap2/dss/dss_features.h +++ b/drivers/video/omap2/dss/dss_features.h | |||
@@ -59,6 +59,8 @@ enum dss_feat_id { | |||
59 | FEAT_ALPHA_FIXED_ZORDER = 1 << 26, | 59 | FEAT_ALPHA_FIXED_ZORDER = 1 << 26, |
60 | FEAT_ALPHA_FREE_ZORDER = 1 << 27, | 60 | FEAT_ALPHA_FREE_ZORDER = 1 << 27, |
61 | FEAT_FIFO_MERGE = 1 << 28, | 61 | FEAT_FIFO_MERGE = 1 << 28, |
62 | /* An unknown HW bug causing the normal FIFO thresholds not to work */ | ||
63 | FEAT_OMAP3_DSI_FIFO_BUG = 1 << 29, | ||
62 | }; | 64 | }; |
63 | 65 | ||
64 | /* DSS register field id */ | 66 | /* DSS register field id */ |