From d2201a16c94fe1f904e5c52f44debc077676cb10 Mon Sep 17 00:00:00 2001 From: Robby Cai Date: Thu, 23 Apr 2015 19:20:15 +0800 Subject: 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 (cherry picked from commit 390aa79dfd960ebb9b245c8ab9aa2c951a94cb78) --- drivers/video/mxc/mxc_epdc_v2_fb.c | 19 ++++++++++++------- 1 file 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. */ -- cgit v1.2.3