From: Mans Rullgard Date: Sun, 6 Jul 2008 13:15:36 +0000 (+0100) Subject: omapfb: enable overlay optimisation when possible X-Git-Tag: beagle-5~1 X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=a63ac3abdf6781f863112321260fe7a5da757802 omapfb: enable overlay optimisation when possible --- diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c index 6aff476..3b36227 100644 --- a/drivers/video/omap/dispc.c +++ b/drivers/video/omap/dispc.c @@ -582,11 +582,13 @@ static int omap_dispc_enable_plane(int plane, int enable) const u32 at_reg[] = { DISPC_GFX_ATTRIBUTES, DISPC_VID1_BASE + DISPC_VID_ATTRIBUTES, DISPC_VID2_BASE + DISPC_VID_ATTRIBUTES }; + unsigned overlay_opt = plane & !!enable & !dispc.color_key.key_type; if ((unsigned int)plane > dispc.mem_desc.region_cnt) return -EINVAL; enable_lcd_clocks(1); MOD_REG_FLD(at_reg[plane], 1, enable ? 1 : 0); + MOD_REG_FLD(DISPC_CONTROL, 1<<12 | 1<<5, overlay_opt<<12 | 1<<5); enable_lcd_clocks(0); return 0;