On 2023/6/21 18:00, Lucas Stach wrote:
+static bool etnaviv_is_dma_coherent(struct device *dev)
+{
+       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);
+       }
This whole dance shouldn't be needed. We transfer the DMA capabilities
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.

OK, I'm fine if this is OK on your platform.
+
+       return coherent;
+}
+

--
Jingfeng

Reply via email to