From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760535AbcBYKJ6 (ORCPT ); Thu, 25 Feb 2016 05:09:58 -0500 Received: from hqemgate15.nvidia.com ([216.228.121.64]:16278 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760495AbcBYKBT (ORCPT ); Thu, 25 Feb 2016 05:01:19 -0500 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Thu, 25 Feb 2016 02:01:09 -0800 From: Alexandre Courbot To: Thierry Reding , =?UTF-8?q?Terje=20Bergstr=C3=B6m?= , Stephen Warren CC: dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, gnurou@gmail.com, Alexandre Courbot Subject: [PATCH v3 2/2] gpu: host1x: Set the DMA mask for host1x devices Date: Thu, 25 Feb 2016 19:00:58 +0900 Message-ID: <1456394458-15759-2-git-send-email-acourbot@nvidia.com> X-Mailer: git-send-email 2.7.1 In-Reply-To: <1456394458-15759-1-git-send-email-acourbot@nvidia.com> References: <1456394458-15759-1-git-send-email-acourbot@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The default DMA mask covers a 32 bits address range, but devices can address more than that. Set the DMA mask to the actual addressable range to avoid the use of unneeded bounce buffers. Signed-off-by: Alexandre Courbot --- Changes since v1: - set the mask at the bus level so of_dma_configure() does the right thing drivers/gpu/host1x/bus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/host1x/bus.c b/drivers/gpu/host1x/bus.c index c27858ae0552..e04c7114f976 100644 --- a/drivers/gpu/host1x/bus.c +++ b/drivers/gpu/host1x/bus.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "bus.h" #include "dev.h" @@ -394,7 +395,7 @@ static int host1x_device_add(struct host1x *host1x, INIT_LIST_HEAD(&device->list); device->driver = driver; - device->dev.coherent_dma_mask = host1x->dev->coherent_dma_mask; + device->dev.coherent_dma_mask = DMA_BIT_MASK(34); device->dev.dma_mask = &device->dev.coherent_dma_mask; dev_set_name(&device->dev, "%s", driver->driver.name); of_dma_configure(&device->dev, host1x->dev->of_node); -- 2.7.1