mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 20:54:03 +02:00
drm/i915/panel: Preserve Vtotal-Vsync distance while adjusting vtotal
As we increase the vtotal to accommodate lower resfresh rate for fixed modes, adjust the vtotal-vsync distance also. v2: Rename vsync_*_diff to vsync_*_offset for clarity. (Ville) Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20260609025325.1128543-3-ankit.k.nautiyal@intel.com
This commit is contained in:
parent
485356a428
commit
b28c1929d7
|
|
@ -237,11 +237,18 @@ int intel_panel_compute_config(struct intel_connector *connector,
|
|||
|
||||
drm_mode_copy(adjusted_mode, fixed_mode);
|
||||
|
||||
if (is_vrr && fixed_mode_vrefresh != vrefresh)
|
||||
if (is_vrr && fixed_mode_vrefresh != vrefresh) {
|
||||
int vsync_start_offset = adjusted_mode->vtotal - adjusted_mode->vsync_start;
|
||||
int vsync_end_offset = adjusted_mode->vtotal - adjusted_mode->vsync_end;
|
||||
|
||||
adjusted_mode->vtotal =
|
||||
DIV_ROUND_CLOSEST(adjusted_mode->clock * 1000,
|
||||
adjusted_mode->htotal * vrefresh);
|
||||
|
||||
adjusted_mode->vsync_start = adjusted_mode->vtotal - vsync_start_offset;
|
||||
adjusted_mode->vsync_end = adjusted_mode->vtotal - vsync_end_offset;
|
||||
}
|
||||
|
||||
drm_mode_set_crtcinfo(adjusted_mode, 0);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user