All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/nv50/disp: prevent false output detection on the original nv50
@ 2013-08-23 17:43 Emil Velikov
  2013-09-04  1:07 ` [Nouveau] " Ben Skeggs
  0 siblings, 1 reply; 2+ messages in thread
From: Emil Velikov @ 2013-08-23 17:43 UTC (permalink / raw)
  To: Ben Skeggs; +Cc: nouveau, Emil Velikov, stable

Commit ea9197cc323839ef3d5280c0453b2c622caa6bc7 effectively enabled the
use of an improved DAC detection code, but introduced a regression on
the original nv50 chipset, causing a ghost monitor to be detected.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67382
Tested-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Cc: <stable@vger.kernel.org> # 3.9+
---
 drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c b/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
index f02fd9f..15df527 100644
--- a/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
+++ b/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
@@ -55,7 +55,14 @@ nv50_dac_sense(struct nv50_disp_priv *priv, int or, u32 loadval)
 	nv_wr32(priv, 0x61a00c + doff, 0x00100000 | loadval);
 	mdelay(9);
 	udelay(500);
-	nv_wr32(priv, 0x61a00c + doff, 0x80000000);
+
+	/*
+	 * The original nv50 detects a ghost monitor if we do the following
+	 * write. See fdo#67382 for more information
+	 */
+	if (nv_device(priv)->chipset != 0x50)
+		nv_wr32(priv, 0x61a00c + doff, 0x80000000);
+
 	load = (nv_rd32(priv, 0x61a00c + doff) & 0x38000000) >> 27;
 	nv_wr32(priv, 0x61a00c + doff, 0x00000000);
 	nv_mask(priv, 0x61a004 + doff, 0x807f0000, 0x80550000);
-- 
1.8.3.4

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

* Re: [Nouveau] [PATCH] drm/nv50/disp: prevent false output detection on the original nv50
  2013-08-23 17:43 [PATCH] drm/nv50/disp: prevent false output detection on the original nv50 Emil Velikov
@ 2013-09-04  1:07 ` Ben Skeggs
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Skeggs @ 2013-09-04  1:07 UTC (permalink / raw)
  To: Emil Velikov; +Cc: Ben Skeggs, nouveau, stable

On Sat, Aug 24, 2013 at 3:43 AM, Emil Velikov <emil.l.velikov@gmail.com> wrote:
> Commit ea9197cc323839ef3d5280c0453b2c622caa6bc7 effectively enabled the
> use of an improved DAC detection code, but introduced a regression on
> the original nv50 chipset, causing a ghost monitor to be detected.
Hey Emil,

I've merged this patch, modified (after some experimenting on both
NV50 and GK106) to make this change unconditional for all chipsets.

Thanks :)

Ben.

>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67382
> Tested-by: Martin Peres <martin.peres@labri.fr>
> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
> Cc: <stable@vger.kernel.org> # 3.9+
> ---
>  drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c b/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
> index f02fd9f..15df527 100644
> --- a/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
> +++ b/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
> @@ -55,7 +55,14 @@ nv50_dac_sense(struct nv50_disp_priv *priv, int or, u32 loadval)
>         nv_wr32(priv, 0x61a00c + doff, 0x00100000 | loadval);
>         mdelay(9);
>         udelay(500);
> -       nv_wr32(priv, 0x61a00c + doff, 0x80000000);
> +
> +       /*
> +        * The original nv50 detects a ghost monitor if we do the following
> +        * write. See fdo#67382 for more information
> +        */
> +       if (nv_device(priv)->chipset != 0x50)
> +               nv_wr32(priv, 0x61a00c + doff, 0x80000000);
> +
>         load = (nv_rd32(priv, 0x61a00c + doff) & 0x38000000) >> 27;
>         nv_wr32(priv, 0x61a00c + doff, 0x00000000);
>         nv_mask(priv, 0x61a004 + doff, 0x807f0000, 0x80550000);
> --
> 1.8.3.4
>
> _______________________________________________
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau

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

end of thread, other threads:[~2013-09-04  1:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-23 17:43 [PATCH] drm/nv50/disp: prevent false output detection on the original nv50 Emil Velikov
2013-09-04  1:07 ` [Nouveau] " Ben Skeggs

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.