summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFancy Fang <chen.fang@freescale.com>2014-07-17 12:35:59 +0800
committerFancy Fang <chen.fang@freescale.com>2014-07-18 09:14:30 +0800
commit954e1ef80e9874a4790ce7d4b5b277e8c756bfde (patch)
treee02b3b1dd3a0ee885fc36804cd5e6fa248c181ba
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)
-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 @@
/*
- * Copyright (C) 2010-2013 Freescale Semiconductor, Inc.
+ * Copyright (C) 2010-2014 Freescale Semiconductor, Inc.
*
* This program is free software; you can redistribute it and/or modify
* 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,
*/
proc_data->drect.top = 0;
proc_data->drect.left = 0;
- proc_data->drect.width = proc_data->srect.width;
- proc_data->drect.height = proc_data->srect.height;
/* PXP expects rotation in terms of degrees */
proc_data->rotate = fb_data->epdc_fb_var.rotate * 90;
if (proc_data->rotate > 270)
proc_data->rotate = 0;
- pxp_conf->out_param.width = update_region->width;
- pxp_conf->out_param.height = update_region->height;
-
- if ((proc_data->rotate == 90) || (proc_data->rotate == 270))
+ /* Just as V4L2 PXP, we should pass the rotated values to PXP */
+ if ((proc_data->rotate == 90) || (proc_data->rotate == 270)) {
+ proc_data->drect.width = proc_data->srect.height;
+ proc_data->drect.height = proc_data->srect.width;
+ pxp_conf->out_param.width = update_region->height;
+ pxp_conf->out_param.height = update_region->width;
pxp_conf->out_param.stride = update_region->height;
- else
+ } else {
+ proc_data->drect.width = proc_data->srect.width;
+ proc_data->drect.height = proc_data->srect.height;
+ pxp_conf->out_param.width = update_region->width;
+ pxp_conf->out_param.height = update_region->height;
pxp_conf->out_param.stride = update_region->width;
+ }
/* For EPDC v2.0, we need output to be 64-bit
* aligned since EPDC stride does not work. */