Skip to contentSkip to conversation

gpu: host1x: Set DMA ops on device creation

PATCH Superseded Alexandre Courbot 1 participant 1 message Feb 24, 2016

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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.

---
 drivers/gpu/host1x/bus.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/host1x/bus.c +2 -0
index c2e7fba370bb..c27858ae0552 100644
@@ -18,6 +18,7 @@
 #include <linux/host1x.h>
 #include <linux/of.h>
 #include <linux/slab.h>
+#include <linux/of_device.h>
 
 #include "bus.h"
 #include "dev.h"
@@ -396,6 +397,7 @@ static int host1x_device_add(struct host1x *host1x,
 	device->dev.coherent_dma_mask = host1x->dev->coherent_dma_mask;
 	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);
 	device->dev.release = host1x_device_release;
 	device->dev.bus = &host1x_bus_type;
 	device->dev.parent = host1x->dev;
Signature · 1 line
2.7.1