From 30af65e52c8a345d2d50d951cf35dba6927c111f Mon Sep 17 00:00:00 2001 From: Fancy Fang Date: Fri, 25 Aug 2017 18:14:39 +0800 Subject: [PATCH] MLK-16255-6 video: fbdev: dcss: use aligned width to calc pitch for DPR 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 --- drivers/video/fbdev/mxc/imx_dcss.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/video/fbdev/mxc/imx_dcss.c b/drivers/video/fbdev/mxc/imx_dcss.c index 92a12498b3f7..68bc93979da4 100644 --- a/drivers/video/fbdev/mxc/imx_dcss.c +++ b/drivers/video/fbdev/mxc/imx_dcss.c @@ -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);