Skip to contentSkip to conversation

drm/i915/audio: apply SKL codec wake up patch to BXT

PATCH Superseded [email protected] 4 participants 4 messages Nov 19, 2015 – Nov 20, 2015

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/i915/audio: apply SKL codec wake up patch to BXT

From: "Lu, Han" <[email protected]>

For SKL we added a commit 632f3ab95fe2 ("drm/i915/audio: add codec wakeup override enabled/disable callback"), in order to enable codec wakeup override signal, to allow re-enumeration of the controller on SKL after resume from low power state.
In SKL, HDMI/DP codec and PCH HD Audio Controller are in different power wells, so it's necessary to reset display audio codecs when power well on, otherwise display audio codecs will disappear when resume from low power state.
Reset steps when power on:

    enable codec wakeup -> azx_init_chip() -> disable codec wakeup

Since the power well design did not change from SKL to BXT, we need to apply the workaround to BXT also.

v2: add explanation

drivers/gpu/drm/i915/intel_audio.c +2 -1
index 63d4706..8310bf3 100644
@@ -591,7 +591,8 @@ static void i915_audio_component_codec_wake_override(struct device *dev,
 	struct drm_i915_private *dev_priv = dev_to_i915(dev);
 	u32 tmp;
 
-	if (!IS_SKYLAKE(dev_priv) && !IS_KABYLAKE(dev_priv))
+	if (!IS_SKYLAKE(dev_priv) && !IS_BROXTON(dev_priv) &&
+			!IS_KABYLAKE(dev_priv))
 		return;
 
 	/*
Signature · 6 lines
2.5.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 24 lines · On Thu, Nov 19, 2015 at 10:44:48PM +0800, [email protected] wrote:

From: "Lu, Han" <[email protected]>

For SKL we added a commit 632f3ab95fe2 ("drm/i915/audio: add codec wakeup override enabled/disable callback"), in order to enable codec wakeup override signal, to allow re-enumeration of the controller on SKL after resume from low power state.
In SKL, HDMI/DP codec and PCH HD Audio Controller are in different power wells, so it's necessary to reset display audio codecs when power well on, otherwise display audio codecs will disappear when resume from low power state.
Reset steps when power on:

    enable codec wakeup -> azx_init_chip() -> disable codec wakeup

Since the power well design did not change from SKL to BXT, we need to apply the workaround to BXT also.

v2: add explanation

drivers/gpu/drm/i915/intel_audio.c +0 -0
index 63d4706..8310bf3 100644

drivers/gpu/drm/i915/intel_audio.c static void i915_audio_component_codec_wake_override(struct device *dev, · line 595

Quoted 6 lines
drivers/gpu/drm/i915/intel_audio.c +2 -1
@@ -591,7 +591,8 @@ static void i915_audio_component_codec_wake_override(struct device *dev,
 	struct drm_i915_private *dev_priv = dev_to_i915(dev);
 	u32 tmp;
 
-	if (!IS_SKYLAKE(dev_priv) && !IS_KABYLAKE(dev_priv))
+	if (!IS_SKYLAKE(dev_priv) && !IS_BROXTON(dev_priv) &&
+			!IS_KABYLAKE(dev_priv))

if (INTEL_INFO(dev)->gen < 9)

	return;

for future-proofing? At least make it an IS_GEN9 check instead of listening all of them in a long list.
-Daniel

Quoted 6 lines
drivers/gpu/drm/i915/intel_audio.c +0 -0
 		return;
 
 	/*
Signature · 1 line
2.5.0
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 33 lines · Daniel Vetter
Quoted 24 lines · On Thu, Nov 19, 2015 at 10:44:48PM +0800, [email protected] wrote:

From: "Lu, Han" <[email protected]>

For SKL we added a commit 632f3ab95fe2 ("drm/i915/audio: add codec wakeup override enabled/disable callback"), in order to enable codec wakeup override signal, to allow re-enumeration of the controller on SKL after resume from low power state.
In SKL, HDMI/DP codec and PCH HD Audio Controller are in different power wells, so it's necessary to reset display audio codecs when power well on, otherwise display audio codecs will disappear when resume from low power state.
Reset steps when power on:

    enable codec wakeup -> azx_init_chip() -> disable codec wakeup

Since the power well design did not change from SKL to BXT, we need to apply the workaround to BXT also.

v2: add explanation

drivers/gpu/drm/i915/intel_audio.c +0 -0
index 63d4706..8310bf3 100644

drivers/gpu/drm/i915/intel_audio.c static void i915_audio_component_codec_wake_override(struct device *dev, · line 595

Quoted 6 lines
drivers/gpu/drm/i915/intel_audio.c +2 -1
@@ -591,7 +591,8 @@ static void i915_audio_component_codec_wake_override(struct device *dev,
 	struct drm_i915_private *dev_priv = dev_to_i915(dev);
 	u32 tmp;
 
-	if (!IS_SKYLAKE(dev_priv) && !IS_KABYLAKE(dev_priv))
+	if (!IS_SKYLAKE(dev_priv) && !IS_BROXTON(dev_priv) &&
+			!IS_KABYLAKE(dev_priv))

if (INTEL_INFO(dev)->gen < 9)

Quoted 4 lines
	return;

for future-proofing? At least make it an IS_GEN9 check instead of listening all of them in a long list.

http://mid.gmane.org/[email protected] ...

Quoted 8 lines

-Daniel

Quoted 6 lines
drivers/gpu/drm/i915/intel_audio.c +0 -0
 		return;
 
 	/*
Signature · 1 line
2.5.0
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
#3 lore raw
Quoted 35 lines · Jani Nikula
Quoted 34 lines · Daniel Vetter
Quoted 24 lines · On Thu, Nov 19, 2015 at 10:44:48PM +0800, [email protected] wrote:

From: "Lu, Han" <[email protected]>

For SKL we added a commit 632f3ab95fe2 ("drm/i915/audio: add codec wakeup override enabled/disable callback"), in order to enable codec wakeup override signal, to allow re-enumeration of the controller on SKL after resume from low power state.
In SKL, HDMI/DP codec and PCH HD Audio Controller are in different power wells, so it's necessary to reset display audio codecs when power well on, otherwise display audio codecs will disappear when resume from low power state.
Reset steps when power on:

     enable codec wakeup -> azx_init_chip() -> disable codec wakeup

Since the power well design did not change from SKL to BXT, we need to apply the workaround to BXT also.

v2: add explanation

drivers/gpu/drm/i915/intel_audio.c +0 -0
index 63d4706..8310bf3 100644

drivers/gpu/drm/i915/intel_audio.c static void i915_audio_component_codec_wake_override(struct device *dev, · line 595

Quoted 6 lines
drivers/gpu/drm/i915/intel_audio.c +2 -1
@@ -591,7 +591,8 @@ static void i915_audio_component_codec_wake_override(struct device *dev,
  	struct drm_i915_private *dev_priv = dev_to_i915(dev);
  	u32 tmp;
 
-	if (!IS_SKYLAKE(dev_priv) && !IS_KABYLAKE(dev_priv))
+	if (!IS_SKYLAKE(dev_priv) && !IS_BROXTON(dev_priv) &&
+			!IS_KABYLAKE(dev_priv))

if (INTEL_INFO(dev)->gen < 9)

	return;
Quoted 3 lines
Quoted 2 lines

for future-proofing? At least make it an IS_GEN9 check instead of listening all of them in a long list.

http://mid.gmane.org/[email protected] ...

Yes, that's right. Thanks. I'll send next revision.

Regards,
Han Lu

Quoted 9 lines
Quoted 9 lines

-Daniel

Quoted 6 lines
drivers/gpu/drm/i915/intel_audio.c +0 -0
  		return;
 
  	/*
Signature · 1 line
2.5.0