diff mbox series

[B,2/2] UBUNTU: SAUCE: Revert "drm/msm: stop abusing dma_map/unmap for cache"

Message ID 20200508205423.30548-3-kelsey.skunberg@canonical.com
State New
Headers show
Series Revert drm/msm patches that cause certification testing | expand

Commit Message

Kelsey Skunberg May 8, 2020, 8:54 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1877657

This reverts commit 7318c5ef642baf12b3104c64a0a72bed0c009795 which is upstream
commit 3de433c5b38a ("drm/msm: Use the correct dma_sync calls in msm_gem").

Commit contributes to Certification Test failures and should be reverted until
a fix or alternative solution to avoid abusing dma_map/unmap for cache can be
applied.

Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
---
 drivers/gpu/drm/msm/msm_gem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c
index 21502afbcddc..37ec3411297b 100644
--- a/drivers/gpu/drm/msm/msm_gem.c
+++ b/drivers/gpu/drm/msm/msm_gem.c
@@ -108,7 +108,7 @@  static struct page **get_pages(struct drm_gem_object *obj)
 		 * because display controller, GPU, etc. are not coherent:
 		 */
 		if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED))
-			dma_sync_sg_for_device(dev->dev, msm_obj->sgt->sgl,
+			dma_map_sg(dev->dev, msm_obj->sgt->sgl,
 					msm_obj->sgt->nents, DMA_BIDIRECTIONAL);
 	}
 
@@ -138,7 +138,7 @@  static void put_pages(struct drm_gem_object *obj)
 			 * GPU, etc. are not coherent:
 			 */
 			if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED))
-				dma_sync_sg_for_cpu(obj->dev->dev, msm_obj->sgt->sgl,
+				dma_unmap_sg(obj->dev->dev, msm_obj->sgt->sgl,
 					     msm_obj->sgt->nents,
 					     DMA_BIDIRECTIONAL);