1. 11 Sep, 2019 2 commits
    • Matt Roper's avatar
      drm/i915: Use literal representation of cdclk tables · 736da811
      Matt Roper authored
      The bspec lays out legal cdclk frequencies, PLL ratios, and CD2X
      dividers in an easy-to-read table for most recent platforms.  We've been
      translating the data from that table into platform-specific code logic,
      but it's easy to overlook an area we need to update when adding new
      cdclk values or enabling new platforms.  Let's just add a form of the
      bspec table to the code and then adjust our functions to pull what they
      need directly out of the table.
      
      v2: Fix comparison when finding best cdclk.
      
      v3: Another logic fix for calc_cdclk.
      
      v4:
       - Use named initializers for cdclk tables. (Ville)
       - Include refclk as a field in the table instead of adding all three
         ratios for each entry. (Ville)
       - Terminate tables with an empty entry to avoid needing to store the
         table size. (Ville)
       - Don't try so hard to return reasonable values from our lookup
         functions if we get impossible inputs; just WARN and return 0.
         (Ville)
       - Keep a bxt_ prefix on the lookup functions since they're still only
         used on bxt+ for now.  We can rename them later if we extend this
         table-based approach back to older platforms.  (Ville)
      
      v5:
       - Fix cnl table's ratios for 24mhz refclk. (Ville)
       - Don't miss the named initializers on the cnl table. (Ville)
       - Represent refclk in table as u16 rather than u32. (Ville)
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190910161506.7158-1-matthew.d.roper@intel.com
      736da811
    • Matt Roper's avatar
      drm/i915: Consolidate bxt/cnl/icl cdclk readout · 71dc367e
      Matt Roper authored
      Aside from a few minor register changes and some different clock values,
      cdclk design hasn't changed much since gen9lp.  Let's consolidate the
      handlers for bxt, cnl, and icl to keep the codeflow consistent.
      
      Also, while we're at it, s/bxt_de_pll_update/bxt_de_pll_readout/ since
      "update" makes me think we should be writing to hardware rather than
      reading from it.
      
      v2:
       - Fix icl_calc_voltage_level() limits.  (Ville)
       - Use CNL_CDCLK_PLL_RATIO_MASK rather than BXT_DE_PLL_RATIO_MASK on
         gen10+ to avoid confusion.  (Ville)
      
      v3:
       - Also fix ehl_calc_voltage_level() limits.  (Ville)
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Suggested-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190910160520.6587-1-matthew.d.roper@intel.com
      71dc367e
  2. 10 Sep, 2019 10 commits
  3. 09 Sep, 2019 6 commits
  4. 06 Sep, 2019 6 commits
  5. 05 Sep, 2019 8 commits
  6. 04 Sep, 2019 8 commits