aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/manager.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-05-23 19:52:55 -0400
committerPaul Mundt <lethal@linux-sh.org>2010-05-23 19:52:55 -0400
commit1f782fee18b39b9ad438ebbd82c2915a16c879ee (patch)
treef292930065e6c860714c134790ab8882680ac739 /drivers/video/omap2/dss/manager.c
parent8eda2f21ed9c936a54fd7bc16cbfa5ee656635c2 (diff)
parentf4b87dee923342505e1ddba8d34ce9de33e75050 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/video/omap2/dss/manager.c')
-rw-r--r--drivers/video/omap2/dss/manager.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
index 0820986d4a68..9e1fbe531bf0 100644
--- a/drivers/video/omap2/dss/manager.c
+++ b/drivers/video/omap2/dss/manager.c
@@ -843,6 +843,7 @@ static void configure_manager(enum omap_channel channel)
843 843
844 c = &dss_cache.manager_cache[channel]; 844 c = &dss_cache.manager_cache[channel];
845 845
846 dispc_set_default_color(channel, c->default_color);
846 dispc_set_trans_key(channel, c->trans_key_type, c->trans_key); 847 dispc_set_trans_key(channel, c->trans_key_type, c->trans_key);
847 dispc_enable_trans_key(channel, c->trans_enabled); 848 dispc_enable_trans_key(channel, c->trans_enabled);
848 dispc_enable_alpha_blending(channel, c->alpha_enabled); 849 dispc_enable_alpha_blending(channel, c->alpha_enabled);
@@ -940,6 +941,22 @@ static int configure_dispc(void)
940 return r; 941 return r;
941} 942}
942 943
944/* Make the coordinates even. There are some strange problems with OMAP and
945 * partial DSI update when the update widths are odd. */
946static void make_even(u16 *x, u16 *w)
947{
948 u16 x1, x2;
949
950 x1 = *x;
951 x2 = *x + *w;
952
953 x1 &= ~1;
954 x2 = ALIGN(x2, 2);
955
956 *x = x1;
957 *w = x2 - x1;
958}
959
943/* Configure dispc for partial update. Return possibly modified update 960/* Configure dispc for partial update. Return possibly modified update
944 * area */ 961 * area */
945void dss_setup_partial_planes(struct omap_dss_device *dssdev, 962void dss_setup_partial_planes(struct omap_dss_device *dssdev,
@@ -968,6 +985,8 @@ void dss_setup_partial_planes(struct omap_dss_device *dssdev,
968 return; 985 return;
969 } 986 }
970 987
988 make_even(&x, &w);
989
971 spin_lock_irqsave(&dss_cache.lock, flags); 990 spin_lock_irqsave(&dss_cache.lock, flags);
972 991
973 /* We need to show the whole overlay if it is scaled. So look for 992 /* We need to show the whole overlay if it is scaled. So look for
@@ -1029,6 +1048,8 @@ void dss_setup_partial_planes(struct omap_dss_device *dssdev,
1029 w = x2 - x1; 1048 w = x2 - x1;
1030 h = y2 - y1; 1049 h = y2 - y1;
1031 1050
1051 make_even(&x, &w);
1052
1032 DSSDBG("changing upd area due to ovl(%d) scaling %d,%d %dx%d\n", 1053 DSSDBG("changing upd area due to ovl(%d) scaling %d,%d %dx%d\n",
1033 i, x, y, w, h); 1054 i, x, y, w, h);
1034 } 1055 }