drm/i915/icl: use ranges for voltage level lookup
authorLucas De Marchi <lucas.demarchi@intel.com>
Mon, 10 Jun 2019 21:48:19 +0000 (14:48 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Tue, 11 Jun 2019 19:41:38 +0000 (12:41 -0700)
commit4f338ac0b2fa59ef0c10cb828a82922e1c39aa64
tree90726db9d2abff0cd9fe54b566f632ed86d86014
parent09a32cb7b45f7431e824b4778c89e4614dd841d0
drm/i915/icl: use ranges for voltage level lookup

Spec shows voltage level 0 as 307.2, 312, or lower and suggests to use
range checks. Prepare for having other frequencies in these ranges by
not comparing the exact frequency.

v2: invert checks by comparing biggest cdclk first (suggested by Ville)

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190610214819.9703-1-lucas.demarchi@intel.com
drivers/gpu/drm/i915/intel_cdclk.c