drm/rockchip: vop2: set config done critical time to lase 1/8 frame

According to test, 1/4 frame will cost a wait for 4ms, 1/8 frame
cost a wait for 1~2ms, I think 1~2ms is enough for a config done
write.

Change-Id: I6ba46a8a2cb97434998376e85e5b5fc7a53a9616
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
This commit is contained in:
Andy Yan
2021-01-29 19:55:24 +08:00
committed by Tao Huang
parent 71c908a825
commit 5dbfb27c04

View File

@@ -789,8 +789,8 @@ static inline void vop2_cfg_done(struct drm_crtc *crtc)
done_vp = &vop2->vps[vp_id];
adjusted_mode = &done_vp->crtc.state->adjusted_mode;
vcnt = vop2_read_vcnt(done_vp);
/* if close to the last 1/4 frame, wait to next frame */
if (vcnt > (adjusted_mode->crtc_vtotal * 3 >> 2)) {
/* if close to the last 1/8 frame, wait to next frame */
if (vcnt > (adjusted_mode->crtc_vtotal * 7 >> 3)) {
vop2_wait_for_fs_by_vcnt(done_vp, vcnt);
done_bits = 0;
}