From patchwork Mon Nov 28 14:24:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 9449581 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1AB44600CB for ; Mon, 28 Nov 2016 14:24:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D3332675C for ; Mon, 28 Nov 2016 14:24:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 01B8E27CF3; Mon, 28 Nov 2016 14:24:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9B1BE2675C for ; Mon, 28 Nov 2016 14:24:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A177D6E37C; Mon, 28 Nov 2016 14:24:12 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id 29FD06E37C; Mon, 28 Nov 2016 14:24:11 +0000 (UTC) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DF9F6F44F2; Mon, 28 Nov 2016 14:24:09 +0000 (UTC) Received: from shalem.localdomain.com (vpn1-6-29.ams2.redhat.com [10.36.6.29]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uASEO8tp017701; Mon, 28 Nov 2016 09:24:08 -0500 From: Hans de Goede To: Ben Skeggs Subject: [PATCH] drm/nouveau: Add Lenovo P70 to apply_dcb_encoder_quirks Date: Mon, 28 Nov 2016 15:24:07 +0100 Message-Id: <20161128142407.9832-1-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 28 Nov 2016 14:24:09 +0000 (UTC) Cc: nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Hans de Goede X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The Lenono P70's HDMI connector is listed twice, both as DP and as DVI connector. Ignore the DVI entry, making all ports show up as DP ports, like on the non-broken P50 model. Signed-off-by: Hans de Goede --- drivers/gpu/drm/nouveau/nouveau_bios.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 23ffe85..ef2e6fd 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c @@ -1746,6 +1746,17 @@ apply_dcb_encoder_quirks(struct drm_device *dev, int idx, u32 *conn, u32 *conf) *conn = 0x02000312; } + /* + * Lenovo P70: HMDI connector listed as both DP and DVI, + * ignore the DVI entry. + */ + if (nv_match_device(dev, 0x13f9, 0x17aa, 0x222d)) { + if (idx == 7) { + *conn = 0x0000000f; + *conf = 0x00000000; + } + } + return true; }