Skip to content

Commit 0cb89cd

Browse files
vsyrjalajnikula
authored andcommitted
drm/i915: Bump GLK CDCLK frequency when driving multiple pipes
On GLK CDCLK frequency needs to be at least 2*96 MHz when accessing the audio hardware. Currently we bump the CDCLK frequency up temporarily (if not high enough already) whenever audio hardware is being accessed, and drop it back down afterwards. With a single active pipe this works just fine as we can switch between all the valid CDCLK frequencies by changing the cd2x divider, which doesn't require a full modeset. However with multiple active pipes the cd2x divider trick no longer works, and thus we end up blinking all displays off and back on. To avoid this let's just bump the CDCLK frequency to >=2*96MHz whenever multiple pipes are active. The downside is slightly higher power consumption, but that seems like an acceptable tradeoff. With a single active pipe we can stick to the current more optiomal (from power comsumption POV) behaviour. Cc: [email protected] Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9599 Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]> (cherry picked from commit 451eaa1) Signed-off-by: Jani Nikula <[email protected]>
1 parent 0ad755f commit 0cb89cd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2750,6 +2750,18 @@ static int intel_compute_min_cdclk(struct intel_cdclk_state *cdclk_state)
27502750
for_each_pipe(dev_priv, pipe)
27512751
min_cdclk = max(cdclk_state->min_cdclk[pipe], min_cdclk);
27522752

2753+
/*
2754+
* Avoid glk_force_audio_cdclk() causing excessive screen
2755+
* blinking when multiple pipes are active by making sure
2756+
* CDCLK frequency is always high enough for audio. With a
2757+
* single active pipe we can always change CDCLK frequency
2758+
* by changing the cd2x divider (see glk_cdclk_table[]) and
2759+
* thus a full modeset won't be needed then.
2760+
*/
2761+
if (IS_GEMINILAKE(dev_priv) && cdclk_state->active_pipes &&
2762+
!is_power_of_2(cdclk_state->active_pipes))
2763+
min_cdclk = max(2 * 96000, min_cdclk);
2764+
27532765
if (min_cdclk > dev_priv->display.cdclk.max_cdclk_freq) {
27542766
drm_dbg_kms(&dev_priv->drm,
27552767
"required cdclk (%d kHz) exceeds max (%d kHz)\n",

0 commit comments

Comments
 (0)