All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 1/1] drm/i915/audio: apply SKL codec wake up patch to BXT
@ 2015-11-19 14:44 han.lu
  2015-11-19 15:55 ` Daniel Vetter
  0 siblings, 1 reply; 4+ messages in thread
From: han.lu @ 2015-11-19 14:44 UTC (permalink / raw)
  To: daniel.vetter, jani.nikula, intel-gfx, tiwai, libin.yang,
	mengdong.lin, han.lu, alsa-devel
  Cc: Lu, Han

From: "Lu, Han" <han.lu@intel.com>

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

Signed-off-by: Lu, Han <han.lu@intel.com>

diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
index 63d4706..8310bf3 100644
--- a/drivers/gpu/drm/i915/intel_audio.c
+++ b/drivers/gpu/drm/i915/intel_audio.c
@@ -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;
 
 	/*
-- 
2.5.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH V2 1/1] drm/i915/audio: apply SKL codec wake up patch to BXT
  2015-11-19 14:44 [PATCH V2 1/1] drm/i915/audio: apply SKL codec wake up patch to BXT han.lu
@ 2015-11-19 15:55 ` Daniel Vetter
  2015-11-19 16:01   ` Jani Nikula
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2015-11-19 15:55 UTC (permalink / raw)
  To: han.lu
  Cc: alsa-devel, mengdong.lin, jani.nikula, daniel.vetter, intel-gfx,
	tiwai, han.lu, libin.yang

On Thu, Nov 19, 2015 at 10:44:48PM +0800, han.lu@intel.com wrote:
> From: "Lu, Han" <han.lu@intel.com>
> 
> 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
> 
> Signed-off-by: Lu, Han <han.lu@intel.com>
> 
> diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
> index 63d4706..8310bf3 100644
> --- a/drivers/gpu/drm/i915/intel_audio.c
> +++ b/drivers/gpu/drm/i915/intel_audio.c
> @@ -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

>  		return;
>  
>  	/*
> -- 
> 2.5.0
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH V2 1/1] drm/i915/audio: apply SKL codec wake up patch to BXT
  2015-11-19 15:55 ` Daniel Vetter
@ 2015-11-19 16:01   ` Jani Nikula
  2015-11-20  1:16     ` Han Lu
  0 siblings, 1 reply; 4+ messages in thread
From: Jani Nikula @ 2015-11-19 16:01 UTC (permalink / raw)
  To: Daniel Vetter, han.lu
  Cc: alsa-devel, mengdong.lin, tiwai, daniel.vetter, intel-gfx,
	han.lu, libin.yang

On Thu, 19 Nov 2015, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Thu, Nov 19, 2015 at 10:44:48PM +0800, han.lu@intel.com wrote:
>> From: "Lu, Han" <han.lu@intel.com>
>> 
>> 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
>> 
>> Signed-off-by: Lu, Han <han.lu@intel.com>
>> 
>> diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
>> index 63d4706..8310bf3 100644
>> --- a/drivers/gpu/drm/i915/intel_audio.c
>> +++ b/drivers/gpu/drm/i915/intel_audio.c
>> @@ -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.

http://mid.gmane.org/87a8qacq5w.fsf@intel.com ...

> -Daniel
>
>>  		return;
>>  
>>  	/*
>> -- 
>> 2.5.0
>> 

-- 
Jani Nikula, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH V2 1/1] drm/i915/audio: apply SKL codec wake up patch to BXT
  2015-11-19 16:01   ` Jani Nikula
@ 2015-11-20  1:16     ` Han Lu
  0 siblings, 0 replies; 4+ messages in thread
From: Han Lu @ 2015-11-20  1:16 UTC (permalink / raw)
  To: Jani Nikula, Daniel Vetter, han.lu
  Cc: alsa-devel, mengdong.lin, tiwai, daniel.vetter, intel-gfx, libin.yang

On 11/20/2015 12:01 AM, Jani Nikula wrote:
> On Thu, 19 Nov 2015, Daniel Vetter <daniel@ffwll.ch> wrote:
>> On Thu, Nov 19, 2015 at 10:44:48PM +0800, han.lu@intel.com wrote:
>>> From: "Lu, Han" <han.lu@intel.com>
>>>
>>> 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
>>>
>>> Signed-off-by: Lu, Han <han.lu@intel.com>
>>>
>>> diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
>>> index 63d4706..8310bf3 100644
>>> --- a/drivers/gpu/drm/i915/intel_audio.c
>>> +++ b/drivers/gpu/drm/i915/intel_audio.c
>>> @@ -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.
> http://mid.gmane.org/87a8qacq5w.fsf@intel.com ...
Yes, that's right. Thanks. I'll send next revision.

Regards,
Han Lu
>
>> -Daniel
>>
>>>   		return;
>>>   
>>>   	/*
>>> -- 
>>> 2.5.0
>>>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-20  1:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-19 14:44 [PATCH V2 1/1] drm/i915/audio: apply SKL codec wake up patch to BXT han.lu
2015-11-19 15:55 ` Daniel Vetter
2015-11-19 16:01   ` Jani Nikula
2015-11-20  1:16     ` Han Lu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.