From patchwork Tue Feb 14 19:34:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Drake X-Patchwork-Id: 9572597 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 90BD660589 for ; Tue, 14 Feb 2017 19:34:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8732C20881 for ; Tue, 14 Feb 2017 19:34:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BDBA26E77; Tue, 14 Feb 2017 19:34:29 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 0A61020881 for ; Tue, 14 Feb 2017 19:34:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4F9966E79C; Tue, 14 Feb 2017 19:34:27 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-vk0-x231.google.com (mail-vk0-x231.google.com [IPv6:2607:f8b0:400c:c05::231]) by gabe.freedesktop.org (Postfix) with ESMTPS id C98326E79C for ; Tue, 14 Feb 2017 19:34:25 +0000 (UTC) Received: by mail-vk0-x231.google.com with SMTP id x75so86500950vke.2 for ; Tue, 14 Feb 2017 11:34:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=endlessm-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=KuKogcpwYqlDwDazM2RX+FiZPq9jaIqXi1P/k63lY9k=; b=IsBu7SkWbNhblXm6AbRyhPZGsM/wDHMh4bROA3L4o2bzVCK0jSQQzEXuKaGiL3WumU LRgBipiYewuY+MbcpII0pUEzCMKuhcxC99CEqI8Y1bYrH11HdffbZKNASnPMTzumbPO7 SBh9gVTv/ZA57detXpdKhhitSpx7lTSia7LfD/tyulzlM43UJ9NlwaIhRyf7qVlRNe07 SEbDKISNFKe8y4J7yKgxBDtrrp8LfTsX+ZAm8C0y5l66b4tWMzHElmkeXuk41DO2fowR h2KQiy6fg4UWqxF3iY3dYdWDAUCk69KTKFSm3raIUav+vYl+FXGmuydWBnKWh3gAr/2i m4sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=KuKogcpwYqlDwDazM2RX+FiZPq9jaIqXi1P/k63lY9k=; b=CcTMUBfJ9akVGgGIqPScpdGa7D+dLYlppBDofuGV16JGlDm1mnjvYFNL8n+V4eCGDa o72KDQXxUwwPCetoFD6KtSwz14p6eDmbKQCSEPuFDYn3uDpNqk4IVJoprxdBP/yyVopO OZMlIPJhVCHDzo5Xy1SZd4Fc6KFicBiStsn78MdR2wMAC+STuVBIZgCSavsGuA35g2JK waDwc0iu+7pfhnlGWs2xqaECKflzDq/zUMDpoe4m2cfv+POtl/k+eSIHBSe/TCPq0KjM tklTiOj2kS9JXoOzKk9YB4lZZoJvVGpMa98t9c3nN5UgBDPzgNnb25V9ZsoWT3hV4Fof Df4w== X-Gm-Message-State: AMke39l5b8LyBI0FH87TM+22UjZOg+/ISO7fbxTfpFe29NpW8EXvHecSCIor/7ECM7HQkES+ X-Received: by 10.31.134.142 with SMTP id i136mr15991453vkd.56.1487100864953; Tue, 14 Feb 2017 11:34:24 -0800 (PST) Received: from nuc.gallo.pinto ([186.77.198.144]) by smtp.gmail.com with ESMTPSA id h83sm386775vka.21.2017.02.14.11.34.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Feb 2017 11:34:24 -0800 (PST) From: Daniel Drake To: bskeggs@redhat.com Subject: [PATCH] drm/nouveau/core: recognise GP107 chipset Date: Tue, 14 Feb 2017 13:34:19 -0600 Message-Id: <20170214193419.16711-1-drake@endlessm.com> X-Mailer: git-send-email 2.9.3 Cc: linux@endlessm.com, nouveau@lists.freedesktop.org, chiu@endlessm.com, dri-devel@lists.freedesktop.org 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 From: Chris Chiu This new graphics card was failing to initialize with nouveau due to an "unknown chipset" error. Copy the GP106 configuration and rename for GP107/NV137. We don't know for certain that this is fully correct, but brief desktop testing suggests this is working fine. Signed-off-by: Chris Chiu Signed-off-by: Daniel Drake --- drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c index fea30d6..d242431 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c @@ -2237,6 +2237,34 @@ nv136_chipset = { .fifo = gp100_fifo_new, }; +static const struct nvkm_device_chip +nv137_chipset = { + .name = "GP107", + .bar = gf100_bar_new, + .bios = nvkm_bios_new, + .bus = gf100_bus_new, + .devinit = gm200_devinit_new, + .fb = gp104_fb_new, + .fuse = gm107_fuse_new, + .gpio = gk104_gpio_new, + .i2c = gm200_i2c_new, + .ibus = gm200_ibus_new, + .imem = nv50_instmem_new, + .ltc = gp100_ltc_new, + .mc = gp100_mc_new, + .mmu = gf100_mmu_new, + .pci = gp100_pci_new, + .timer = gk20a_timer_new, + .top = gk104_top_new, + .ce[0] = gp104_ce_new, + .ce[1] = gp104_ce_new, + .ce[2] = gp104_ce_new, + .ce[3] = gp104_ce_new, + .disp = gp104_disp_new, + .dma = gf119_dma_new, + .fifo = gp100_fifo_new, +}; + static int nvkm_device_event_ctor(struct nvkm_object *object, void *data, u32 size, struct nvkm_notify *notify) @@ -2673,6 +2701,7 @@ nvkm_device_ctor(const struct nvkm_device_func *func, case 0x130: device->chip = &nv130_chipset; break; case 0x134: device->chip = &nv134_chipset; break; case 0x136: device->chip = &nv136_chipset; break; + case 0x137: device->chip = &nv137_chipset; break; default: nvdev_error(device, "unknown chipset (%08x)\n", boot0); goto done;