Skip to content

Commit e6b0f88

Browse files
committed
OMAPDSS: FEAT: Add FIFO_MERGE feature
Add feature flag for fifo merge. OMAP2 doesn't contain fifo merge, later OMAPs do. dispc_enable_fifomerge() checks for the flag when called, and gives a WARN if fifo merge is being enabled when it is not supported. Signed-off-by: Tomi Valkeinen <[email protected]>
1 parent dcd6c92 commit e6b0f88

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

drivers/video/omap2/dss/dispc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,6 +1054,11 @@ void dispc_ovl_set_fifo_threshold(enum omap_plane plane, u32 low, u32 high)
10541054

10551055
void dispc_enable_fifomerge(bool enable)
10561056
{
1057+
if (!dss_has_feature(FEAT_FIFO_MERGE)) {
1058+
WARN_ON(enable);
1059+
return;
1060+
}
1061+
10571062
DSSDBG("FIFO merge %s\n", enable ? "enabled" : "disabled");
10581063
REG_FLD_MOD(DISPC_CONFIG, enable ? 1 : 0, 14, 14);
10591064
}

drivers/video/omap2/dss/dss_features.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ static const struct omap_dss_features omap3430_dss_features = {
370370
FEAT_LINEBUFFERSPLIT | FEAT_RESIZECONF |
371371
FEAT_DSI_PLL_FREQSEL | FEAT_DSI_REVERSE_TXCLKESC |
372372
FEAT_VENC_REQUIRES_TV_DAC_CLK | FEAT_CPR | FEAT_PRELOAD |
373-
FEAT_FIR_COEF_V | FEAT_ALPHA_FIXED_ZORDER,
373+
FEAT_FIR_COEF_V | FEAT_ALPHA_FIXED_ZORDER | FEAT_FIFO_MERGE,
374374

375375
.num_mgrs = 2,
376376
.num_ovls = 3,
@@ -394,7 +394,7 @@ static const struct omap_dss_features omap3630_dss_features = {
394394
FEAT_ROWREPEATENABLE | FEAT_LINEBUFFERSPLIT |
395395
FEAT_RESIZECONF | FEAT_DSI_PLL_PWR_BUG |
396396
FEAT_DSI_PLL_FREQSEL | FEAT_CPR | FEAT_PRELOAD |
397-
FEAT_FIR_COEF_V | FEAT_ALPHA_FIXED_ZORDER,
397+
FEAT_FIR_COEF_V | FEAT_ALPHA_FIXED_ZORDER | FEAT_FIFO_MERGE,
398398

399399
.num_mgrs = 2,
400400
.num_ovls = 3,
@@ -419,7 +419,7 @@ static const struct omap_dss_features omap4430_es1_0_dss_features = {
419419
FEAT_DSI_DCS_CMD_CONFIG_VC | FEAT_DSI_VC_OCP_WIDTH |
420420
FEAT_DSI_GNQ | FEAT_HANDLE_UV_SEPARATE | FEAT_ATTR2 |
421421
FEAT_CPR | FEAT_PRELOAD | FEAT_FIR_COEF_V |
422-
FEAT_ALPHA_FREE_ZORDER,
422+
FEAT_ALPHA_FREE_ZORDER | FEAT_FIFO_MERGE,
423423

424424
.num_mgrs = 3,
425425
.num_ovls = 4,
@@ -443,7 +443,8 @@ static const struct omap_dss_features omap4_dss_features = {
443443
FEAT_DSI_DCS_CMD_CONFIG_VC | FEAT_DSI_VC_OCP_WIDTH |
444444
FEAT_DSI_GNQ | FEAT_HDMI_CTS_SWMODE |
445445
FEAT_HANDLE_UV_SEPARATE | FEAT_ATTR2 | FEAT_CPR |
446-
FEAT_PRELOAD | FEAT_FIR_COEF_V | FEAT_ALPHA_FREE_ZORDER,
446+
FEAT_PRELOAD | FEAT_FIR_COEF_V | FEAT_ALPHA_FREE_ZORDER |
447+
FEAT_FIFO_MERGE,
447448

448449
.num_mgrs = 3,
449450
.num_ovls = 4,

drivers/video/omap2/dss/dss_features.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ enum dss_feat_id {
5858
FEAT_FIR_COEF_V = 1 << 25,
5959
FEAT_ALPHA_FIXED_ZORDER = 1 << 26,
6060
FEAT_ALPHA_FREE_ZORDER = 1 << 27,
61+
FEAT_FIFO_MERGE = 1 << 28,
6162
};
6263

6364
/* DSS register field id */

0 commit comments

Comments
 (0)