aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHomin Lee <homin.lee@ti.com>2011-03-15 20:20:01 +0900
committerPraneeth Bajjuri <praneeth@ti.com>2011-04-25 17:28:13 -0500
commit241b258257b770b93155ce1d05b155ace1916939 (patch)
tree1d992e904030b14d16e4b1a8b0ab585e175e040f
parent7fbff579da1dff7c5fbfede65ad45f9b4b34a56e (diff)
downloadpandroid-241b258257b770b93155ce1d05b155ace1916939.tar.gz
OMAP3: V4L2: Fixed to overlay's start position not to be modified by rotation degrees.
Start position of overlay shouldn't be modified by rotation degrees. In OMAP3, it did swap start position (info->pos_x and info->pox_y) in case of rotation is 90 or 270. In Android, this causes mess playback screen when the video clip has rotation info, 90 or 270. In OMAP4, it did not swap the start position. I think they already found above bug in their arch and fixed only for OMAP4 because of not sure how the overlay works in other arch. Change-Id: I879c7653bcbd5d8f24488154ddae395b527a62ae Signed-off-by: Homin Lee <homin.lee@ti.com>
-rw-r--r--drivers/media/video/omap/omap_vout.c34
1 files changed, 5 insertions, 29 deletions
diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/video/omap/omap_vout.c
index 8c35f54703d..85a59cb69ca 100644
--- a/drivers/media/video/omap/omap_vout.c
+++ b/drivers/media/video/omap/omap_vout.c
@@ -496,38 +496,19 @@ static void calc_overlay_window_params(struct omap_vout_device *vout,
timing = &ovl->manager->device->panel.timings;
switch (vout->rotation) {
case dss_rotation_90_degree:
- /* Invert the height and width for 90 and 270 degree rotation */
- temp = info->out_width;
- info->out_width = info->out_height;
- info->out_height = temp;
-#ifndef CONFIG_ARCH_OMAP4
- info->pos_y = (timing->y_res - win->w.width) - win->w.left;
- info->pos_x = win->w.top;
-#endif
- break;
-
- case dss_rotation_180_degree:
-#ifndef CONFIG_ARCH_OMAP4
- info->pos_x = (timing->x_res - win->w.width) - win->w.left;
- info->pos_y = (timing->y_res - win->w.height) - win->w.top;
-#endif
- break;
-
case dss_rotation_270_degree:
+ /* Invert the height and width for 90 and 270 degree rotation */
temp = info->out_width;
info->out_width = info->out_height;
info->out_height = temp;
-#ifndef CONFIG_ARCH_OMAP4
- info->pos_y = win->w.left;
- info->pos_x = (timing->x_res - win->w.height) - win->w.top;
-#endif
break;
+ case dss_rotation_180_degree:
default:
info->pos_x = win->w.left;
info->pos_y = win->w.top;
break;
- }
+ }
}
/*
@@ -2169,13 +2150,8 @@ static int vidioc_s_fmt_vid_out(struct file *file, void *fh,
if (dev_buf_type & OMAP_FLAG_IDEV)
multiplier = 2;
- if (!cpu_is_omap44xx() && rotate_90_or_270(vout)) {
- vout->fbuf.fmt.height = timing->x_res;
- vout->fbuf.fmt.width = timing->y_res * multiplier;
- } else {
- vout->fbuf.fmt.height = timing->y_res * multiplier;
- vout->fbuf.fmt.width = timing->x_res;
- }
+ vout->fbuf.fmt.height = timing->y_res * multiplier;
+ vout->fbuf.fmt.width = timing->x_res;
/* change to samller size is OK */