From: Ben Skeggs <skeggsb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>,
Ben Skeggs <bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
Hauke Mehrtens <hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
Subject: Re: [PATCH 1/2] disp: activate dual link TMDS links only when possible
Date: Wed, 4 Nov 2015 10:02:57 +1000 [thread overview]
Message-ID: <56394B31.2050504@gmail.com> (raw)
In-Reply-To: <1446590484-8670-1-git-send-email-imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 2859 bytes --]
On 11/04/2015 08:41 AM, Ilia Mirkin wrote:
> From: Hauke Mehrtens <hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
>
> 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-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
> Signed-off-by: Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
> ---
> drm/nouveau/nv50_display.c | 8 ++++----
> drm/nouveau/nvkm/engine/disp/gf119.c | 2 +-
> drm/nouveau/nvkm/engine/disp/nv50.c | 2 +-
> 3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drm/nouveau/nv50_display.c b/drm/nouveau/nv50_display.c
> index c053c50..93bcfdf 100644
> --- a/drm/nouveau/nv50_display.c
> +++ b/drm/nouveau/nv50_display.c
> @@ -1961,10 +1961,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;
This is a somewhat flaky condition, given that one could plug a
single-link HDMI monitor into a duallink-capable TMDS connector.
Still, it's an improvement :)
> } else {
> proto = 0x2;
> }
> diff --git a/drm/nouveau/nvkm/engine/disp/gf119.c b/drm/nouveau/nvkm/engine/disp/gf119.c
> index 186fd3a..8691b68 100644
> --- a/drm/nouveau/nvkm/engine/disp/gf119.c
> +++ b/drm/nouveau/nvkm/engine/disp/gf119.c
> @@ -158,7 +158,7 @@ exec_clkcmp(struct nv50_disp *disp, 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;
I think it might be more robust to key this off the SOR protocol, rather
than duplicating the condition above.
> break;
> case DCB_OUTPUT_LVDS:
> diff --git a/drm/nouveau/nvkm/engine/disp/nv50.c b/drm/nouveau/nvkm/engine/disp/nv50.c
> index 32e73a9..ceecd0e 100644
> --- a/drm/nouveau/nvkm/engine/disp/nv50.c
> +++ b/drm/nouveau/nvkm/engine/disp/nv50.c
> @@ -391,7 +391,7 @@ exec_clkcmp(struct nv50_disp *disp, 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;
Same here.
> break;
> case DCB_OUTPUT_LVDS:
>
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
next prev parent reply other threads:[~2015-11-04 0:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-03 22:41 [PATCH 1/2] disp: activate dual link TMDS links only when possible Ilia Mirkin
[not found] ` <1446590484-8670-1-git-send-email-imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
2015-11-03 22:41 ` [PATCH 2/2] connector: allow 225/297MHz pixel clocks for HDMI on Fermi/Kepler Ilia Mirkin
2015-11-04 0:02 ` Ben Skeggs [this message]
[not found] ` <56394B31.2050504-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-11-04 0:37 ` [PATCH 1/2] disp: activate dual link TMDS links only when possible Ilia Mirkin
[not found] ` <CAKb7Uvi1uJt29hW4-VbVCwaTD4cOT5VZ9AbFvUdUYg8NZ957hA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-04 1:10 ` Ben Skeggs
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=56394B31.2050504@gmail.com \
--to=skeggsb-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org \
--cc=imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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.