From patchwork Thu Jul 26 23:16:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 10546675 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E274A174A for ; Fri, 27 Jul 2018 07:02:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4BA32B4FF for ; Fri, 27 Jul 2018 07:02:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C60B22B508; Fri, 27 Jul 2018 07:02:50 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,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 8C8112B4FF for ; Fri, 27 Jul 2018 07:02:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 350726E916; Fri, 27 Jul 2018 07:02:12 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by gabe.freedesktop.org (Postfix) with ESMTPS id 628CD6E87B; Thu, 26 Jul 2018 23:22:37 +0000 (UTC) Received: by mail-lf1-x143.google.com with SMTP id a4-v6so2323482lff.5; Thu, 26 Jul 2018 16:22:37 -0700 (PDT) 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=o9Z7QKLTcb40+ogX2Dsf/MKtwd7NgHqBZYO0RNQo0gA=; b=DSP0CpsftwtOm5KofeflAsoGyMrKqWy5XmuOceZfM4hDhDXZoQBiZA1f84znXADAh6 X2fqYQKPuXXNjK2ohI2zeArgZ5Pkpo1SHqBw7J1izQRVAXFGKTvK+5YXShjgtto4xQ8r dKSidReYcvka2CRaV6taCtwPSCFv1b40dDppu8dDHC+X1b7lepMGBQzxl4Bvq6SO8v/D r+tUyvYXCMMdD7hlyc+422IxlJxEJY7Dky4ow8vJLUivcyaMuOmK2tnxwpfcmyKNrLaS vpU+FSc/cj03m8OwsQmxq43Dqx/dy+F5yjtYGL5mYUsEdtqZ0rAshBr83A6eIFgfITnz P3CQ== X-Gm-Message-State: AOUpUlFu1TkY3IyPrAPknbGmmmLWaeLkpYOy8MW43X5FN6M1P6yXyv+b bHuo+LoICfAJzYSWePj2vl4= X-Google-Smtp-Source: AAOMgpdu9glh1S2y4M2AZlthDNe+19L4fyzG3DPMmUo+QfPi4+hJ3wYbwCQ2EgKuE4tKOYoHFiN+6g== X-Received: by 2002:a19:9fc8:: with SMTP id i191-v6mr2411611lfe.79.1532647355840; Thu, 26 Jul 2018 16:22:35 -0700 (PDT) Received: from localhost.localdomain (109-252-90-13.nat.spd-mgts.ru. [109.252.90.13]) by smtp.gmail.com with ESMTPSA id q15-v6sm411541ljg.62.2018.07.26.16.22.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 16:22:35 -0700 (PDT) From: Dmitry Osipenko To: Greg Kroah-Hartman , "Rafael J. Wysocki" , Thierry Reding , Jonathan Hunter , Mikko Perttunen , Rob Herring , Frank Rowand , Ben Skeggs , Russell King , Catalin Marinas , Will Deacon , Joerg Roedel , Nicolas Chauvet Subject: [RFC PATCH v1 5/6] drm/nouveau: tegra: Universally avoid implicit DMA backing with IOMMU Date: Fri, 27 Jul 2018 02:16:23 +0300 Message-Id: <20180726231624.21084-6-digetx@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180726231624.21084-1-digetx@gmail.com> References: <20180726231624.21084-1-digetx@gmail.com> X-Mailman-Approved-At: Fri, 27 Jul 2018 07:01:20 +0000 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: devicetree@vger.kernel.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, iommu@lists.linux-foundation.org, linux-tegra@vger.kernel.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Implicit backing DMA with IOMMU breaks Nouveau on Tegra, the current approach with detaching device from IOMMU that was added in commit b59fb482b522 ("drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping") works only for arm32 which has the CONFIG_ARM_DMA_USE_IOMMU, but not for arm64 which doesn't have that config option. Drivers core now allows to avoid the implicit backing, that is a universal solution unlike the current variant with the detaching. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/nouveau/nouveau_platform.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_platform.c b/drivers/gpu/drm/nouveau/nouveau_platform.c index 039e23548e08..0b57f4f9b638 100644 --- a/drivers/gpu/drm/nouveau/nouveau_platform.c +++ b/drivers/gpu/drm/nouveau/nouveau_platform.c @@ -90,6 +90,7 @@ MODULE_DEVICE_TABLE(of, nouveau_platform_match); struct platform_driver nouveau_platform_driver = { .driver = { .name = "nouveau", + .no_implicit_iommu = true, .of_match_table = of_match_ptr(nouveau_platform_match), }, .probe = nouveau_platform_probe,