linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] drm/tegra: sor: Enable HDA interrupts at plug-in
@ 2019-07-23 12:40 Viswanath L
  2019-07-24  9:27 ` Dmitry Osipenko
  0 siblings, 1 reply; 5+ messages in thread
From: Viswanath L @ 2019-07-23 12:40 UTC (permalink / raw)
  To: thierry.reding, airlied, daniel, jonathanh
  Cc: dri-devel, linux-tegra, linux-kernel, Viswanath L, stable

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

Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Fixes: 8e2988a76c26 ("drm/tegra: sor: Support for audio over HDMI")
Cc: <stable@vger.kernel.org>
---
 drivers/gpu/drm/tegra/sor.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index 5be5a08..0470cfe 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -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.7.4


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

* Re: [PATCH v3] drm/tegra: sor: Enable HDA interrupts at plug-in
  2019-07-23 12:40 [PATCH v3] drm/tegra: sor: Enable HDA interrupts at plug-in Viswanath L
@ 2019-07-24  9:27 ` Dmitry Osipenko
  2019-07-24 11:09   ` Viswanath L
  2019-07-24 11:11   ` Jon Hunter
  0 siblings, 2 replies; 5+ messages in thread
From: Dmitry Osipenko @ 2019-07-24  9:27 UTC (permalink / raw)
  To: Viswanath L, thierry.reding, jonathanh
  Cc: airlied, daniel, dri-devel, linux-tegra, linux-kernel, stable

23.07.2019 15:40, Viswanath L пишет:
> HDMI plugout calls runtime suspend, which clears interrupt registers
> and causes audio functionality to break on subsequent plug-in; setting
> interrupt registers in sor_audio_prepare() solves the issue.
> 
> Signed-off-by: Viswanath L <viswanathl@nvidia.com>

Yours signed-off-by always should be the last line of the commit's
message because the text below it belongs to a person who applies this
patch, Thierry in this case. This is not a big deal at all and Thierry
could make a fixup while applying the patch if will deem that as necessary.

Secondly, there is no need to add "stable@vger.kernel.org" to the
email's recipients because the patch will flow into stable kernel
versions from the mainline once it will get applied. That happens based
on the stable tag presence, hence it's enough to add the 'Cc' tag to the
commit's message in order to get patch backported.

Lastly, next time please add everyone to the email's recipients whom
you're expecting to get a reply. Otherwise there is a chance that patch
will be left unnoticed.

Everything else looks good to me, thanks!

Reviewed-by: Dmitry Osipenko <digetx@gmail.com>

> Fixes: 8e2988a76c26 ("drm/tegra: sor: Support for audio over HDMI")
> Cc: <stable@vger.kernel.org>
> ---
>  drivers/gpu/drm/tegra/sor.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
> index 5be5a08..0470cfe 100644
> --- a/drivers/gpu/drm/tegra/sor.c
> +++ b/drivers/gpu/drm/tegra/sor.c
> @@ -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;
>  }
>  
> 


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

* RE: [PATCH v3] drm/tegra: sor: Enable HDA interrupts at plug-in
  2019-07-24  9:27 ` Dmitry Osipenko
@ 2019-07-24 11:09   ` Viswanath L
  2019-07-24 11:11   ` Jon Hunter
  1 sibling, 0 replies; 5+ messages in thread
From: Viswanath L @ 2019-07-24 11:09 UTC (permalink / raw)
  To: Dmitry Osipenko, thierry.reding, Jonathan Hunter
  Cc: airlied, daniel, dri-devel, linux-tegra, linux-kernel, stable

Thanks very much for the review, Dmitry!

-----Original Message-----
From: Dmitry Osipenko <digetx@gmail.com> 
Sent: Wednesday, July 24, 2019 2:58 PM
To: Viswanath L <viswanathl@nvidia.com>; thierry.reding@gmail.com; Jonathan Hunter <jonathanh@nvidia.com>
Cc: airlied@linux.ie; daniel@ffwll.ch; dri-devel@lists.freedesktop.org; linux-tegra@vger.kernel.org; linux-kernel@vger.kernel.org; stable@vger.kernel.org
Subject: Re: [PATCH v3] drm/tegra: sor: Enable HDA interrupts at plug-in

23.07.2019 15:40, Viswanath L пишет:
> HDMI plugout calls runtime suspend, which clears interrupt registers 
> and causes audio functionality to break on subsequent plug-in; setting 
> interrupt registers in sor_audio_prepare() solves the issue.
> 
> Signed-off-by: Viswanath L <viswanathl@nvidia.com>

Yours signed-off-by always should be the last line of the commit's message because the text below it belongs to a person who applies this patch, Thierry in this case. This is not a big deal at all and Thierry could make a fixup while applying the patch if will deem that as necessary.

Secondly, there is no need to add "stable@vger.kernel.org" to the email's recipients because the patch will flow into stable kernel versions from the mainline once it will get applied. That happens based on the stable tag presence, hence it's enough to add the 'Cc' tag to the commit's message in order to get patch backported.

Lastly, next time please add everyone to the email's recipients whom you're expecting to get a reply. Otherwise there is a chance that patch will be left unnoticed.

Everything else looks good to me, thanks!

Reviewed-by: Dmitry Osipenko <digetx@gmail.com>

> Fixes: 8e2988a76c26 ("drm/tegra: sor: Support for audio over HDMI")
> Cc: <stable@vger.kernel.org>
> ---
>  drivers/gpu/drm/tegra/sor.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c 
> index 5be5a08..0470cfe 100644
> --- a/drivers/gpu/drm/tegra/sor.c
> +++ b/drivers/gpu/drm/tegra/sor.c
> @@ -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;
>  }
>  
> 


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

* Re: [PATCH v3] drm/tegra: sor: Enable HDA interrupts at plug-in
  2019-07-24  9:27 ` Dmitry Osipenko
  2019-07-24 11:09   ` Viswanath L
@ 2019-07-24 11:11   ` Jon Hunter
  2019-07-24 11:29     ` Dmitry Osipenko
  1 sibling, 1 reply; 5+ messages in thread
From: Jon Hunter @ 2019-07-24 11:11 UTC (permalink / raw)
  To: Dmitry Osipenko, Viswanath L, thierry.reding
  Cc: airlied, daniel, dri-devel, linux-tegra, linux-kernel, stable


On 24/07/2019 10:27, Dmitry Osipenko wrote:
> 23.07.2019 15:40, Viswanath L пишет:
>> HDMI plugout calls runtime suspend, which clears interrupt registers
>> and causes audio functionality to break on subsequent plug-in; setting
>> interrupt registers in sor_audio_prepare() solves the issue.
>>
>> Signed-off-by: Viswanath L <viswanathl@nvidia.com>
> 
> Yours signed-off-by always should be the last line of the commit's
> message because the text below it belongs to a person who applies this
> patch, Thierry in this case. This is not a big deal at all and Thierry
> could make a fixup while applying the patch if will deem that as necessary.
> 
> Secondly, there is no need to add "stable@vger.kernel.org" to the
> email's recipients because the patch will flow into stable kernel
> versions from the mainline once it will get applied. That happens based
> on the stable tag presence, hence it's enough to add the 'Cc' tag to the
> commit's message in order to get patch backported.

I believe 'git send-email' automatically does this.

Jon

-- 
nvpublic

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

* Re: [PATCH v3] drm/tegra: sor: Enable HDA interrupts at plug-in
  2019-07-24 11:11   ` Jon Hunter
@ 2019-07-24 11:29     ` Dmitry Osipenko
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Osipenko @ 2019-07-24 11:29 UTC (permalink / raw)
  To: Jon Hunter, Viswanath L, thierry.reding
  Cc: airlied, daniel, dri-devel, linux-tegra, linux-kernel, stable

24.07.2019 14:11, Jon Hunter пишет:
> 
> On 24/07/2019 10:27, Dmitry Osipenko wrote:
>> 23.07.2019 15:40, Viswanath L пишет:
>>> HDMI plugout calls runtime suspend, which clears interrupt registers
>>> and causes audio functionality to break on subsequent plug-in; setting
>>> interrupt registers in sor_audio_prepare() solves the issue.
>>>
>>> Signed-off-by: Viswanath L <viswanathl@nvidia.com>
>>
>> Yours signed-off-by always should be the last line of the commit's
>> message because the text below it belongs to a person who applies this
>> patch, Thierry in this case. This is not a big deal at all and Thierry
>> could make a fixup while applying the patch if will deem that as necessary.
>>
>> Secondly, there is no need to add "stable@vger.kernel.org" to the
>> email's recipients because the patch will flow into stable kernel
>> versions from the mainline once it will get applied. That happens based
>> on the stable tag presence, hence it's enough to add the 'Cc' tag to the
>> commit's message in order to get patch backported.
> 
> I believe 'git send-email' automatically does this.

Indeed, completely forgot that I have '--suppress-cc=all' in my git's setup.

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

end of thread, other threads:[~2019-07-24 11:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-23 12:40 [PATCH v3] drm/tegra: sor: Enable HDA interrupts at plug-in Viswanath L
2019-07-24  9:27 ` Dmitry Osipenko
2019-07-24 11:09   ` Viswanath L
2019-07-24 11:11   ` Jon Hunter
2019-07-24 11:29     ` Dmitry Osipenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).