From patchwork Tue Jun 13 23:15:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 9785073 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 C867E60384 for ; Wed, 14 Jun 2017 00:42:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB88828567 for ; Wed, 14 Jun 2017 00:42:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B09FA28573; Wed, 14 Jun 2017 00:42:27 +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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 55C6B28567 for ; Wed, 14 Jun 2017 00:42:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9BD116E408; Wed, 14 Jun 2017 00:41:05 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x244.google.com (mail-lf0-x244.google.com [IPv6:2a00:1450:4010:c07::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id A9C046E3D1 for ; Tue, 13 Jun 2017 23:38:53 +0000 (UTC) Received: by mail-lf0-x244.google.com with SMTP id v20so14870481lfa.2 for ; Tue, 13 Jun 2017 16:38:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=miDRbwOtSsC2EtB9HV02/l/H16tzyOV6iF2Pv8ZmZa0=; b=B6brwE4xgAAZ2/5Qpoo7OcHyzh/wyE6q6PK3n5B0aLDXqALbk+2dq70uYywqrgwFrR 7kKlb8EEY3At1Rya4UPRLDI3x0h8eBt8klLblI+A0ZMxYQaK7B080cKZ23e4umKLPW0I 3yrKjxfEQe/wdWRduIxpUu85LIM9uoP0ugPhU9puEvd3X4XnR453kFRoa+FMO13iClM3 /33kN5R/cc9R2A7kiKhAeuU6Rk4pTDvHMlhWSKPFbhToEkvks/6wY+tBC3zKZU0WhuVC gWU89Z/Ua+i6isLrcFcEcrNQDz4ZqKh1XjCBlH+FomlvaTjUMkiSGhgFSBrkRqHVQLZ0 xiBg== 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:in-reply-to :references:in-reply-to:references; bh=miDRbwOtSsC2EtB9HV02/l/H16tzyOV6iF2Pv8ZmZa0=; b=kjKe+xKpCkgzs0o683cjg/wEjkaDLJzMP0efhbURQQTZ5O+o0TNw6uv1dUQRc181yB nw6MvDIayjvZSeq5Fia9O5u2uD76E/MZi4e35myLgNVK1YZptVUpT9TphF8xgCn0dUt0 DaDaOs8DeAy2LG2IJft2VtgINb2L/e5+/8tCHFoRNEPKvFA7vIagYYI0souczd5u04Ld /Ie9avU9Wfc/gGHwFRMUnUOrcMS7ur6jd2QkVejlXqAUhRK4CWo0dtqkqRv9f6K4Amlu pxceFgquJegw6vN6RKKY+Uc1aUodM3X2GCkjhJCIbTX3QUcHVMrxphw0BQFkxD4DmPoN EuHw== X-Gm-Message-State: AKS2vOzFnvn00pIxnmYxLZTWo+h+duRJDGo3OzGjyTL4rJEhMZyNUSAD aJrvwjmufXdQxw== X-Received: by 10.46.88.65 with SMTP id x1mr619841ljd.105.1497397132185; Tue, 13 Jun 2017 16:38:52 -0700 (PDT) Received: from localhost.localdomain (ppp109-252-91-7.pppoe.spdop.ru. [109.252.91.7]) by smtp.gmail.com with ESMTPSA id f27sm3785725lfa.27.2017.06.13.16.38.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jun 2017 16:38:51 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Mikko Perttunen , Erik Faye-Lund Subject: [PATCH v2 09/22] drm/tegra: Don't use IOMMU on Tegra20 Date: Wed, 14 Jun 2017 02:15:48 +0300 Message-Id: X-Mailer: git-send-email 2.13.0 In-Reply-To: References: In-Reply-To: References: X-Mailman-Approved-At: Wed, 14 Jun 2017 00:41:00 +0000 Cc: linux-tegra@vger.kernel.org, DRI Development 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 There is no IOMMU on Tegra20, instead a GART would be picked as an IOMMU provider. Signed-off-by: Dmitry Osipenko Acked-by: Joerg Roedel --- drivers/gpu/drm/tegra/drm.c | 3 ++- drivers/gpu/host1x/dev.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c index e999391aedc9..aa7988dcc28f 100644 --- a/drivers/gpu/drm/tegra/drm.c +++ b/drivers/gpu/drm/tegra/drm.c @@ -131,7 +131,8 @@ static int tegra_drm_load(struct drm_device *drm, unsigned long flags) if (!tegra) return -ENOMEM; - if (iommu_present(&platform_bus_type)) { + if (iommu_present(&platform_bus_type) && + !of_machine_is_compatible("nvidia,tegra20")) { u64 carveout_start, carveout_end, gem_start, gem_end; struct iommu_domain_geometry *geometry; unsigned long order; diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c index f05ebb14fa63..6a805ed908c3 100644 --- a/drivers/gpu/host1x/dev.c +++ b/drivers/gpu/host1x/dev.c @@ -177,7 +177,8 @@ static int host1x_probe(struct platform_device *pdev) return err; } - if (iommu_present(&platform_bus_type)) { + if (iommu_present(&platform_bus_type) && + !of_machine_is_compatible("nvidia,tegra20")) { struct iommu_domain_geometry *geometry; unsigned long order;