Skip to content

Commit 2581547

Browse files
committed
drm/i915/cdclk: Give the squash waveform length a name
Replace the slightly magic 'size = 16' with a bit more descriptive name. We'll have another user for this value later on. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231128115138.13238-3-ville.syrjala@linux.intel.com Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
1 parent e2e1916 commit 2581547

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/gpu/drm/i915/display/intel_cdclk.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1800,6 +1800,8 @@ static bool cdclk_pll_is_unknown(unsigned int vco)
18001800
return vco == ~0;
18011801
}
18021802

1803+
static const int cdclk_squash_len = 16;
1804+
18031805
static int cdclk_squash_divider(u16 waveform)
18041806
{
18051807
return hweight16(waveform ?: 0xffff);
@@ -1811,7 +1813,6 @@ static bool cdclk_compute_crawl_and_squash_midpoint(struct drm_i915_private *i91
18111813
struct intel_cdclk_config *mid_cdclk_config)
18121814
{
18131815
u16 old_waveform, new_waveform, mid_waveform;
1814-
int size = 16;
18151816
int div = 2;
18161817

18171818
/* Return if PLL is in an unknown state, force a complete disable and re-enable. */
@@ -1850,7 +1851,8 @@ static bool cdclk_compute_crawl_and_squash_midpoint(struct drm_i915_private *i91
18501851
}
18511852

18521853
mid_cdclk_config->cdclk = DIV_ROUND_CLOSEST(cdclk_squash_divider(mid_waveform) *
1853-
mid_cdclk_config->vco, size * div);
1854+
mid_cdclk_config->vco,
1855+
cdclk_squash_len * div);
18541856

18551857
/* make sure the mid clock came out sane */
18561858

0 commit comments

Comments
 (0)