MLK-17803 drm/imx: dpu: kms: Correct the way to do DPR manual/auto mode switch
authorLiu Ying <victor.liu@nxp.com>
Wed, 14 Mar 2018 06:10:13 +0000 (14:10 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Tue, 20 Mar 2018 19:56:58 +0000 (14:56 -0500)
commitc9ed1aa2584e9f86368b8ac38b553eab86e0d686
treee3dd7a3e7a4fde76cc5ad954947eff78171696bb
parent2b0b07de5ceef81e9100221c819b1d7e743da474
MLK-17803 drm/imx: dpu: kms: Correct the way to do DPR manual/auto mode switch

The DPR works in manual mode for the first frame and we need to
switch it to auto mode so that auto shadow load mechanism works.
The designers require us to switch the DPR manual mode to auto mode
directly for display controllers instead of using the DPR control
done irq handler, because the irq will not come in some cases(which
leads to shadow load failure).  Finer switch operations on DPR
register bits are needed for SW_SHADOW_LOAD_SEL, SHADOW_LOAD_EN,
RUN_EN and REPEAT_EN.  Also, for overlay planes, we need to wait for
a frame additionally in the "on-the-fly" cases to make sure the
switch is successful.  In all, this patch should be able to address
frame dropping and screen tearing issue(due to the shadow load
failure) when users play video on overlay planes.

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