Skip to contentSkip to conversation

drm/tegra: sor: Enable HDA interrupts at plugin

PATCH Superseded Viswanath L 2 participants 5 messages Jul 22, 2019 – Jul 24, 2019

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/tegra: sor: Enable HDA interrupts at plugin

HDMI plugout calls runtime suspend, which clears interrupt registers and causes audio functionality to break on subsequent plugin; setting interrupt registers in sor_audio_prepare() solves the issue

---
 drivers/gpu/drm/tegra/sor.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/gpu/drm/tegra/sor.c +9 -9
index 5be5a08..0470cfe 100644
@@ -2164,6 +2164,15 @@ static void tegra_sor_audio_prepare(struct tegra_sor *sor)
 
 	value = SOR_AUDIO_HDA_PRESENSE_ELDV | SOR_AUDIO_HDA_PRESENSE_PD;
 	tegra_sor_writel(sor, value, SOR_AUDIO_HDA_PRESENSE);
+
+	/*
+	 * Enable and unmask the HDA codec SCRATCH0 register interrupt. This
+	 * is used for interoperability between the HDA codec driver and the
+	 * HDMI/DP driver.
+	 */
+	value = SOR_INT_CODEC_SCRATCH1 | SOR_INT_CODEC_SCRATCH0;
+	tegra_sor_writel(sor, value, SOR_INT_ENABLE);
+	tegra_sor_writel(sor, value, SOR_INT_MASK);
 }
 
 static void tegra_sor_audio_unprepare(struct tegra_sor *sor)
@@ -2913,15 +2922,6 @@ static int tegra_sor_init(struct host1x_client *client)
 	if (err < 0)
 		return err;
 
-	/*
-	 * Enable and unmask the HDA codec SCRATCH0 register interrupt. This
-	 * is used for interoperability between the HDA codec driver and the
-	 * HDMI/DP driver.
-	 */
-	value = SOR_INT_CODEC_SCRATCH1 | SOR_INT_CODEC_SCRATCH0;
-	tegra_sor_writel(sor, value, SOR_INT_ENABLE);
-	tegra_sor_writel(sor, value, SOR_INT_MASK);
-
 	return 0;
 }
 
Signature · 1 line
2.7.4
#1 lore raw

22.07.2019 12:27, Viswanath L пишет:

Quoted 3 lines

HDMI plugout calls runtime suspend, which clears interrupt registers and causes audio functionality to break on subsequent plugin; setting interrupt registers in sor_audio_prepare() solves the issue

Hello Viswanath,

A dot should be in the end of sentence, please. And should be better to s/plugin/plug-in/ in the commit's message/title because 'plugin' sounds as a noun.

Please don't version patch as v2 if v1 wasn't ever sent out.

You should add a stable tag here to get patch backported into stable kernel versions:

Quoted 1 line

The kernel upstreaming rules require a full name. I'm pretty sure that L isn't yours surname.

Quoted 41 lines
---
 drivers/gpu/drm/tegra/sor.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/gpu/drm/tegra/sor.c +9 -9
index 5be5a08..0470cfe 100644
@@ -2164,6 +2164,15 @@ static void tegra_sor_audio_prepare(struct tegra_sor *sor)
 
 	value = SOR_AUDIO_HDA_PRESENSE_ELDV | SOR_AUDIO_HDA_PRESENSE_PD;
 	tegra_sor_writel(sor, value, SOR_AUDIO_HDA_PRESENSE);
+
+	/*
+	 * Enable and unmask the HDA codec SCRATCH0 register interrupt. This
+	 * is used for interoperability between the HDA codec driver and the
+	 * HDMI/DP driver.
+	 */
+	value = SOR_INT_CODEC_SCRATCH1 | SOR_INT_CODEC_SCRATCH0;
+	tegra_sor_writel(sor, value, SOR_INT_ENABLE);
+	tegra_sor_writel(sor, value, SOR_INT_MASK);
 }
 
 static void tegra_sor_audio_unprepare(struct tegra_sor *sor)
@@ -2913,15 +2922,6 @@ static int tegra_sor_init(struct host1x_client *client)
 	if (err < 0)
 		return err;
 
-	/*
-	 * Enable and unmask the HDA codec SCRATCH0 register interrupt. This
-	 * is used for interoperability between the HDA codec driver and the
-	 * HDMI/DP driver.
-	 */
-	value = SOR_INT_CODEC_SCRATCH1 | SOR_INT_CODEC_SCRATCH0;
-	tegra_sor_writel(sor, value, SOR_INT_ENABLE);
-	tegra_sor_writel(sor, value, SOR_INT_MASK);
-
 	return 0;
 }
 
#2 lore raw

Thanks for your comments, Dmitry. Please see my responses inline.

Quoted 9 lines · Dmitry Osipenko

22.07.2019 12:27, Viswanath L пишет:

Quoted 3 lines

HDMI plugout calls runtime suspend, which clears interrupt registers and causes audio functionality to break on subsequent plugin; setting interrupt registers in sor_audio_prepare() solves the issue

Hello Viswanath,

A dot should be in the end of sentence, please. And should be better to s/plugin/plug-in/ in the commit's message/title because 'plugin' sounds as a noun.

[VL] Yes, I'll make the above changes.

Quoted 2 lines

Please don't version patch as v2 if v1 wasn't ever sent out.

[VL] Now that I have sent v2, shall I continue with v2 for the next patch? Apologies for this oversight.

Quoted 5 lines

You should add a stable tag here to get patch backported into stable kernel versions:

[VL] Yes, will add.

Quoted 4 lines
Quoted 2 lines

The kernel upstreaming rules require a full name. I'm pretty sure that L isn't yours surname.

[VL] My name appears as "Viswanath L" in all company records and email lists. I would strongly prefer to keep it this way, unless that is an absolute no-no.

Quoted 41 lines
Quoted 41 lines
---
  drivers/gpu/drm/tegra/sor.c | 18 +++++++++---------
  1 file changed, 9 insertions(+), 9 deletions(-)
drivers/gpu/drm/tegra/sor.c +9 -9
index 5be5a08..0470cfe 100644
@@ -2164,6 +2164,15 @@ static void tegra_sor_audio_prepare(struct tegra_sor *sor)
 
  	value = SOR_AUDIO_HDA_PRESENSE_ELDV | SOR_AUDIO_HDA_PRESENSE_PD;
  	tegra_sor_writel(sor, value, SOR_AUDIO_HDA_PRESENSE);
+
+	/*
+	 * Enable and unmask the HDA codec SCRATCH0 register interrupt. This
+	 * is used for interoperability between the HDA codec driver and the
+	 * HDMI/DP driver.
+	 */
+	value = SOR_INT_CODEC_SCRATCH1 | SOR_INT_CODEC_SCRATCH0;
+	tegra_sor_writel(sor, value, SOR_INT_ENABLE);
+	tegra_sor_writel(sor, value, SOR_INT_MASK);
  }
 
  static void tegra_sor_audio_unprepare(struct tegra_sor *sor)
@@ -2913,15 +2922,6 @@ static int tegra_sor_init(struct host1x_client *client)
  	if (err < 0)
  		return err;
 
-	/*
-	 * Enable and unmask the HDA codec SCRATCH0 register interrupt. This
-	 * is used for interoperability between the HDA codec driver and the
-	 * HDMI/DP driver.
-	 */
-	value = SOR_INT_CODEC_SCRATCH1 | SOR_INT_CODEC_SCRATCH0;
-	tegra_sor_writel(sor, value, SOR_INT_ENABLE);
-	tegra_sor_writel(sor, value, SOR_INT_MASK);
-
  	return 0;
  }
 
#3 lore raw

23.07.2019 13:11, Viswanath L пишет:

Quoted 9 lines

Thanks for your comments, Dmitry. Please see my responses inline.

Quoted 6 lines · Dmitry Osipenko

22.07.2019 12:27, Viswanath L пишет:

Quoted 3 lines

HDMI plugout calls runtime suspend, which clears interrupt registers and causes audio functionality to break on subsequent plugin; setting interrupt registers in sor_audio_prepare() solves the issue

Hello Viswanath,

Quoted 8 lines
Quoted 3 lines

A dot should be in the end of sentence, please. And should be better to s/plugin/plug-in/ in the commit's message/title because 'plugin' sounds as a noun.

[VL] Yes, I'll make the above changes.

Quoted 2 lines

Please don't version patch as v2 if v1 wasn't ever sent out.

[VL] Now that I have sent v2, shall I continue with v2 for the next patch? Apologies for this oversight.

v3 should be good.

Quoted 4 lines
Quoted 4 lines

You should add a stable tag here to get patch backported into stable kernel versions:

Quoted 8 lines

[VL] Yes, will add.

Quoted 4 lines
Quoted 2 lines

The kernel upstreaming rules require a full name. I'm pretty sure that L isn't yours surname.

[VL] My name appears as "Viswanath L" in all company records and email lists. I would strongly prefer to keep it this way, unless that is an absolute no-no.

I guess it should be okay, but a full name is much more preferable.

#4 lore raw

Hello Dmitry, I have pushed new patch set v3 (https://patchwork.ozlabs.org/patch/1135605/). Request you to kindly review.

Thanks.

Quoted 31 lines · Dmitry Osipenko

23.07.2019 13:11, Viswanath L пишет:

Quoted 9 lines

Thanks for your comments, Dmitry. Please see my responses inline.

Quoted 6 lines · Dmitry Osipenko

22.07.2019 12:27, Viswanath L пишет:

Quoted 3 lines

HDMI plugout calls runtime suspend, which clears interrupt registers and causes audio functionality to break on subsequent plugin; setting interrupt registers in sor_audio_prepare() solves the issue

Hello Viswanath,

Quoted 7 lines
Quoted 3 lines

A dot should be in the end of sentence, please. And should be better to s/plugin/plug-in/ in the commit's message/title because 'plugin' sounds as a noun.

[VL] Yes, I'll make the above changes.

Quoted 1 line

Please don't version patch as v2 if v1 wasn't ever sent out.

[VL] Now that I have sent v2, shall I continue with v2 for the next patch? Apologies for this oversight.

v3 should be good.

Quoted 11 lines
Quoted 4 lines

You should add a stable tag here to get patch backported into stable kernel versions:

[VL] Yes, will add.

Quoted 3 lines
Quoted 1 line

The kernel upstreaming rules require a full name. I'm pretty sure that L isn't yours surname.

[VL] My name appears as "Viswanath L" in all company records and email lists. I would strongly prefer to keep it this way, unless that is an absolute no-no.

I guess it should be okay, but a full name is much more preferable.