mbox series

[v2,0/3] Use ranges for voltage level lookup

Message ID 20190610214449.9447-1-lucas.demarchi@intel.com (mailing list archive)
Headers show
Series Use ranges for voltage level lookup | expand

Message

Lucas De Marchi June 10, 2019, 9:44 p.m. UTC
Version 2 of https://patchwork.freedesktop.org/series/61742/, this time
applied to all possible platforms, not only Ice Lake.

I also changed the if else chain to use big to small frequency values
according to the suggestion from Ville.

$ git grep -e "static.*_calc_voltage_level" -- drivers/gpu/drm/i915
drivers/gpu/drm/i915/intel_cdclk.c:static u8 vlv_calc_voltage_level(struct drm_i915_private *dev_priv, int cdclk)
drivers/gpu/drm/i915/intel_cdclk.c:static u8 bdw_calc_voltage_level(int cdclk)
drivers/gpu/drm/i915/intel_cdclk.c:static u8 skl_calc_voltage_level(int cdclk)
drivers/gpu/drm/i915/intel_cdclk.c:static u8 bxt_calc_voltage_level(int cdclk)
drivers/gpu/drm/i915/intel_cdclk.c:static u8 cnl_calc_voltage_level(int cdclk)
drivers/gpu/drm/i915/intel_cdclk.c:static u8 icl_calc_voltage_level(int cdclk)


vlv: already using ranges (and not applicable for chv)
bdw: not applicable as levels don't respect the ranges (confirmed in
     spec, too)
bxt: not applicable as it just divides the cdclk

The rest is in this series.

Lucas De Marchi (3):
  drm/i915/icl: use ranges for voltage level lookup
  drm/i915/cnl: use ranges for voltage level lookup
  drm/i915/skl: use ranges for voltage level lookup

 drivers/gpu/drm/i915/intel_cdclk.c | 52 ++++++++++--------------------
 1 file changed, 17 insertions(+), 35 deletions(-)