diff options
| -rw-r--r-- | drivers/video/omap2/dss/manager.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c index 0820986d4a68..32ec2ff2e9cf 100644 --- a/drivers/video/omap2/dss/manager.c +++ b/drivers/video/omap2/dss/manager.c | |||
| @@ -940,6 +940,22 @@ static int configure_dispc(void) | |||
| 940 | return r; | 940 | return r; |
| 941 | } | 941 | } |
| 942 | 942 | ||
| 943 | /* Make the coordinates even. There are some strange problems with OMAP and | ||
| 944 | * partial DSI update when the update widths are odd. */ | ||
| 945 | static void make_even(u16 *x, u16 *w) | ||
| 946 | { | ||
| 947 | u16 x1, x2; | ||
| 948 | |||
| 949 | x1 = *x; | ||
| 950 | x2 = *x + *w; | ||
| 951 | |||
| 952 | x1 &= ~1; | ||
| 953 | x2 = ALIGN(x2, 2); | ||
| 954 | |||
| 955 | *x = x1; | ||
| 956 | *w = x2 - x1; | ||
| 957 | } | ||
| 958 | |||
| 943 | /* Configure dispc for partial update. Return possibly modified update | 959 | /* Configure dispc for partial update. Return possibly modified update |
| 944 | * area */ | 960 | * area */ |
| 945 | void dss_setup_partial_planes(struct omap_dss_device *dssdev, | 961 | void dss_setup_partial_planes(struct omap_dss_device *dssdev, |
| @@ -968,6 +984,8 @@ void dss_setup_partial_planes(struct omap_dss_device *dssdev, | |||
| 968 | return; | 984 | return; |
| 969 | } | 985 | } |
| 970 | 986 | ||
| 987 | make_even(&x, &w); | ||
| 988 | |||
| 971 | spin_lock_irqsave(&dss_cache.lock, flags); | 989 | spin_lock_irqsave(&dss_cache.lock, flags); |
| 972 | 990 | ||
| 973 | /* We need to show the whole overlay if it is scaled. So look for | 991 | /* We need to show the whole overlay if it is scaled. So look for |
| @@ -1029,6 +1047,8 @@ void dss_setup_partial_planes(struct omap_dss_device *dssdev, | |||
| 1029 | w = x2 - x1; | 1047 | w = x2 - x1; |
| 1030 | h = y2 - y1; | 1048 | h = y2 - y1; |
| 1031 | 1049 | ||
| 1050 | make_even(&x, &w); | ||
| 1051 | |||
| 1032 | DSSDBG("changing upd area due to ovl(%d) scaling %d,%d %dx%d\n", | 1052 | DSSDBG("changing upd area due to ovl(%d) scaling %d,%d %dx%d\n", |
| 1033 | i, x, y, w, h); | 1053 | i, x, y, w, h); |
| 1034 | } | 1054 | } |
