drm/rockchip: vop2: Support hdmi fva

Change-Id: If999183facd14678d6a8124efb1fc3a79bd43a79
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
This commit is contained in:
Algea Cao
2025-04-01 10:51:03 +08:00
parent 5a89a1cb8b
commit 4f0e1facb7
2 changed files with 5 additions and 3 deletions

View File

@@ -270,6 +270,7 @@ struct rockchip_hdmi_vrr_state {
bool refresh_rate_ready_to_change;
bool m_const;
u8 next_tfr_val;
u8 fva_factor_m1_val;
unsigned int vrr_frame_cnt;
const struct mvrr_const_val *mconst_val;
};

View File

@@ -9028,6 +9028,7 @@ static bool vop2_crtc_mode_fixup(struct drm_crtc *crtc,
struct rockchip_crtc_state *vcstate = to_rockchip_crtc_state(new_crtc_state);
drm_mode_set_crtcinfo(adj_mode, CRTC_INTERLACE_HALVE_V | CRTC_STEREO_DOUBLE);
/*
* For RK3568 and RK3588, the hactive of video timing must
* be 4-pixel aligned.
@@ -12590,9 +12591,9 @@ static void vop2_crtc_vfp_seamless_switch(struct drm_crtc *crtc)
vrefresh = drm_mode_vrefresh(adjust_mode);
/* calculate new vfp for new refresh rate */
new_vtotal = adjust_mode->vtotal * vrefresh / vcstate->request_refresh_rate;
vfp = adjust_mode->vsync_start - adjust_mode->vdisplay;
new_vfp = vfp + new_vtotal - adjust_mode->vtotal;
new_vtotal = adjust_mode->crtc_vtotal * vrefresh / vcstate->request_refresh_rate;
vfp = adjust_mode->crtc_vsync_start - adjust_mode->crtc_vdisplay;
new_vfp = vfp + new_vtotal - adjust_mode->crtc_vtotal;
}
vop2_crtc_update_vrr_timing(crtc, new_vtotal, new_vfp);
}