[Intel-gfx] [PATCH] drm/i915: save state of AUD_FREQ_CNTRL on all gen9+ platforms

Kai Vehmanen kai.vehmanen at linux.intel.com
Tue Dec 31 14:47:18 UTC 2019


On old platforms the default values of AUD_FREQ_CNTRL are
typically used (as set by BIOS), so this has not been an issue,
but future platforms will definitely need this. Extend the state
save logic to cover all gen9+ platforms.

Bspec: 49281
Cc: Matt Roper <matthew.d.roper at intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen at linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_audio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c
index 27710098d056..e6517c5d83ae 100644
--- a/drivers/gpu/drm/i915/display/intel_audio.c
+++ b/drivers/gpu/drm/i915/display/intel_audio.c
@@ -849,7 +849,7 @@ static unsigned long i915_audio_component_get_power(struct device *kdev)
 	ret = intel_display_power_get(dev_priv, POWER_DOMAIN_AUDIO);
 
 	if (dev_priv->audio_power_refcount++ == 0) {
-		if (IS_TIGERLAKE(dev_priv) || IS_ICELAKE(dev_priv)) {
+		if (INTEL_GEN(dev_priv) >= 9) {
 			I915_WRITE(AUD_FREQ_CNTRL, dev_priv->audio_freq_cntrl);
 			DRM_DEBUG_KMS("restored AUD_FREQ_CNTRL to 0x%x\n",
 				      dev_priv->audio_freq_cntrl);
@@ -1124,7 +1124,7 @@ static void i915_audio_component_init(struct drm_i915_private *dev_priv)
 		return;
 	}
 
-	if (IS_TIGERLAKE(dev_priv) || IS_ICELAKE(dev_priv)) {
+	if (INTEL_GEN(dev_priv) >= 9) {
 		dev_priv->audio_freq_cntrl = I915_READ(AUD_FREQ_CNTRL);
 		DRM_DEBUG_KMS("init value of AUD_FREQ_CNTRL of 0x%x\n",
 			      dev_priv->audio_freq_cntrl);
-- 
2.17.1



More information about the Intel-gfx mailing list