From patchwork Tue May 23 00:16:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 9741659 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 68BA960210 for ; Tue, 23 May 2017 01:02:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E509286EC for ; Tue, 23 May 2017 01:02:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 532A028779; Tue, 23 May 2017 01:02:26 +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 14F4E286EC for ; Tue, 23 May 2017 01:02:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A0EF6E311; Tue, 23 May 2017 01:00:27 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x242.google.com (mail-lf0-x242.google.com [IPv6:2a00:1450:4010:c07::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 48A9089DA3 for ; Tue, 23 May 2017 00:16:57 +0000 (UTC) Received: by mail-lf0-x242.google.com with SMTP id q24so6677387lfb.1 for ; Mon, 22 May 2017 17:16:57 -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; bh=Ng24lXlGqS9IdsNK2BNwyTmwaldFUL1rhCtkseOSq0A=; b=swGnXersnHaysIV+JLnZKd9hLZKYtlO78tdCRRxpjJFa0ARwu91rPi8i0NXg1bskM3 TbxG3unHRfBhrtaX1IH2jkWxib4K7JgOqlGVMEV+hn+CmcKEoHkvnAsNvBtMVcLPftoH Gt6C8Bd43YwO5KyCxxYJ3J2CJeP8UrlXtrboKd3Zed1N7OhlxT76PpStkLIqZz9sYiZt m7a5pWkWm+w2kEg77pCOU4B2HpOPY4egZ+NuF8gqywChTgrhM6zX9ATDM0kQ4OKvwl+N GJA8PLU8JW4pQe7ciZmQqkq2EaMuYFP571WWl1Erykc2ZMZXn7AhLnRq8TINQDa6/heC JdZQ== 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; bh=Ng24lXlGqS9IdsNK2BNwyTmwaldFUL1rhCtkseOSq0A=; b=Rg0E4a9TtMd2Ago91XV+4oWRlG29anK/tNfPzLdILeHV7/f9sApRLCzQhOUyBrbydv +5v4hgXfqGcuRrvKzKopJ63OC9GQZLGUXQaMBeUlV0mj0cupErcDEt+dL51a70w8H7hy 3xIUJewCoyHl7Br2xJHs5quN6uID9U/2K7RNg9mDrGyO9AOscRf54O6VKfCQ2mtiAPqU 0TwMvidPgejqQ52RBmw9CFsVW+rl//P/EKtP8v18oneQxdtaNJ61lYN1IRvsqcNazoHR KXI5wyBM2csw8gBQxonpPXyqg9wpGmoeogXBNYMX4AT7oogtBpqc/N92FYkYUeFuicwG Zefg== X-Gm-Message-State: AODbwcCON1xtw2Myv1SZeNKKIW5GlgZAxdAZVoiWnYLJlDj7HvErMVwu +WPyGjqUXaRE0A== X-Received: by 10.25.215.198 with SMTP id q67mr6078511lfi.76.1495498615615; Mon, 22 May 2017 17:16:55 -0700 (PDT) Received: from localhost.localdomain (ppp109-252-91-175.pppoe.spdop.ru. [109.252.91.175]) by smtp.gmail.com with ESMTPSA id m3sm3450189ljb.15.2017.05.22.17.16.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 May 2017 17:16:55 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Mikko Perttunen , Joerg Roedel Subject: [PATCH 21/22] drm/tegra: Don't use IOMMU on Tegra20 Date: Tue, 23 May 2017 03:16:32 +0300 Message-Id: X-Mailer: git-send-email 2.13.0 In-Reply-To: References: X-Mailman-Approved-At: Tue, 23 May 2017 00:59:38 +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 --- drivers/gpu/drm/tegra/drm.c | 5 ++++- drivers/gpu/host1x/dev.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c index 17416e1c219a..ac8f76d9475f 100644 --- a/drivers/gpu/drm/tegra/drm.c +++ b/drivers/gpu/drm/tegra/drm.c @@ -15,6 +15,8 @@ #include #include +#include + #include "drm.h" #include "gem.h" @@ -131,7 +133,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) && + tegra_get_chip_id() != 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 5c1c711a21af..56b7e6d51894 100644 --- a/drivers/gpu/host1x/dev.c +++ b/drivers/gpu/host1x/dev.c @@ -25,6 +25,8 @@ #include #include +#include + #define CREATE_TRACE_POINTS #include #undef CREATE_TRACE_POINTS @@ -177,7 +179,8 @@ static int host1x_probe(struct platform_device *pdev) return err; } - if (iommu_present(&platform_bus_type)) { + if (iommu_present(&platform_bus_type) && + tegra_get_chip_id() != TEGRA20) { struct iommu_domain_geometry *geometry; unsigned long order;