mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
drm/rockchip: vop2: adjust VOP aclk mode according to line duration
Some panel resolution is less than 2560 but pixel clock/fps is relatively large, In this scene, VOP aclk need enter advance mode to make sure VOP performance is enough. 4kp60 line duration is roughly equal to 7500 ns, so we add a condition(linedur_ns < 7500) to enter VOP aclk advance mode. Signed-off-by: Sandy Huang <hjc@rock-chips.com> Change-Id: I50e15e8b05cfcf3c92704b8d96287099ce851686
This commit is contained in:
@@ -199,9 +199,13 @@ static int rockchip_drm_aclk_adjust(struct drm_device *dev,
|
||||
|
||||
funcs = priv->crtc_funcs[drm_crtc_index(crtc)];
|
||||
if (funcs && funcs->set_aclk) {
|
||||
struct drm_display_mode *mode = &crtc->state->adjusted_mode;
|
||||
int linedur_ns = div_u64((u64) mode->crtc_htotal * 1000000, mode->crtc_clock);
|
||||
|
||||
if (vop_bw_info->plane_num_4k || crtc_num > 1 ||
|
||||
crtc->state->adjusted_mode.crtc_hdisplay > 2560 ||
|
||||
crtc->state->adjusted_mode.crtc_vdisplay > 2560) {
|
||||
crtc->state->adjusted_mode.crtc_vdisplay > 2560 ||
|
||||
linedur_ns < 7500) {/* 4kp60 linedur_ns roughly equal to 7500 ns */
|
||||
funcs->set_aclk(crtc, ROCKCHIP_VOP_ACLK_ADVANCED_MODE, vop_bw_info);
|
||||
priv->aclk_adjust_frame_num = 2;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user