diff options
author | Robby Cai <r63905@freescale.com> | 2015-04-23 19:20:15 +0800 |
---|---|---|
committer | guoyin.chen <guoyin.chen@freescale.com> | 2015-05-08 17:26:48 +0800 |
commit | ef438cdc50734a509813d8ef9fa58b9eafc71fbc (patch) | |
tree | 55abb4403c39eecb9ad586e65b7b137bc9d5fc93 /drivers | |
parent | 6b8d5b6cfe3447940cb90f1d7cb3560a8f6f504a (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)
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/mxc/mxc_epdc_v2_fb.c | 19 |
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. */ |