From patchwork Fri Jun 27 11:22:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Courbot X-Patchwork-Id: 4434691 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8EB3FBEEAA for ; Fri, 27 Jun 2014 11:25:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 377A920381 for ; Fri, 27 Jun 2014 11:25:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 72F3A20384 for ; Fri, 27 Jun 2014 11:25:05 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X0UFU-0006ed-NH; Fri, 27 Jun 2014 11:23:20 +0000 Received: from hqemgate14.nvidia.com ([216.228.121.143]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X0UFF-0006Gg-Vd for linux-arm-kernel@lists.infradead.org; Fri, 27 Jun 2014 11:23:06 +0000 Received: from hqnvupgp07.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com id ; Fri, 27 Jun 2014 04:23:26 -0700 Received: from hqemhub01.nvidia.com ([172.20.12.94]) by hqnvupgp07.nvidia.com (PGP Universal service); Fri, 27 Jun 2014 04:12:48 -0700 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Fri, 27 Jun 2014 04:12:48 -0700 Received: from percival.nvidia.com (172.20.144.16) by hqemhub01.nvidia.com (172.20.150.30) with Microsoft SMTP Server (TLS) id 8.3.342.0; Fri, 27 Jun 2014 04:22:46 -0700 From: Alexandre Courbot To: Ben Skeggs , David Airlie , Lucas Stach , Thierry Reding Subject: [PATCH v3 2/2] drm/nouveau: use DMA TT population method on ARM Date: Fri, 27 Jun 2014 20:22:14 +0900 Message-ID: <1403868134-31741-3-git-send-email-acourbot@nvidia.com> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1403868134-31741-1-git-send-email-acourbot@nvidia.com> References: <1403868134-31741-1-git-send-email-acourbot@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140627_042306_045997_81AD5615 X-CRM114-Status: GOOD ( 10.49 ) X-Spam-Score: -0.0 (/) Cc: gnurou@gmail.com, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Alexandre Courbot , linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Cached memory accesses between the CPU and the GPU are not coherent on ARM. Use the DMA TTM allocator on this architecture to obtain coherent memory. Signed-off-by: Alexandre Courbot --- drivers/gpu/drm/nouveau/nouveau_ttm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c index 70893416d4b6..d77fc8a5167d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c @@ -385,6 +385,8 @@ nouveau_ttm_init(struct nouveau_drm *drm) if (swiotlb_nr_tbl()) drm->ttm.populate_method = DMA; #endif + if (IS_ENABLED(CONFIG_ARM)) + drm->ttm.populate_method = DMA; #if defined(TTM_HAS_AGP) if (drm->agp.stat == ENABLED) drm->ttm.populate_method = AGP;