drm/i915/cdclk: Only compute squash waveform when necessary
authorGustavo Sousa <gustavo.sousa@intel.com>
Tue, 12 Mar 2024 16:36:34 +0000 (13:36 -0300)
committerLucas De Marchi <lucas.demarchi@intel.com>
Wed, 13 Mar 2024 12:46:45 +0000 (05:46 -0700)
commit452269e2f0ea180a4bc39fd4643df7fe2ea0bb8e
tree999628d8a324bfb53c4c5d1acfb32daed66f8dff
parent5372a54d7a3cf32c761d2896276b72b495bcb497
drm/i915/cdclk: Only compute squash waveform when necessary

It is no use computing the squash waveform if we are not going to use
it. Move the call to cdclk_squash_waveform() inside the block guarded by
HAS_CDCLK_SQUASH(dev_priv).

v2:
  - Move "u16 waveform" declaration to inside the block where it is
    initialized and used. (Matt)

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240312163639.172321-4-gustavo.sousa@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/i915/display/intel_cdclk.c