]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/i915/vrr: Use SCL for computing guardband
authorAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Wed, 24 Sep 2025 14:15:36 +0000 (19:45 +0530)
committerAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Thu, 25 Sep 2025 13:08:16 +0000 (18:38 +0530)
commitb811a7635ac2a0a8ca44bc91986237a71cbbbb9a
tree1f9588e864e6dbc79104e13c1e2550ead44703a8
parent6441d9038fa9dbc2d737368ee31a3388d7e90859
drm/i915/vrr: Use SCL for computing guardband

For now guardband is equal to the vblank length so ideally it should be
computed as difference between the vmin vtotal and vactive. However
since we are having few lines as SCL, we need to account for this while
computing the guardband.

Since the vblank start is moved by SCL lines from the vactive, the delta
between the vmin vtotal and new vblank start was used to account for this.
Now that SCL is explicitly tracked using the `set_context_latency` member,
use it directly in the guardband calculation.

In the future, when the guardband is shortened or optimized, we may need
to factor in both the change in the vblank start and SCL lines. For now,
explicitly accounting for SCL is sufficient.

v2: Fix typo: replace adjusted_mode->vdisplay with
adjusted_mode->crtc_vdisplay. (Ville)

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://lore.kernel.org/r/20250924141542.3122126-5-ankit.k.nautiyal@intel.com
drivers/gpu/drm/i915/display/intel_vrr.c