MLK-15110-20 gpu: imx: dpu: fetcheco: Fixup stride when we use prefetch
authorLiu Ying <victor.liu@nxp.com>
Tue, 1 Aug 2017 03:28:16 +0000 (11:28 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Tue, 20 Mar 2018 19:50:53 +0000 (14:50 -0500)
commitbff1e76dfac15a32cdcd285e6cb778b0a1d71164
treeba2e308ccfaaeb3482b6e6a47182097b603d11dc
parent959fd70db3a694eac0c193ae6acd6b40a5ed6bcd
MLK-15110-20 gpu: imx: dpu: fetcheco: Fixup stride when we use prefetch

When we use prefetch, we use DPR and PRG to do frame input cropping.
Thus, the stride of fetcheco is the stride of cropped frame, which means
the value of the stride is cropped_width * bytes_per_pixel.  Since the
pixel format has to be NV12 or NV21 when we use prefetch, we assume the
cropped_width stands for how many UV we have in bytes for one line, while
bytes_per_pixel should be 8bits for every U or V component.  Also, to
address TKT339017, when we use prefetch engine for fetcheco, we need to
round the stride up to the fetcheco burst size, i.e., burst length
multiplies 8 bytes.  According to TKT343664, the buffer base address has
to align to burst size, so we'll pick an appropriate burst size value in
fetcheco_source_stride().

Signed-off-by: Liu Ying <victor.liu@nxp.com>
drivers/gpu/drm/imx/dpu/dpu-plane.c
drivers/gpu/imx/dpu/dpu-fetcheco.c
include/video/dpu.h