• Ville Syrjälä's avatar
    drm/i915/display: Do both crawl and squash when changing cdclk · 25e0e5ae
    Ville Syrjälä authored
    For MTL, changing cdclk from between certain frequencies has
    both squash and crawl. Use the current cdclk config and
    the new(desired) cdclk config to construct a mid cdclk config.
    Set the cdclk twice:
    - Current cdclk -> mid cdclk
    - mid cdclk -> desired cdclk
    
    Driver should not take some Pcode mailbox communication
    in the cdclk path for platforms that are Display version 14 and later.
    
    v2: Add check in intel_modeset_calc_cdclk() to avoid cdclk
    change via modeset for platforms that support squash_crawl sequences(Ville)
    
    v3: Add checks for:
    - scenario where only slow clock is used and
    cdclk is actually 0 (bringing up display).
    - PLLs are on before looking up the waveform.
    - Squash and crawl capability checks.(Ville)
    
    v4: Rebase
    - Move checks to be more consistent (Ville)
    - Add comments (Bala)
    v5:
    - Further small changes. Move checks around.
    - Make if-else better looking (Ville)
    
    v6: MTl should not follow PUnit mailbox communication as the rest of
    gen11+ platforms.(Anusha)
    
    Cc: Clint Taylor <Clinton.A.Taylor@intel.com>
    Cc: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
    Signed-off-by: default avatarAnusha Srivatsa <anusha.srivatsa@intel.com>
    Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20221117230002.792096-2-anusha.srivatsa@intel.com
    25e0e5ae
intel_cdclk.c 96 KB