drm/i915/vrr: Be more careful with the bits in TRANS_VRR_CTL
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 2 Dec 2022 13:44:12 +0000 (15:44 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 8 Dec 2022 19:34:25 +0000 (21:34 +0200)
commit2ac5438ca9226c70ef37e81bd6b6c997017ae081
treee20b216b2150db8b7d65d63dc55e6c700e026da6
parent0504d0acc282fe99cf4bd0cdc5551b352357142f
drm/i915/vrr: Be more careful with the bits in TRANS_VRR_CTL

On mtl (at least) clearing the guardband bits in the same write
as the enable bit gets cleared seems to cause an immediate FIFO
underrun. Thus is seems that we need to first clear just the
enable bit, then wait for the VRR live status to indicate the
transcoder has exited VRR mode (this step is documented in Bspec
as well), and finally we can clear out the rest of the TRANS_VRR_CTL
for good measure.

I did this without any RMWs in case we want to toggle VRR on/off
via DSB in the future, and as we know DSB can't read registers.

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