linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] drm/nouveau: dispnv50: Don't create MSTMs for eDP connectors
@ 2019-09-13 22:03 Lyude Paul
  2019-09-13 22:03 ` [PATCH 2/4] drm/nouveau: dispnv50: Remove nv50_mstc_best_encoder() Lyude Paul
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Lyude Paul @ 2019-09-13 22:03 UTC (permalink / raw)
  To: nouveau
  Cc: stable, Ben Skeggs, David Airlie, Daniel Vetter, Sam Ravnborg,
	Laurent Pinchart, Ilia Mirkin, dri-devel, linux-kernel

On the ThinkPad P71, we have one eDP connector exposed along with 5 DP
connectors, resulting in a total of 11 TMDS encoders. Since the GPU on
this system is also capable of MST, we create an additional 4 fake MST
encoders for each DP port. Unfortunately, we also do this for the eDP
port as well, resulting in:

  1 eDP port: +1 TMDS encoder
              +4 DPMST encoders
  5 DP ports: +2 TMDS encoders
              +4 DPMST encoders
	      *5 ports
	      == 35 encoders

Which breaks things, since DRM has a hard coded limit of 32 encoders.
So, fix this by not creating MSTMs for any eDP connectors. This brings
us down to 31 encoders, although we can do better.

This fixes driver probing for nouveau on the ThinkPad P71.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: stable@vger.kernel.org
---
 drivers/gpu/drm/nouveau/dispnv50/disp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index 307584107d77..b46be8a091e9 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -1603,7 +1603,8 @@ nv50_sor_create(struct drm_connector *connector, struct dcb_output *dcbe)
 			nv_encoder->aux = aux;
 		}
 
-		if ((data = nvbios_dp_table(bios, &ver, &hdr, &cnt, &len)) &&
+		if (nv_connector->type != DCB_CONNECTOR_eDP &&
+		    (data = nvbios_dp_table(bios, &ver, &hdr, &cnt, &len)) &&
 		    ver >= 0x40 && (nvbios_rd08(bios, data + 0x08) & 0x04)) {
 			ret = nv50_mstm_new(nv_encoder, &nv_connector->aux, 16,
 					    nv_connector->base.base.id,
-- 
2.21.0


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

end of thread, other threads:[~2019-09-13 22:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-13 22:03 [PATCH 1/4] drm/nouveau: dispnv50: Don't create MSTMs for eDP connectors Lyude Paul
2019-09-13 22:03 ` [PATCH 2/4] drm/nouveau: dispnv50: Remove nv50_mstc_best_encoder() Lyude Paul
2019-09-13 22:20   ` Ilia Mirkin
2019-09-13 22:21     ` Lyude Paul
2019-09-13 22:37   ` [PATCH v2] " Lyude Paul
2019-09-13 22:03 ` [PATCH 3/4] drm/nouveau: dispnv50: Use less encoders by making mstos per-head Lyude Paul
2019-09-13 22:03 ` [PATCH 4/4] drm/nouveau: dispnv50: Report possible_crtcs incorrectly on mstos, for now Lyude Paul

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).