Skip to content

Commit 5792652

Browse files
kv2019ievadot
authored andcommitted
drm/i915: do AUD_FREQ_CNTRL state save on all gen9+ platforms
Replace the TGL/ICL specific platform checks with a more generic check using INTEL_GEN(). Fixes bug with broken audio after S3 resume on JSL platforms. An initial version of state save and restore of AUD_FREQ_CNTRL register was added for subset of platforms in commit 87c1694533c9 ("drm/i915: save AUD_FREQ_CNTRL state at audio domain suspend"). The state save has proven to work well and it is needed in newer platforms, so needs to be extended. Although the logic is not in practise needed on GEN9/10 systems, follow the hardware specification and apply state and restore on all gen9+ platforms. Bspec: 49281 Link: thesofproject/linux#1719 Signed-off-by: Kai Vehmanen <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Matt Roper <[email protected]>
1 parent a0a9dfb commit 5792652

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ static unsigned long i915_audio_component_get_power(struct device *kdev)
897897
ret = intel_display_power_get(dev_priv, POWER_DOMAIN_AUDIO);
898898

899899
if (dev_priv->audio_power_refcount++ == 0) {
900-
if (IS_TIGERLAKE(dev_priv) || IS_ICELAKE(dev_priv)) {
900+
if (INTEL_GEN(dev_priv) >= 9) {
901901
intel_de_write(dev_priv, AUD_FREQ_CNTRL,
902902
dev_priv->audio_freq_cntrl);
903903
drm_dbg_kms(&dev_priv->drm,
@@ -1183,7 +1183,7 @@ static void i915_audio_component_init(struct drm_i915_private *dev_priv)
11831183
}
11841184
#endif
11851185

1186-
if (IS_TIGERLAKE(dev_priv) || IS_ICELAKE(dev_priv)) {
1186+
if (INTEL_GEN(dev_priv) >= 9) {
11871187
dev_priv->audio_freq_cntrl = intel_de_read(dev_priv,
11881188
AUD_FREQ_CNTRL);
11891189
drm_dbg_kms(&dev_priv->drm,

0 commit comments

Comments
 (0)