File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -852,10 +852,17 @@ static unsigned long i915_audio_component_get_power(struct device *kdev)
852
852
853
853
ret = intel_display_power_get (dev_priv , POWER_DOMAIN_AUDIO );
854
854
855
- /* Force CDCLK to 2*BCLK as long as we need audio to be powered. */
856
- if (dev_priv -> audio_power_refcount ++ == 0 )
855
+ if (dev_priv -> audio_power_refcount ++ == 0 ) {
856
+ if (IS_TIGERLAKE (dev_priv ) || IS_ICELAKE (dev_priv )) {
857
+ I915_WRITE (AUD_FREQ_CNTRL , dev_priv -> audio_freq_cntrl );
858
+ DRM_DEBUG_KMS ("restored AUD_FREQ_CNTRL to 0x%x\n" ,
859
+ dev_priv -> audio_freq_cntrl );
860
+ }
861
+
862
+ /* Force CDCLK to 2*BCLK as long as we need audio powered. */
857
863
if (IS_CANNONLAKE (dev_priv ) || IS_GEMINILAKE (dev_priv ))
858
864
glk_force_audio_cdclk (dev_priv , true);
865
+ }
859
866
860
867
return ret ;
861
868
}
@@ -1116,6 +1123,12 @@ static void i915_audio_component_init(struct drm_i915_private *dev_priv)
1116
1123
return ;
1117
1124
}
1118
1125
1126
+ if (IS_TIGERLAKE (dev_priv ) || IS_ICELAKE (dev_priv )) {
1127
+ dev_priv -> audio_freq_cntrl = I915_READ (AUD_FREQ_CNTRL );
1128
+ DRM_DEBUG_KMS ("init value of AUD_FREQ_CNTRL of 0x%x\n" ,
1129
+ dev_priv -> audio_freq_cntrl );
1130
+ }
1131
+
1119
1132
dev_priv -> audio_component_registered = true;
1120
1133
}
1121
1134
Original file line number Diff line number Diff line change @@ -1541,6 +1541,7 @@ struct drm_i915_private {
1541
1541
*/
1542
1542
struct mutex av_mutex ;
1543
1543
int audio_power_refcount ;
1544
+ u32 audio_freq_cntrl ;
1544
1545
1545
1546
struct {
1546
1547
struct mutex mutex ;
Original file line number Diff line number Diff line change @@ -9127,6 +9127,8 @@ enum {
9127
9127
#define HSW_AUD_CHICKENBIT _MMIO(0x65f10)
9128
9128
#define SKL_AUD_CODEC_WAKE_SIGNAL (1 << 15)
9129
9129
9130
+ #define AUD_FREQ_CNTRL _MMIO(0x65900)
9131
+
9130
9132
/*
9131
9133
* HSW - ICL power wells
9132
9134
*
You can’t perform that action at this time.
0 commit comments