drm/i915/cdclk: Remove the assumption that cdclk divider==2 when using squashing
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 11 Dec 2023 22:16:36 +0000 (00:16 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 13 Dec 2023 18:49:18 +0000 (20:49 +0200)
commite1a914aef28f39aec5f107f31478d95aff3ae6db
tree1a38ddf410948c8936bb5060cc4f44cd022de42c
parent2581547335ff8acd877f1acd4ee57527eaaa0bde
drm/i915/cdclk: Remove the assumption that cdclk divider==2 when using squashing

Currently we have a hardcoded assumption that the cdclk divider
(2*cd2x divider) is always 2 when squashing is used. While that
is true for all current platforms it might not hold in the future.
So eliminate the assumption and calculate the correct divider
from the other parameters.

v2: s/cd2x divider/cdclk divider/ (Gustavo)
    s/clock/unsquashed_cdclk/ (Gustavo)

Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231211221636.29658-1-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_cdclk.c