From 1010faef86e63c207ffa8a4d9c2b9ed192ad33bd Mon Sep 17 00:00:00 2001 From: Jacob Chen Date: Tue, 2 May 2017 11:25:31 +0800 Subject: [PATCH] drm/rockchip: rga: use DMA_BIDIRECTIONAL In some cases, we need to read data from RGA and DMA_TO_DEVICE are not a proper flag So change to DMA_BIDIRECTIONAL Change-Id: I9d421e8a15f948fcb6643addab558803247ea161 Signed-off-by: Jacob Chen --- drivers/gpu/drm/rockchip/rockchip_drm_rga.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_rga.c b/drivers/gpu/drm/rockchip/rockchip_drm_rga.c index 42aca4289a5d..f3dcce0501d5 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_rga.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_rga.c @@ -196,7 +196,7 @@ static int rga_alloc_dma_buf_for_cmdlist(struct rga_runqueue_node *runqueue) dma_sync_single_for_device(runqueue->drm_dev->dev, virt_to_phys(cmdlist_pool_virt), - PAGE_SIZE, DMA_TO_DEVICE); + PAGE_SIZE, DMA_BIDIRECTIONAL); runqueue->cmdlist_dma_attrs = cmdlist_dma_attrs; runqueue->cmdlist_pool_virt = cmdlist_pool_virt; @@ -294,10 +294,10 @@ static struct dma_buf_attachment *rga_gem_buf_to_pages(struct rockchip_rga *rga, if (flush) dma_sync_sg_for_device(rga->drm_dev->dev, sgt->sgl, sgt->nents, - DMA_TO_DEVICE); + DMA_BIDIRECTIONAL); dma_sync_single_for_device(rga->drm_dev->dev, virt_to_phys(pages), - 8 * PAGE_SIZE, DMA_TO_DEVICE); + 8 * PAGE_SIZE, DMA_BIDIRECTIONAL); *mmu_pages = pages; -- 2.34.1