OK, I'm fine if this is OK on your platform.+static bool etnaviv_is_dma_coherent(struct device *dev)This whole dance shouldn't be needed. We transfer the DMA capabilities
+{
+ struct device_node *np;
+ bool coherent;
+
+ np = etnaviv_of_first_available_node();
+ if (np) {
+ coherent = of_dma_is_coherent(np);
+ of_node_put(np);
+ } else {
+ coherent = dev_is_dma_coherent(dev);
+ }
from the first node to the virtual master device in the platform device
case, so dev_is_dma_coherent(dev) should always return the right thing.
+
+ return coherent;
+}
+