[PATCH] etnaviv: Make sure DMA is setup
Guido Günther
agx at sigxcpu.org
Wed Sep 12 15:44:21 UTC 2018
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 at sigxcpu.org>
---
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
More information about the etnaviv
mailing list