aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/omap2/dss/dispc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/fbdev/omap2/dss/dispc.c')
-rw-r--r--drivers/video/fbdev/omap2/dss/dispc.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c
index 0cccff2ffd4e..aa74b3da3718 100644
--- a/drivers/video/fbdev/omap2/dss/dispc.c
+++ b/drivers/video/fbdev/omap2/dss/dispc.c
@@ -102,6 +102,8 @@ struct dispc_features {
/* POL_FREQ has ALIGN bit */
bool supports_sync_align:1;
+
+ bool has_writeback:1;
};
#define DISPC_MAX_NR_FIFOS 5
@@ -710,7 +712,6 @@ static void dispc_setup_color_conv_coef(void)
{
int i;
int num_ovl = dss_feat_get_num_ovls();
- int num_wb = dss_feat_get_num_wbs();
const struct color_conv_coef ctbl_bt601_5_ovl = {
298, 409, 0, 298, -208, -100, 298, 0, 517, 0,
};
@@ -721,8 +722,8 @@ static void dispc_setup_color_conv_coef(void)
for (i = 1; i < num_ovl; i++)
dispc_ovl_write_color_conv_coef(i, &ctbl_bt601_5_ovl);
- for (; i < num_wb; i++)
- dispc_ovl_write_color_conv_coef(i, &ctbl_bt601_5_wb);
+ if (dispc.feat->has_writeback)
+ dispc_ovl_write_color_conv_coef(OMAP_DSS_WB, &ctbl_bt601_5_wb);
}
static void dispc_ovl_set_ba0(enum omap_plane plane, u32 paddr)
@@ -3562,7 +3563,7 @@ static void dispc_dump_regs(struct seq_file *s)
DUMPREG(i, DISPC_OVL_ATTRIBUTES2);
}
- if (dss_feat_get_num_wbs()) {
+ if (dispc.feat->has_writeback) {
i = OMAP_DSS_WB;
DUMPREG(i, DISPC_OVL_BA0);
DUMPREG(i, DISPC_OVL_BA1);
@@ -3892,6 +3893,7 @@ static const struct dispc_features omap44xx_dispc_feats = {
.gfx_fifo_workaround = true,
.set_max_preload = true,
.supports_sync_align = true,
+ .has_writeback = true,
};
static const struct dispc_features omap54xx_dispc_feats = {
@@ -3914,6 +3916,7 @@ static const struct dispc_features omap54xx_dispc_feats = {
.mstandby_workaround = true,
.set_max_preload = true,
.supports_sync_align = true,
+ .has_writeback = true,
};
static int dispc_init_features(struct platform_device *pdev)