Commit e5f80917 authored by Tomi Valkeinen's avatar Tomi Valkeinen

OMAPDSS: DISPC: always set ALIGN when available

By default DISPC asserts hsync and vsync sequentially, i.e. there's
first hsync and that is immediately followed by vsync. This is the only
available behaviour on OMAP2/3, and default behaviour on OMAP4+.

OMAP4+ has ALIGN bit in POL_FREQ register, which makes DISPC assert both
syncs at the same time.

It has been observed that some panels don't like sequential syncs (AM5
EVM's panel). After studying the datasheets for multiple panels and
encoders, and MIPI DPI spec, it looks like there is no standard way to
handle this.

Sometimes the datasheets don't mention the required syncs behaviour at
all, sometimes the datasheets have images that hint towards simultaneous
syncs, and sometimes it is explicitly mentioned that simultaneous syncs
are needed. No panels or encoders requiring sequential sync was found.

It thus seems to be safe to default to simultaneous syncs when the ALIGN
bit is available. This fixed AM5 EVM's panel, and no side effects have
been observed on other panels or encoders.
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
parent 5038bb8c
......@@ -99,6 +99,9 @@ struct dispc_features {
/* PIXEL_INC is not added to the last pixel of a line */
bool last_pixel_inc_missing:1;
/* POL_FREQ has ALIGN bit */
bool supports_sync_align:1;
};
#define DISPC_MAX_NR_FIFOS 5
......@@ -3163,6 +3166,10 @@ static void _dispc_mgr_set_lcd_timings(enum omap_channel channel, int hsw,
FLD_VAL(hs, 13, 13) |
FLD_VAL(vs, 12, 12);
/* always set ALIGN bit when available */
if (dispc.feat->supports_sync_align)
l |= (1 << 18);
dispc_write_reg(DISPC_POL_FREQ(channel), l);
if (dispc.syscon_pol) {
......@@ -3854,6 +3861,7 @@ static const struct dispc_features omap44xx_dispc_feats = {
.num_fifos = 5,
.gfx_fifo_workaround = true,
.set_max_preload = true,
.supports_sync_align = true,
};
static const struct dispc_features omap54xx_dispc_feats = {
......@@ -3875,6 +3883,7 @@ static const struct dispc_features omap54xx_dispc_feats = {
.gfx_fifo_workaround = true,
.mstandby_workaround = true,
.set_max_preload = true,
.supports_sync_align = true,
};
static int dispc_init_features(struct platform_device *pdev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment