drm/i915/vrr: Fix guardband/vblank exit length calculation for adl+
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 2 Dec 2022 13:44:10 +0000 (15:44 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 8 Dec 2022 19:33:02 +0000 (21:33 +0200)
commit944bda740fc953d37d8a8a5506193c6031ecd2f9
tree29135f20a7c1f15cf6958f9e4b18a4175ae46c2b
parent98f974aa3c43f862826d2c05e3844536d0972ed4
drm/i915/vrr: Fix guardband/vblank exit length calculation for adl+

We are miscalculating both the guardband value, and the resulting
vblank exit length on adl+. This means that our start of vblank
(double buffered register latch point) is incorrect, and we also
think that it's not where it actually is (hence vblank evasion/etc.
may not work properly). Fix up the calculations to match the real
hardware behaviour (as reverse engineered by intel_display_poller).

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221202134412.21943-3-ville.syrjala@linux.intel.com
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
drivers/gpu/drm/i915/display/intel_vrr.c