From: Alexandre Courbot <acourbot@nvidia.com>
To: "Thierry Reding" <thierry.reding@gmail.com>,
"Terje Bergström" <tbergstrom@nvidia.com>,
"Stephen Warren" <swarren@wwwdotorg.org>
Cc: dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org, gnurou@gmail.com,
Alexandre Courbot <acourbot@nvidia.com>
Subject: [PATCH v3 2/2] gpu: host1x: Set the DMA mask for host1x devices
Date: Thu, 25 Feb 2016 19:00:58 +0900 [thread overview]
Message-ID: <1456394458-15759-2-git-send-email-acourbot@nvidia.com> (raw)
In-Reply-To: <1456394458-15759-1-git-send-email-acourbot@nvidia.com>
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 <acourbot@nvidia.com>
---
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 <linux/of.h>
#include <linux/slab.h>
#include <linux/of_device.h>
+#include <linux/dma-mapping.h>
#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
prev parent reply other threads:[~2016-02-25 10:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-25 10:00 [PATCH v3 1/2] gpu: host1x: Set DMA ops on device creation Alexandre Courbot
2016-02-25 10:00 ` Alexandre Courbot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1456394458-15759-2-git-send-email-acourbot@nvidia.com \
--to=acourbot@nvidia.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gnurou@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=swarren@wwwdotorg.org \
--cc=tbergstrom@nvidia.com \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome