aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorFancy Fang <chen.fang@freescale.com>2014-07-17 00:35:59 -0400
committerFancy Fang <chen.fang@freescale.com>2014-07-17 21:14:30 -0400
commit954e1ef80e9874a4790ce7d4b5b277e8c756bfde (patch)
treee02b3b1dd3a0ee885fc36804cd5e6fa248c181ba /drivers/video
parent3bea30ff471c8fc1e546be26a8625e6aa425d5aa (diff)
ENGR00323172 EPDC: there will be garbage when doing rotation unit test
Just as what the V4L2 PXP does, we should pass the drect w/h and output w/h accroding to the rotation angle. Signed-off-by: Fancy Fang <chen.fang@freescale.com> (cherry picked from commit bf95e3ee4131ce3ee78050f098704588766e8b07)
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/mxc/mxc_epdc_fb.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/video/mxc/mxc_epdc_fb.c b/drivers/video/mxc/mxc_epdc_fb.c
index e536e781db9e..6d4afe5e4cb7 100644
--- a/drivers/video/mxc/mxc_epdc_fb.c
+++ b/drivers/video/mxc/mxc_epdc_fb.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2010-2013 Freescale Semiconductor, Inc. 2 * Copyright (C) 2010-2014 Freescale Semiconductor, Inc.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by 5 * it under the terms of the GNU General Public License as published by
@@ -5330,21 +5330,26 @@ static int pxp_process_update(struct mxc_epdc_fb_data *fb_data,
5330 */ 5330 */
5331 proc_data->drect.top = 0; 5331 proc_data->drect.top = 0;
5332 proc_data->drect.left = 0; 5332 proc_data->drect.left = 0;
5333 proc_data->drect.width = proc_data->srect.width;
5334 proc_data->drect.height = proc_data->srect.height;
5335 5333
5336 /* PXP expects rotation in terms of degrees */ 5334 /* PXP expects rotation in terms of degrees */
5337 proc_data->rotate = fb_data->epdc_fb_var.rotate * 90; 5335 proc_data->rotate = fb_data->epdc_fb_var.rotate * 90;
5338 if (proc_data->rotate > 270) 5336 if (proc_data->rotate > 270)
5339 proc_data->rotate = 0; 5337 proc_data->rotate = 0;
5340 5338
5341 pxp_conf->out_param.width = update_region->width; 5339 /* Just as V4L2 PXP, we should pass the rotated values to PXP */
5342 pxp_conf->out_param.height = update_region->height; 5340 if ((proc_data->rotate == 90) || (proc_data->rotate == 270)) {
5343 5341 proc_data->drect.width = proc_data->srect.height;
5344 if ((proc_data->rotate == 90) || (proc_data->rotate == 270)) 5342 proc_data->drect.height = proc_data->srect.width;
5343 pxp_conf->out_param.width = update_region->height;
5344 pxp_conf->out_param.height = update_region->width;
5345 pxp_conf->out_param.stride = update_region->height; 5345 pxp_conf->out_param.stride = update_region->height;
5346 else 5346 } else {
5347 proc_data->drect.width = proc_data->srect.width;
5348 proc_data->drect.height = proc_data->srect.height;
5349 pxp_conf->out_param.width = update_region->width;
5350 pxp_conf->out_param.height = update_region->height;
5347 pxp_conf->out_param.stride = update_region->width; 5351 pxp_conf->out_param.stride = update_region->width;
5352 }
5348 5353
5349 /* For EPDC v2.0, we need output to be 64-bit 5354 /* For EPDC v2.0, we need output to be 64-bit
5350 * aligned since EPDC stride does not work. */ 5355 * aligned since EPDC stride does not work. */