diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2016-02-26 04:06:53 -0500 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2016-03-04 10:24:57 -0500 |
commit | c95469aa5a188384ccf8ac520ece931c66caf8aa (patch) | |
tree | ff5b147057b1b5f9fb981ae411c173865e0a40d2 | |
parent | 097452e61366a939a4772332181cea7cdcc74760 (diff) |
gpu: host1x: Set DMA ops on device creation
Currently host1x-instanciated devices have their dma_ops left to NULL,
which makes any DMA operation (like buffer import) on ARM64 fallback
to the dummy_dma_ops and fail with an error.
This patch calls of_dma_configure() with the host1x node when creating
such a device, so the proper DMA operations are set.
Suggested-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r-- | drivers/gpu/host1x/bus.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/bus.c b/drivers/gpu/host1x/bus.c index da462afcb225..dd2dbb9746ce 100644 --- a/drivers/gpu/host1x/bus.c +++ b/drivers/gpu/host1x/bus.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/host1x.h> | 18 | #include <linux/host1x.h> |
19 | #include <linux/of.h> | 19 | #include <linux/of.h> |
20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
21 | #include <linux/of_device.h> | ||
21 | 22 | ||
22 | #include "bus.h" | 23 | #include "bus.h" |
23 | #include "dev.h" | 24 | #include "dev.h" |
@@ -394,6 +395,7 @@ static int host1x_device_add(struct host1x *host1x, | |||
394 | device->dev.coherent_dma_mask = host1x->dev->coherent_dma_mask; | 395 | device->dev.coherent_dma_mask = host1x->dev->coherent_dma_mask; |
395 | device->dev.dma_mask = &device->dev.coherent_dma_mask; | 396 | device->dev.dma_mask = &device->dev.coherent_dma_mask; |
396 | dev_set_name(&device->dev, "%s", driver->driver.name); | 397 | dev_set_name(&device->dev, "%s", driver->driver.name); |
398 | of_dma_configure(&device->dev, host1x->dev->of_node); | ||
397 | device->dev.release = host1x_device_release; | 399 | device->dev.release = host1x_device_release; |
398 | device->dev.bus = &host1x_bus_type; | 400 | device->dev.bus = &host1x_bus_type; |
399 | device->dev.parent = host1x->dev; | 401 | device->dev.parent = host1x->dev; |