Skip to content

Commit

Permalink
drm/i915/skl: use ranges for voltage level lookup
Browse files Browse the repository at this point in the history
Like was done for ICL, let's convert the voltage level lookup to use
frequency ranges rather than individual frequencies. For deciding the
voltage, the individual value doesn't really matter.

Signed-off-by: Lucas De Marchi <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
lucasdemarchi authored and evadot committed May 25, 2020
1 parent 87b61ee commit efd4da8
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions drivers/gpu/drm/i915/intel_cdclk.c
Original file line number Diff line number Diff line change
Expand Up @@ -809,20 +809,14 @@ static int skl_calc_cdclk(int min_cdclk, int vco)

static u8 skl_calc_voltage_level(int cdclk)
{
switch (cdclk) {
default:
case 308571:
case 337500:
return 0;
case 450000:
case 432000:
return 1;
case 540000:
return 2;
case 617143:
case 675000:
if (cdclk > 540000)
return 3;
}
else if (cdclk > 450000)
return 2;
else if (cdclk > 337500)
return 1;
else
return 0;
}

static void skl_dpll0_update(struct drm_i915_private *dev_priv,
Expand Down

0 comments on commit efd4da8

Please sign in to comment.