[SRU][OEM-B-OSP1/E/unstable][PATCH v2 0/2] drm/i915: Fix the issue of "azx_get_response timeout" for hdmi audio on ICL platforms

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[SRU][OEM-B-OSP1/E/unstable][PATCH v2 0/2] drm/i915: Fix the issue of "azx_get_response timeout" for hdmi audio on ICL platforms

Hui Wang
BugLink: https://bugs.launchpad.net/bugs/1847192

In the V2, I dropped the Disco, so these two patches will not be
merged to Disco since Disco kernel doesn't support ICL graphic,
these two patches are useless to Disco kernel.



Since Bionic kernel doesn't support ICL platforms (i915), so these two
patches will not be sent to Bionic kernel.

[Impact]
On the ICL platforms, the hdmi can't work well, the audio driver
will print "azx_get_response timeout" randomly, then the whole
audio doesn't work anymore.

[Fix]
Intel provide these two fixes to us, and we tested these two
patches, it really fixed the issue.

[Test Case]
Boot and check the hdmi audio, then suspend and resume, check
the hdmi audio, all work well.

[Regression Risk]
Low, Only enable the audio PIN and enable the clock for ICL. we
tested on both ICL and non-ICL, all worked well as before.


Kai Vehmanen (2):
  UBUNTU: SAUCE: drm/i915: Fix audio power up sequence for gen10+
    display
  UBUNTU: SAUCE: drm/i915: extend audio CDCLK>=2*BCLK constraint to more
    platforms

 drivers/gpu/drm/i915/i915_reg.h    |  3 +++
 drivers/gpu/drm/i915/intel_audio.c | 11 ++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[SRU][OEM-B-OSP1][PATCH v2 1/2] UBUNTU: SAUCE: drm/i915: Fix audio power up sequence for gen10+ display

Hui Wang
From: Kai Vehmanen <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1847192

On platfroms with gen10+ display, driver must set the enable bit of
AUDIO_PIN_BUF_CTL register before transactions with the HDA controller
can proceed. Add setting this bit to the audio power up sequence.

Failing to do this resulted in errors during display audio codec probe,
and failures during resume from suspend.

Note: We may also need to disable the bit afterwards, but there are
still unresolved issues with that.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111214
Signed-off-by: Kai Vehmanen <[hidden email]>
Signed-off-by: Jani Nikula <[hidden email]>
Link: https://patchwork.freedesktop.org/patch/msgid/20191003085531.30990-1-kai.vehmanen@...
(backported from commit 1580d3cdddbba4a5ef78a04a5289e32844e6af24
git://anongit.freedesktop.org/drm-intel)
Signed-off-by: Hui Wang <[hidden email]>
---
 drivers/gpu/drm/i915/i915_reg.h    | 3 +++
 drivers/gpu/drm/i915/intel_audio.c | 7 ++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index dc157a7c92d8..754f82ff98e1 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -8913,6 +8913,9 @@ enum {
 #define HSW_AUD_CHICKENBIT _MMIO(0x65f10)
 #define   SKL_AUD_CODEC_WAKE_SIGNAL (1 << 15)
 
+#define AUD_PIN_BUF_CTL _MMIO(0x48414)
+#define   AUD_PIN_BUF_ENABLE REG_BIT(31)
+
 /*
  * HSW - ICL power wells
  *
diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
index 187b4bae49e4..1661a8606017 100644
--- a/drivers/gpu/drm/i915/intel_audio.c
+++ b/drivers/gpu/drm/i915/intel_audio.c
@@ -793,10 +793,15 @@ static void i915_audio_component_get_power(struct device *kdev)
  intel_display_power_get(kdev_to_i915(kdev), POWER_DOMAIN_AUDIO);
 
  /* Force CDCLK to 2*BCLK as long as we need audio to be powered. */
- if (dev_priv->audio_power_refcount++ == 0)
+ if (dev_priv->audio_power_refcount++ == 0) {
  if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv))
  glk_force_audio_cdclk(dev_priv, true);
 
+ if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
+ I915_WRITE(AUD_PIN_BUF_CTL,
+   (I915_READ(AUD_PIN_BUF_CTL) |
+    AUD_PIN_BUF_ENABLE));
+ }
 }
 
 static void i915_audio_component_put_power(struct device *kdev)
--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[SRU][OEM-B-OSP1][PATCH v2 2/2] UBUNTU: SAUCE: drm/i915: extend audio CDCLK>=2*BCLK constraint to more platforms

Hui Wang
In reply to this post by Hui Wang
From: Kai Vehmanen <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1847192

The CDCLK>=2*BCLK constraint applies to all generations since gen10.
Extend the constraint logic in audio get/put_power().

Signed-off-by: Kai Vehmanen <[hidden email]>
Signed-off-by: Jani Nikula <[hidden email]>
Link: https://patchwork.freedesktop.org/patch/msgid/20191003085531.30990-2-kai.vehmanen@...
(backported from commit f6ec9483091f8e67adab0311a4e2f90aab523310
git://anongit.freedesktop.org/drm-intel)
Signed-off-by: Hui Wang <[hidden email]>
---
 drivers/gpu/drm/i915/intel_audio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
index 1661a8606017..57346bf1342e 100644
--- a/drivers/gpu/drm/i915/intel_audio.c
+++ b/drivers/gpu/drm/i915/intel_audio.c
@@ -794,7 +794,7 @@ static void i915_audio_component_get_power(struct device *kdev)
 
  /* Force CDCLK to 2*BCLK as long as we need audio to be powered. */
  if (dev_priv->audio_power_refcount++ == 0) {
- if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv))
+ if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
  glk_force_audio_cdclk(dev_priv, true);
 
  if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
@@ -810,7 +810,7 @@ static void i915_audio_component_put_power(struct device *kdev)
 
  /* Stop forcing CDCLK to 2*BCLK if no need for audio to be powered. */
  if (--dev_priv->audio_power_refcount == 0)
- if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv))
+ if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
  glk_force_audio_cdclk(dev_priv, false);
 
  intel_display_power_put(kdev_to_i915(kdev), POWER_DOMAIN_AUDIO);
--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[SRU][E/unstable][PATCH v2 1/2] UBUNTU: SAUCE: drm/i915: Fix audio power up sequence for gen10+ display

Hui Wang
In reply to this post by Hui Wang
From: Kai Vehmanen <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1847192

On platfroms with gen10+ display, driver must set the enable bit of
AUDIO_PIN_BUF_CTL register before transactions with the HDA controller
can proceed. Add setting this bit to the audio power up sequence.

Failing to do this resulted in errors during display audio codec probe,
and failures during resume from suspend.

Note: We may also need to disable the bit afterwards, but there are
still unresolved issues with that.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111214
Signed-off-by: Kai Vehmanen <[hidden email]>
Signed-off-by: Jani Nikula <[hidden email]>
Link: https://patchwork.freedesktop.org/patch/msgid/20191003085531.30990-1-kai.vehmanen@...
(backported from commit 1580d3cdddbba4a5ef78a04a5289e32844e6af24
git://anongit.freedesktop.org/drm-intel)
Signed-off-by: Hui Wang <[hidden email]>
---
 drivers/gpu/drm/i915/display/intel_audio.c | 8 +++++++-
 drivers/gpu/drm/i915/i915_reg.h            | 3 +++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c
index 840daff12246..c84ee1a75d22 100644
--- a/drivers/gpu/drm/i915/display/intel_audio.c
+++ b/drivers/gpu/drm/i915/display/intel_audio.c
@@ -796,10 +796,16 @@ static unsigned long i915_audio_component_get_power(struct device *kdev)
  ret = intel_display_power_get(dev_priv, POWER_DOMAIN_AUDIO);
 
  /* Force CDCLK to 2*BCLK as long as we need audio to be powered. */
- if (dev_priv->audio_power_refcount++ == 0)
+ if (dev_priv->audio_power_refcount++ == 0) {
  if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv))
  glk_force_audio_cdclk(dev_priv, true);
 
+ if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
+ I915_WRITE(AUD_PIN_BUF_CTL,
+   (I915_READ(AUD_PIN_BUF_CTL) |
+    AUD_PIN_BUF_ENABLE));
+ }
+
  return ret;
 }
 
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index d6483b5dc8e5..6d2fc3d256eb 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -9078,6 +9078,9 @@ enum {
 #define HSW_AUD_CHICKENBIT _MMIO(0x65f10)
 #define   SKL_AUD_CODEC_WAKE_SIGNAL (1 << 15)
 
+#define AUD_PIN_BUF_CTL _MMIO(0x48414)
+#define   AUD_PIN_BUF_ENABLE REG_BIT(31)
+
 /*
  * HSW - ICL power wells
  *
--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[SRU][E/unstable][PATCH v2 2/2] UBUNTU: SAUCE: drm/i915: extend audio CDCLK>=2*BCLK constraint to more platforms

Hui Wang
In reply to this post by Hui Wang
From: Kai Vehmanen <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1847192

The CDCLK>=2*BCLK constraint applies to all generations since gen10.
Extend the constraint logic in audio get/put_power().

Signed-off-by: Kai Vehmanen <[hidden email]>
Signed-off-by: Jani Nikula <[hidden email]>
Link: https://patchwork.freedesktop.org/patch/msgid/20191003085531.30990-2-kai.vehmanen@...
(backported from commit f6ec9483091f8e67adab0311a4e2f90aab523310
git://anongit.freedesktop.org/drm-intel)
Signed-off-by: Hui Wang <[hidden email]>
---
 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 c84ee1a75d22..70473307c7ec 100644
--- a/drivers/gpu/drm/i915/display/intel_audio.c
+++ b/drivers/gpu/drm/i915/display/intel_audio.c
@@ -797,7 +797,7 @@ static unsigned long i915_audio_component_get_power(struct device *kdev)
 
  /* Force CDCLK to 2*BCLK as long as we need audio to be powered. */
  if (dev_priv->audio_power_refcount++ == 0) {
- if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv))
+ if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
  glk_force_audio_cdclk(dev_priv, true);
 
  if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
@@ -816,7 +816,7 @@ static void i915_audio_component_put_power(struct device *kdev,
 
  /* Stop forcing CDCLK to 2*BCLK if no need for audio to be powered. */
  if (--dev_priv->audio_power_refcount == 0)
- if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv))
+ if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
  glk_force_audio_cdclk(dev_priv, false);
 
  intel_display_power_put(dev_priv, POWER_DOMAIN_AUDIO, cookie);
--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK/Cmnt: [SRU][OEM-B-OSP1/E/unstable][PATCH v2 0/2] drm/i915: Fix the issue of "azx_get_response timeout" for hdmi audio on ICL platforms

Stefan Bader-2
In reply to this post by Hui Wang
On 09.10.19 10:08, Hui Wang wrote:

> BugLink: https://bugs.launchpad.net/bugs/1847192
>
> In the V2, I dropped the Disco, so these two patches will not be
> merged to Disco since Disco kernel doesn't support ICL graphic,
> these two patches are useless to Disco kernel.
>
>
>
> Since Bionic kernel doesn't support ICL platforms (i915), so these two
> patches will not be sent to Bionic kernel.
>
> [Impact]
> On the ICL platforms, the hdmi can't work well, the audio driver
> will print "azx_get_response timeout" randomly, then the whole
> audio doesn't work anymore.
>
> [Fix]
> Intel provide these two fixes to us, and we tested these two
> patches, it really fixed the issue.
>
> [Test Case]
> Boot and check the hdmi audio, then suspend and resume, check
> the hdmi audio, all work well.
>
> [Regression Risk]
> Low, Only enable the audio PIN and enable the clock for ICL. we
> tested on both ICL and non-ICL, all worked well as before.
>
>
> Kai Vehmanen (2):
>   UBUNTU: SAUCE: drm/i915: Fix audio power up sequence for gen10+
>     display
>   UBUNTU: SAUCE: drm/i915: extend audio CDCLK>=2*BCLK constraint to more
>     platforms
>
>  drivers/gpu/drm/i915/i915_reg.h    |  3 +++
>  drivers/gpu/drm/i915/intel_audio.c | 11 ++++++++---
>  2 files changed, 11 insertions(+), 3 deletions(-)
>
Hrm, this sounds like for the initial submission for Disco nobody actually
bothered to even test compile. If that is the new level of quality there might
be a mandatory build log for every series requested in the future...

For now, but rather grumpy,

Acked-by: Stefan Bader <[hidden email]>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

APPLIED [OEM-OSP1-B] Re: [SRU][OEM-B-OSP1/E/unstable][PATCH v2 0/2] drm/i915: Fix the issue of "azx_get_response timeout" for hdmi audio on ICL platforms

Timo Aaltonen-6
In reply to this post by Hui Wang
On 9.10.2019 11.08, Hui Wang wrote:

> BugLink: https://bugs.launchpad.net/bugs/1847192
>
> In the V2, I dropped the Disco, so these two patches will not be
> merged to Disco since Disco kernel doesn't support ICL graphic,
> these two patches are useless to Disco kernel.
>
>
>
> Since Bionic kernel doesn't support ICL platforms (i915), so these two
> patches will not be sent to Bionic kernel.
>
> [Impact]
> On the ICL platforms, the hdmi can't work well, the audio driver
> will print "azx_get_response timeout" randomly, then the whole
> audio doesn't work anymore.
>
> [Fix]
> Intel provide these two fixes to us, and we tested these two
> patches, it really fixed the issue.
>
> [Test Case]
> Boot and check the hdmi audio, then suspend and resume, check
> the hdmi audio, all work well.
>
> [Regression Risk]
> Low, Only enable the audio PIN and enable the clock for ICL. we
> tested on both ICL and non-ICL, all worked well as before.
>
>
> Kai Vehmanen (2):
>   UBUNTU: SAUCE: drm/i915: Fix audio power up sequence for gen10+
>     display
>   UBUNTU: SAUCE: drm/i915: extend audio CDCLK>=2*BCLK constraint to more
>     platforms
>
>  drivers/gpu/drm/i915/i915_reg.h    |  3 +++
>  drivers/gpu/drm/i915/intel_audio.c | 11 ++++++++---
>  2 files changed, 11 insertions(+), 3 deletions(-)
>

applied to osp1 oem-next, thanks


--
t

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK[E]: [SRU][OEM-B-OSP1/E/unstable][PATCH v2 0/2] drm/i915: Fix the issue of "azx_get_response timeout" for hdmi audio on ICL platforms

Kleber Souza
In reply to this post by Hui Wang
On 09.10.19 10:08, Hui Wang wrote:

> BugLink: https://bugs.launchpad.net/bugs/1847192
>
> In the V2, I dropped the Disco, so these two patches will not be
> merged to Disco since Disco kernel doesn't support ICL graphic,
> these two patches are useless to Disco kernel.
>
>
>
> Since Bionic kernel doesn't support ICL platforms (i915), so these two
> patches will not be sent to Bionic kernel.
>
> [Impact]
> On the ICL platforms, the hdmi can't work well, the audio driver
> will print "azx_get_response timeout" randomly, then the whole
> audio doesn't work anymore.
>
> [Fix]
> Intel provide these two fixes to us, and we tested these two
> patches, it really fixed the issue.
>
> [Test Case]
> Boot and check the hdmi audio, then suspend and resume, check
> the hdmi audio, all work well.
>
> [Regression Risk]
> Low, Only enable the audio PIN and enable the clock for ICL. we
> tested on both ICL and non-ICL, all worked well as before.
>
>
> Kai Vehmanen (2):
>   UBUNTU: SAUCE: drm/i915: Fix audio power up sequence for gen10+
>     display
>   UBUNTU: SAUCE: drm/i915: extend audio CDCLK>=2*BCLK constraint to more
>     platforms
>
>  drivers/gpu/drm/i915/i915_reg.h    |  3 +++
>  drivers/gpu/drm/i915/intel_audio.c | 11 ++++++++---
>  2 files changed, 11 insertions(+), 3 deletions(-)
>

For Eoan:

Acked-by: Kleber Sacilotto de Souza <[hidden email]>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED[E]: [SRU][OEM-B-OSP1/E/unstable][PATCH v2 0/2] drm/i915: Fix the issue of "azx_get_response timeout" for hdmi audio on ICL platforms

Kleber Souza
In reply to this post by Hui Wang
On 09.10.19 10:08, Hui Wang wrote:

> BugLink: https://bugs.launchpad.net/bugs/1847192
>
> In the V2, I dropped the Disco, so these two patches will not be
> merged to Disco since Disco kernel doesn't support ICL graphic,
> these two patches are useless to Disco kernel.
>
>
>
> Since Bionic kernel doesn't support ICL platforms (i915), so these two
> patches will not be sent to Bionic kernel.
>
> [Impact]
> On the ICL platforms, the hdmi can't work well, the audio driver
> will print "azx_get_response timeout" randomly, then the whole
> audio doesn't work anymore.
>
> [Fix]
> Intel provide these two fixes to us, and we tested these two
> patches, it really fixed the issue.
>
> [Test Case]
> Boot and check the hdmi audio, then suspend and resume, check
> the hdmi audio, all work well.
>
> [Regression Risk]
> Low, Only enable the audio PIN and enable the clock for ICL. we
> tested on both ICL and non-ICL, all worked well as before.
>
>
> Kai Vehmanen (2):
>   UBUNTU: SAUCE: drm/i915: Fix audio power up sequence for gen10+
>     display
>   UBUNTU: SAUCE: drm/i915: extend audio CDCLK>=2*BCLK constraint to more
>     platforms
>
>  drivers/gpu/drm/i915/i915_reg.h    |  3 +++
>  drivers/gpu/drm/i915/intel_audio.c | 11 ++++++++---
>  2 files changed, 11 insertions(+), 3 deletions(-)
>

Applied to eoan/master-next branch.

Thanks,
Kleber

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED[Unstable]: [SRU][OEM-B-OSP1/E/unstable][PATCH v2 0/2] drm/i915: Fix the issue of "azx_get_response timeout" for hdmi audio on ICL platforms

Seth Forshee
In reply to this post by Hui Wang
On Wed, Oct 09, 2019 at 04:08:34PM +0800, Hui Wang wrote:

> BugLink: https://bugs.launchpad.net/bugs/1847192
>
> In the V2, I dropped the Disco, so these two patches will not be
> merged to Disco since Disco kernel doesn't support ICL graphic,
> these two patches are useless to Disco kernel.
>
>
>
> Since Bionic kernel doesn't support ICL platforms (i915), so these two
> patches will not be sent to Bionic kernel.
>
> [Impact]
> On the ICL platforms, the hdmi can't work well, the audio driver
> will print "azx_get_response timeout" randomly, then the whole
> audio doesn't work anymore.
>
> [Fix]
> Intel provide these two fixes to us, and we tested these two
> patches, it really fixed the issue.
>
> [Test Case]
> Boot and check the hdmi audio, then suspend and resume, check
> the hdmi audio, all work well.
>
> [Regression Risk]
> Low, Only enable the audio PIN and enable the clock for ICL. we
> tested on both ICL and non-ICL, all worked well as before.

Applied to unstable/master, thanks!

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team