drm/i915/vrr: Make registers latch in a consitent place on icl/tgl
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 2 Dec 2022 13:44:09 +0000 (15:44 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 8 Dec 2022 19:32:09 +0000 (21:32 +0200)
commit98f974aa3c43f862826d2c05e3844536d0972ed4
treeec9246c3e609b411c7006057acf9bba07cfbe197
parenta467a243554a64b418c14d7531a3b18c03d53bff
drm/i915/vrr: Make registers latch in a consitent place on icl/tgl

Account for the framestart delay when calculating the "pipeline full"
value for icl/tgl vrr. This puts the start of vblank (ie. where the
double bufferd registers get latched) to a consistent place regardless
of what framestart delay value is used. framestart delay does not
change where start of vblank occurs in non-vrr mode and I can't see
any reason why we'd want different behaviour in vrr mode.

Currently framestart delay is always set to 1, and the hardcoded 4
scanlines in the code means we're currently delaying the start of
vblank by three extra lines. And with framestart delay set to 4 we'd
have no extra delay.

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