[PATCH] etnaviv: Make sure DMA is setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since we don't want to setup up DMA via device tree we end up with
arm64's dummy_dma_ops otherwise.

Links: https://lists.freedesktop.org/archives/etnaviv/2018-August/001925.html
Signed-off-by: Guido Günther <agx@xxxxxxxxxxx>
---
 drivers/gpu/drm/etnaviv/etnaviv_drv.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
index 9b2720b41571..e488c07f333c 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
@@ -591,8 +591,19 @@ static int etnaviv_pdev_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct component_match *match = NULL;
+	int ret;
+
+	ret = of_dma_configure(dev, NULL, true);
+	if (ret) {
+		dev_err(&pdev->dev, "Setting up dma ops failed\n");
+		return ret;
+	};
 
-	dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
+	ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
+	if (ret) {
+		dev_err(&pdev->dev, "dma_coerce_mask_and_coherent failed\n");
+		return ret;
+	};
 
 	if (!dev->platform_data) {
 		struct device_node *core_node;
-- 
2.18.0
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux