All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: nouveau@lists.freedesktop.org
Cc: Hauke Mehrtens <hauke@hauke-m.de>, dri-devel@lists.freedesktop.org
Subject: [PATCH 1/2] drm/nouveau: activate dual link TMDS links only when possible
Date: Sat,  8 Aug 2015 19:01:14 +0200	[thread overview]
Message-ID: <1439053275-3323-2-git-send-email-hauke@hauke-m.de> (raw)
In-Reply-To: <1439053275-3323-1-git-send-email-hauke@hauke-m.de>

Without this patch a pixel clock rate above 165 MHz on a TMDS link is
assumed to be dual link. This is true for DVI, but not for HDMI. HDMI
supports no dual link, but it supports pixel clock rates above 165 MHz.
Only activate Dual Link mode when it is actual possible.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 drivers/gpu/drm/nouveau/nv50_display.c           | 8 ++++----
 drivers/gpu/drm/nouveau/nvkm/engine/disp/gf110.c | 2 +-
 drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c  | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
index 981342d..7d11763 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@ -1936,10 +1936,10 @@ nv50_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *umode,
 	switch (nv_encoder->dcb->type) {
 	case DCB_OUTPUT_TMDS:
 		if (nv_encoder->dcb->sorconf.link & 1) {
-			if (mode->clock < 165000)
-				proto = 0x1;
-			else
-				proto = 0x5;
+			proto = 0x1;
+			if (mode->clock >= 165000 &&
+			    nv_encoder->dcb->duallink_possible)
+				proto |= 0x4;
 		} else {
 			proto = 0x2;
 		}
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/gf110.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/gf110.c
index 7f2f05f..ed2b08f 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/gf110.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/gf110.c
@@ -895,7 +895,7 @@ exec_clkcmp(struct nv50_disp_priv *priv, int head, int id, u32 pclk, u32 *conf)
 	switch (outp->info.type) {
 	case DCB_OUTPUT_TMDS:
 		*conf = (ctrl & 0x00000f00) >> 8;
-		if (pclk >= 165000)
+		if (pclk >= 165000 && outp->info.duallink_possible)
 			*conf |= 0x0100;
 		break;
 	case DCB_OUTPUT_LVDS:
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c
index 8ba808d..594c228 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c
@@ -1544,7 +1544,7 @@ exec_clkcmp(struct nv50_disp_priv *priv, int head, int id, u32 pclk, u32 *conf)
 		switch (outp->info.type) {
 		case DCB_OUTPUT_TMDS:
 			*conf = (ctrl & 0x00000f00) >> 8;
-			if (pclk >= 165000)
+			if (pclk >= 165000 && outp->info.duallink_possible)
 				*conf |= 0x0100;
 			break;
 		case DCB_OUTPUT_LVDS:
-- 
2.1.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-08-08 17:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-08 17:01 [PATCH 0/2] drm/nouveau: add support for 2560x1440@56 over HDMI Hauke Mehrtens
2015-08-08 17:01 ` Hauke Mehrtens [this message]
2015-08-08 17:01 ` [PATCH 2/2] drm/nouveau: increase max pixel clock to 225 MHZ for HDMI Hauke Mehrtens
     [not found] ` <1439053275-3323-1-git-send-email-hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
2015-08-17 18:04   ` [PATCH 0/2] drm/nouveau: add support for 2560x1440@56 over HDMI Hauke Mehrtens
2015-08-25  5:09     ` [Nouveau] " Ben Skeggs
     [not found]       ` <CACAvsv6cU7t317dM-HQzoHcbg--BmyX9HsGzkzQHv705BCyDFA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-31 20:50         ` Hauke Mehrtens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1439053275-3323-2-git-send-email-hauke@hauke-m.de \
    --to=hauke@hauke-m.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=nouveau@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.