diff mbox series

drm/i915: use forced codec wake on all gen9+ platforms

Message ID 20200324153212.6303-1-kai.vehmanen@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: use forced codec wake on all gen9+ platforms | expand

Commit Message

Kai Vehmanen March 24, 2020, 3:32 p.m. UTC
Commit 632f3ab95fe2 ("drm/i915/audio: add codec wakeup override
enabled/disable callback"), added logic to toggle Codec Wake on gen9.
This is used by audio driver when it resets the HDA controller.

It seems explicit toggling of the wakeline can help to fix problems
with probe failing on some gen12 platforms. And based on specs, there
is no reason why this programming sequence should not be applied to all
gen9+ platforms. No side-effects are seen on gen10/11. So apply
the wake-logic to all gen9+ platforms.

Link: https://github.com/thesofproject/linux/issues/1847
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ville Syrjälä March 27, 2020, 3:52 p.m. UTC | #1
On Tue, Mar 24, 2020 at 05:32:12PM +0200, Kai Vehmanen wrote:
> Commit 632f3ab95fe2 ("drm/i915/audio: add codec wakeup override
> enabled/disable callback"), added logic to toggle Codec Wake on gen9.
> This is used by audio driver when it resets the HDA controller.
> 
> It seems explicit toggling of the wakeline can help to fix problems
> with probe failing on some gen12 platforms. And based on specs, there
> is no reason why this programming sequence should not be applied to all
> gen9+ platforms. No side-effects are seen on gen10/11. So apply
> the wake-logic to all gen9+ platforms.
> 
> Link: https://github.com/thesofproject/linux/issues/1847
> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>

Pushed to dinq. Thanks.

> ---
>  drivers/gpu/drm/i915/display/intel_audio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c
> index 62f234f641de..950160f1a89f 100644
> --- a/drivers/gpu/drm/i915/display/intel_audio.c
> +++ b/drivers/gpu/drm/i915/display/intel_audio.c
> @@ -931,7 +931,7 @@ static void i915_audio_component_codec_wake_override(struct device *kdev,
>  	unsigned long cookie;
>  	u32 tmp;
>  
> -	if (!IS_GEN(dev_priv, 9))
> +	if (INTEL_GEN(dev_priv) < 9)
>  		return;
>  
>  	cookie = i915_audio_component_get_power(kdev);
> -- 
> 2.17.1
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c
index 62f234f641de..950160f1a89f 100644
--- a/drivers/gpu/drm/i915/display/intel_audio.c
+++ b/drivers/gpu/drm/i915/display/intel_audio.c
@@ -931,7 +931,7 @@  static void i915_audio_component_codec_wake_override(struct device *kdev,
 	unsigned long cookie;
 	u32 tmp;
 
-	if (!IS_GEN(dev_priv, 9))
+	if (INTEL_GEN(dev_priv) < 9)
 		return;
 
 	cookie = i915_audio_component_get_power(kdev);