Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2091366ybp; Thu, 10 Oct 2019 02:02:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxn1gAkQ2q8clxW0diKhHs6s1l+0PBiyDuK1TOCM2nKXeqFPfpCtMe8nXijZTIH5VmeE2dK X-Received: by 2002:aa7:c513:: with SMTP id o19mr6948147edq.75.1570698155140; Thu, 10 Oct 2019 02:02:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570698155; cv=none; d=google.com; s=arc-20160816; b=Q6iJrVsQfPQ7RSNykf0Cm/58jqDTDt/fryvuU2sjsUhGqe2wXpuuHZXrRsbicb++Rr Q8IJwc7CH16RWAj4P/lkL2kQrQ+gB47vrqv6dp5RaCrP3//5+WoXHOZXTjLU6lE8jJfl hf2othd1Y5Zvih/0ID1feu9E9ecQwzZrz9koxhJC8PnvuKaTjEAqL6iGpc8tXCzGTCc2 eYg4jHhqrwMv+NFfiKy/70Bja4sYyKKcqdKoA8gWWwX0BlYb6l2ehU/lVb4vFGdy9NZj Xl5st6bedN2E92vZfyURhaHxDXzCO3uPpmEmFyS0UIZhUsrmq99D+PoLuWA3zVdcZin+ 0IRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sYVT4UMsOrrSJa8lsix11kwJ06H3nFBnNKSBO2FkNg8=; b=pMEcMhymlwHqOnx6AgJ3w1ZxBJcR5HyZpNcd7rjOmDMpbnl5MNJ9QkkliWOIcyWRc1 0N18z4dxJmFqvFk99WQqYsn5ivltv5nxFC5mOei2pnw2eMXicvL7mQfyQ0TMSpQDi831 JYzTKunjlhi9NWm4mk1CL13d2tVhP3KfkNS83C8rZK/7w0T2PTXG5zdD+Ql1DQ7ni4Y4 AbM8fcXEi9+mdNT3U6G9aVgFGMQ2ybWsrtQ1t093GWahRr9tNyLtZc65or4HBdoCTCgh 0ixDUMOXlzp4c2zeFiN+j9Tw4ePoqYrX6YhqwfdWDCvp+KWlTwdOSm5fCVfXRrw1Dnjt fZcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zkLZ5HFO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z10si2835488edx.168.2019.10.10.02.02.11; Thu, 10 Oct 2019 02:02:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zkLZ5HFO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388135AbfJJIkf (ORCPT + 99 others); Thu, 10 Oct 2019 04:40:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:44656 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388130AbfJJIkd (ORCPT ); Thu, 10 Oct 2019 04:40:33 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7BCF020B7C; Thu, 10 Oct 2019 08:40:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570696833; bh=CKEUoS5guBiWrctm6vPTH86U8L1Xu99HdNAMHySxioY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zkLZ5HFOcASfh/3VP/hlgS/wWBRv9XNvCy0PTw8OSAh5tXbEo/IQ0z6JRGafrhmIy 52D7jWUbW4JLph7TgwGJx5FOQy6EIcejO0edPbyPVvjM4gJkuOMpVMXB2ROffmoi2Y ViU3x6ia46nyZ7yIDq2r7x8ID2K2jJiSZl217Qr4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lyude Paul , Ben Skeggs Subject: [PATCH 5.3 068/148] drm/nouveau/kms/nv50-: Dont create MSTMs for eDP connectors Date: Thu, 10 Oct 2019 10:35:29 +0200 Message-Id: <20191010083615.554219830@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191010083609.660878383@linuxfoundation.org> References: <20191010083609.660878383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lyude Paul commit 698c1aa9f83b618de79e9e5e19a58f70a4a6ae0f upstream. 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 Cc: stable@vger.kernel.org Signed-off-by: Ben Skeggs Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- 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 *co 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,