MLK-16255-6 video: fbdev: dcss: use aligned width to calc pitch for DPR
authorFancy Fang <chen.fang@nxp.com>
Fri, 25 Aug 2017 10:14:39 +0000 (18:14 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:36:46 +0000 (15:36 -0500)
After alignment handling for DPR, the aligned width
may be larger than the same as original width, so
use the aligned width to calculate the pitch for
DPR.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
drivers/video/fbdev/mxc/imx_dcss.c

index 92a1249..68bc939 100644 (file)
@@ -1516,9 +1516,8 @@ static int dcss_dpr_config(uint32_t dpr_ch, struct dcss_info *info)
                return -EINVAL;
        }
 
-       /* TODO: calculate pitch for different formats */
        /* config pitch */
-       pitch = (var->xres * (var->bits_per_pixel >> 3)) << 16;
+       pitch = (num_pix_x * (var->bits_per_pixel >> 3)) << 16;
        fill_sb(cb, chan_info->dpr_addr + 0x70, pitch);
 
        fill_sb(cb, chan_info->dpr_addr + 0x200, 0x38);