drm/i915/display/vrr: Send VRR push to flip the frame
authorManasi Navare <manasi.d.navare@intel.com>
Fri, 22 Jan 2021 23:26:40 +0000 (15:26 -0800)
committerManasi Navare <manasi.d.navare@intel.com>
Mon, 25 Jan 2021 23:23:17 +0000 (15:23 -0800)
commit13c6d51f530dcea38ae71d54e29b3507615e8b4b
treed27385d5ec36420dca5a648b39b4bfb9840132b9
parentaa52b39dc554de07ef7a9eb5c80b487ebbde7e7c
drm/i915/display/vrr: Send VRR push to flip the frame

VRR achieves vblank stretching using the HW PUSH functionality.
So once the VRR is enabled during modeset then for each flip
request from userspace, in the atomic tail pipe_update_end()
we need to set the VRR push bit in HW for it to terminate
the vblank at configured flipline or anytime after flipline
or latest at the Vmax.

The HW clears the PUSH bit after the double buffer updates
are completed.

v2:
* Move send push to after irq en (Manasi)
* Call send push unconditionally (Jani N)

v3:
* Stall w.r.t Vrr vmax (Manasi, Gary Smith)

v4:
* Remove the rmw (Ville)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Gary Smith <gary.k.smith@intel.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210122232647.22688-11-manasi.d.navare@intel.com
drivers/gpu/drm/i915/display/intel_sprite.c
drivers/gpu/drm/i915/display/intel_vrr.c
drivers/gpu/drm/i915/display/intel_vrr.h