drm/i915/display/dp: Compute VRR state in atomic_check
authorManasi Navare <manasi.d.navare@intel.com>
Fri, 22 Jan 2021 23:26:35 +0000 (15:26 -0800)
committerManasi Navare <manasi.d.navare@intel.com>
Mon, 25 Jan 2021 23:22:59 +0000 (15:22 -0800)
commit117cd09ba52857a60dc5d7f61941046625d8ff5a
treeee34c716d869172f51f6d14d39f4bea290074876
parent06d6fda506cf2745ec9e34d32cff6222917fbb71
drm/i915/display/dp: Compute VRR state in atomic_check

This forces a complete modeset if vrr drm crtc state goes
from enabled to disabled and vice versa.
This patch also computes vrr state variables from the mode timings
and based on the vrr property set by userspace as well as hardware's
vrr capability.

v2:
*Rebase
v3:
* Vmin = max (vtotal, vmin) (Manasi)
v4:
* set crtc_state->vrr.enable = 0 for disable request
v5:
* drm_dbg_kms, squash crtc states def patch (Jani N)
v6:
* Move vrr modeset check to separate function (Jani N)
v7:
* Ville's fixes - vmin, vmax rename, fix rounding dir
* Add pipeline full, flipline to crtc state
* Pass conn state to vrr_compute_config (Ville)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Jani Nikula <jani.nikula@linux.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-6-manasi.d.navare@intel.com
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_display_types.h
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/display/intel_vrr.c
drivers/gpu/drm/i915/display/intel_vrr.h