public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/nouveau/nv84: Fix HDMI audio regression
@ 2013-05-20 17:14 Alexander Stein
  2013-05-20 22:42 ` Ben Skeggs
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Stein @ 2013-05-20 17:14 UTC (permalink / raw)
  To: David Airlie, Ben Skeggs; +Cc: dri-devel, linux-kernel, Alexander Stein

Code refactoring in commit 8e9e3d2deacc460fbb8a4691140318f6e85e6891
(drm/nv84/disp: move hdmi control into core) disabled HDMI audio on my
nv84 by removing too much old code without adding it in the new one.
This patch adds the missing code within the new code layout resulting in
HDMI audio working again.
It should work on any HDMI head, but due to lacking ahrdware I could
only test the (1st) one.
It also might be possible that similar code is needed for nva3, which I
can't test.

Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
---
This patch should also be added to stable kernels.

 drivers/gpu/drm/nouveau/core/engine/disp/hdminv84.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/hdminv84.c b/drivers/gpu/drm/nouveau/core/engine/disp/hdminv84.c
index 0d36bdc..7fdade6 100644
--- a/drivers/gpu/drm/nouveau/core/engine/disp/hdminv84.c
+++ b/drivers/gpu/drm/nouveau/core/engine/disp/hdminv84.c
@@ -55,6 +55,10 @@ nv84_hdmi_ctrl(struct nv50_disp_priv *priv, int head, int or, u32 data)
 	nv_wr32(priv, 0x616510 + hoff, 0x00000000);
 	nv_mask(priv, 0x616500 + hoff, 0x00000001, 0x00000001);
 
+	nv_mask(priv, 0x6165d0 + hoff, 0x00070001, 0x00010001); /* SPARE, HW_CTS */
+	nv_mask(priv, 0x616568 + hoff, 0x00010101, 0x00000000); /* ACR_CTRL, ?? */
+	nv_mask(priv, 0x616578 + hoff, 0x80000000, 0x80000000); /* ACR_0441_ENABLE */
+
 	/* ??? */
 	nv_mask(priv, 0x61733c, 0x00100000, 0x00100000); /* RESETF */
 	nv_mask(priv, 0x61733c, 0x10000000, 0x10000000); /* LOOKUP_EN */
-- 
1.8.2.1


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

* Re: [PATCH] drm/nouveau/nv84: Fix HDMI audio regression
  2013-05-20 17:14 [PATCH] drm/nouveau/nv84: Fix HDMI audio regression Alexander Stein
@ 2013-05-20 22:42 ` Ben Skeggs
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Skeggs @ 2013-05-20 22:42 UTC (permalink / raw)
  To: Alexander Stein; +Cc: David Airlie, dri-devel, linux-kernel

On Mon, 2013-05-20 at 19:14 +0200, Alexander Stein wrote:
> Code refactoring in commit 8e9e3d2deacc460fbb8a4691140318f6e85e6891
> (drm/nv84/disp: move hdmi control into core) disabled HDMI audio on my
> nv84 by removing too much old code without adding it in the new one.
> This patch adds the missing code within the new code layout resulting in
> HDMI audio working again.
> It should work on any HDMI head, but due to lacking ahrdware I could
> only test the (1st) one.
I'm surprised it ever worked at all actually.  There's additional setup
before nva3 that should've been required, but I've never got around to
reverse-engineering properly.

I'll pick up this patch though if it makes it work for you.

Thanks,
Ben.

> It also might be possible that similar code is needed for nva3, which I
> can't test.
> 
> Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
> ---
> This patch should also be added to stable kernels.
> 
>  drivers/gpu/drm/nouveau/core/engine/disp/hdminv84.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/hdminv84.c b/drivers/gpu/drm/nouveau/core/engine/disp/hdminv84.c
> index 0d36bdc..7fdade6 100644
> --- a/drivers/gpu/drm/nouveau/core/engine/disp/hdminv84.c
> +++ b/drivers/gpu/drm/nouveau/core/engine/disp/hdminv84.c
> @@ -55,6 +55,10 @@ nv84_hdmi_ctrl(struct nv50_disp_priv *priv, int head, int or, u32 data)
>  	nv_wr32(priv, 0x616510 + hoff, 0x00000000);
>  	nv_mask(priv, 0x616500 + hoff, 0x00000001, 0x00000001);
>  
> +	nv_mask(priv, 0x6165d0 + hoff, 0x00070001, 0x00010001); /* SPARE, HW_CTS */
> +	nv_mask(priv, 0x616568 + hoff, 0x00010101, 0x00000000); /* ACR_CTRL, ?? */
> +	nv_mask(priv, 0x616578 + hoff, 0x80000000, 0x80000000); /* ACR_0441_ENABLE */
> +
>  	/* ??? */
>  	nv_mask(priv, 0x61733c, 0x00100000, 0x00100000); /* RESETF */
>  	nv_mask(priv, 0x61733c, 0x10000000, 0x10000000); /* LOOKUP_EN */



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

end of thread, other threads:[~2013-05-20 22:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-20 17:14 [PATCH] drm/nouveau/nv84: Fix HDMI audio regression Alexander Stein
2013-05-20 22:42 ` Ben Skeggs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox