summaryrefslogtreecommitdiff
path: root/drivers/video/mxc/mxc_epdc_v2_fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/mxc/mxc_epdc_v2_fb.c')
-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. */