From patchwork Mon Dec 9 11:59:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 11279253 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4197E112B for ; Mon, 9 Dec 2019 12:00:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 292AE2077B for ; Mon, 9 Dec 2019 12:00:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 292AE2077B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 97EB16E419; Mon, 9 Dec 2019 12:00:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0D63D6E41D; Mon, 9 Dec 2019 12:00:09 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id j42so15830746wrj.12; Mon, 09 Dec 2019 04:00:08 -0800 (PST) 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:mime-version :content-transfer-encoding; bh=jVo4EgL5w5uDzGazf3l7wTsJXSg/MMHtXYeNv2rCsg0=; b=ZdYZI627dPCjgDyIKvsq4y9+nWq5Qa3teDBxZpjWaIP2yrba1GJ4dIRi8KrV/J3wIf EN7VsBFoWQ3FBaN+SFjcjr61si42UtvYxiXZmd4mBFe68ltE51fzOhB7drpuRZQEfiNu Kz2uUxSdabmQ1hop5EL/sx04xJGr8rDroOeC/G7NoOWjCvKaNhMvTx9d6+XBXVMRZAqK +Kff29M6wBJxqYuDTq4FZ4PglpJVB7oFr2s33XkcyrQyMaM7DCWdwEoiK5yfO1yHwDLF HTFQXBbAfk+ZB4ghNlUo3BDgru1z4X8KQSKHJRJ0BzYCJz0IrrqTOByWjq2F6l9RogtE QA2A== X-Gm-Message-State: APjAAAV7IkHzRUBoaOmRAt2p65onkl8qJo0d6Pqi5pV0Nz7ucUot+EhR DFyUcy2TgzeR5MV9MqGNEAhC61Wf X-Google-Smtp-Source: APXvYqxvFtxU6WB/3/ekW7w5obFZRKXEM9dhhw5b2O7nuk/LQYLOnnP+CjtLvAnv6TgIKMEEED5xxg== X-Received: by 2002:a5d:528e:: with SMTP id c14mr1828916wrv.308.1575892807435; Mon, 09 Dec 2019 04:00:07 -0800 (PST) Received: from localhost (pD9E518ED.dip0.t-ipconnect.de. [217.229.24.237]) by smtp.gmail.com with ESMTPSA id y139sm13774689wmd.24.2019.12.09.04.00.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2019 04:00:06 -0800 (PST) From: Thierry Reding To: Ben Skeggs Subject: [PATCH v3 0/9] drm/nouveau: Various fixes for GP10B Date: Mon, 9 Dec 2019 12:59:56 +0100 Message-Id: <20191209120005.2254786-1-thierry.reding@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jVo4EgL5w5uDzGazf3l7wTsJXSg/MMHtXYeNv2rCsg0=; b=SOtdMTkeK4Pz/v4aVYilY6jLxtIONogeSbNmCED6mecKqiMNQmaVrWE6AOzhiMrm9H mCp06313qLGpUBnFQRrvFW32/EnbuZzn1//FBzNena9YePQCuAj7P0Tn9w0JkemC8gng Bq3kMuj0QL2Pk9zNr60qvJuLHMxJP3dEW8eximpgUIJSIOFgOJLEeGuZ3fVAG5EfMDir grgBrRPkKuWhoLBozRiIvgM7P27yv3+jo3xkqAIwbY9g6ESHBan2BzItHP0G3/qv0pko aUX+Y7kvINbNerW6MoZVmMSgvvcT/Xq8GURz8bxVWsmM4F6mL0nDKpf/gus+2FF1rTbW Y2HQ== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Thierry Reding Hi Ben, here's a revised subset of the patches I had sent out a couple of weeks ago. I've reworked the BAR2 accesses in the way that you had suggested, which at least for GP10B turned out to be fairly trivial to do. I have not looked in detail at this for GV11B yet, but a cursory look showed that BAR2 is accessed in more places, so the equivalent for GV11B might be a bit more involved. Other than that, not a lot has changed since then. I've added a couple of precursory patches to add IOMMU helper dummies for the case where IOMMU is disabled (as suggested by Ben Dooks). Joerg has given an Acked-by on the first two patches, so I think it'd be easiest if you picked those up into the Nouveau tree because of the build dependency of subsequent patches on them. Thierry Thierry Reding (9): iommu: Document iommu_fwspec::flags field iommu: Add dummy dev_iommu_fwspec_get() helper drm/nouveau: fault: Add support for GP10B drm/nouveau: tegra: Do not try to disable PCI device drm/nouveau: tegra: Avoid pulsing reset twice drm/nouveau: tegra: Set clock rate if not set drm/nouveau: secboot: Read WPR configuration from GPU registers drm/nouveau: gp10b: Add custom L2 cache implementation drm/nouveau: gp10b: Use correct copy engine .../drm/nouveau/include/nvkm/subdev/fault.h | 1 + .../gpu/drm/nouveau/include/nvkm/subdev/ltc.h | 1 + drivers/gpu/drm/nouveau/nouveau_drm.c | 3 +- .../gpu/drm/nouveau/nvkm/engine/device/base.c | 6 +- .../drm/nouveau/nvkm/engine/device/tegra.c | 24 ++++-- .../gpu/drm/nouveau/nvkm/subdev/fault/Kbuild | 1 + .../gpu/drm/nouveau/nvkm/subdev/fault/base.c | 2 +- .../gpu/drm/nouveau/nvkm/subdev/fault/gp100.c | 17 ++-- .../gpu/drm/nouveau/nvkm/subdev/fault/gp10b.c | 53 ++++++++++++ .../gpu/drm/nouveau/nvkm/subdev/fault/gv100.c | 1 + .../gpu/drm/nouveau/nvkm/subdev/fault/priv.h | 10 +++ .../gpu/drm/nouveau/nvkm/subdev/ltc/Kbuild | 1 + .../gpu/drm/nouveau/nvkm/subdev/ltc/gp10b.c | 65 +++++++++++++++ .../gpu/drm/nouveau/nvkm/subdev/ltc/priv.h | 2 + .../drm/nouveau/nvkm/subdev/secboot/gm200.h | 2 +- .../drm/nouveau/nvkm/subdev/secboot/gm20b.c | 81 ++++++++++++------- .../drm/nouveau/nvkm/subdev/secboot/gp10b.c | 4 +- include/linux/iommu.h | 47 ++++++----- 18 files changed, 249 insertions(+), 72 deletions(-) create mode 100644 drivers/gpu/drm/nouveau/nvkm/subdev/fault/gp10b.c create mode 100644 drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp10b.c