summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Cai <r63905@freescale.com>2015-04-23 19:20:15 +0800
committerFrank Li <Frank.Li@freescale.com>2015-04-24 23:04:21 +0800
commitd2201a16c94fe1f904e5c52f44debc077676cb10 (patch)
tree8994b3af26921e58ebc8b9375f6b54e86d3158cd
parent4a96730b90b8a61036d0a86ccaa458e0c1aa9212 (diff)
MLK-10736 epdc: update rotation configuration according to pxp driver change
The commit c01cdab21b1e3cc045f40f29ca0d9292d238ffda introduced a different configuration for rotation case in PxP driver, that is, it requires the rotated width and height value. Thus EPDC driver, the user of PxP driver should also adjust accordingly. Signed-off-by: Robby Cai <r63905@freescale.com> (cherry picked from commit 390aa79dfd960ebb9b245c8ab9aa2c951a94cb78)
-rw-r--r--drivers/video/mxc/mxc_epdc_v2_fb.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/video/mxc/mxc_epdc_v2_fb.c b/drivers/video/mxc/mxc_epdc_v2_fb.c
index d0a538c59c21..403a502ce269 100644
--- a/drivers/video/mxc/mxc_epdc_v2_fb.c
+++ b/drivers/video/mxc/mxc_epdc_v2_fb.c
@@ -6013,21 +6013,26 @@ static int pxp_legacy_process(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))
+ /* 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. */