drm/msm: drop cache sync hack
PATCH 1/1 drm/msm: drop cache sync hack
From: Rob Clark <[email protected]>
Now that it isn't causing problems to use dma_map/unmap, we can drop the hack of using dma_sync in certain cases.
--- drivers/gpu/drm/msm/msm_gem.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-)
drivers/gpu/drm/msm/msm_gem.c +4 -14
@@ -52,26 +52,16 @@ static void sync_for_device(struct msm_gem_object *msm_obj) {struct device *dev = msm_obj->base.dev->dev; -if (get_dma_ops (dev) &&IS_ENABLED (CONFIG_ARM64 )) { -dma_sync_sg_for_device (dev, msm_obj->sgt->sgl, - msm_obj->sgt->nents,DMA_BIDIRECTIONAL ); - }else { -dma_map_sg (dev, msm_obj->sgt->sgl, - msm_obj->sgt->nents,DMA_BIDIRECTIONAL ); - } +dma_map_sg (dev, msm_obj->sgt->sgl, + msm_obj->sgt->nents,DMA_BIDIRECTIONAL ); }static void sync_for_cpu (struct msm_gem_object *msm_obj) {struct device *dev = msm_obj->base.dev->dev; -if (get_dma_ops (dev) &&IS_ENABLED (CONFIG_ARM64 )) { -dma_sync_sg_for_cpu (dev, msm_obj->sgt->sgl, - msm_obj->sgt->nents,DMA_BIDIRECTIONAL ); - }else { -dma_unmap_sg (dev, msm_obj->sgt->sgl, - msm_obj->sgt->nents,DMA_BIDIRECTIONAL ); - } +dma_unmap_sg (dev, msm_obj->sgt->sgl, + msm_obj->sgt->nents,DMA_BIDIRECTIONAL ); }/* allocate pages from VRAM carveout, used when no IOMMU: */
Signature · 1 line
2.26.2
Quoted 4 lines · Rob Clark
From: Rob Clark <[email protected]>
Now that it isn't causing problems to use dma_map/unmap, we can drop the hack of using
dma_syncin certain cases.
Great to see! What did solve the problems?
Quoted 8 lines · Christoph Hellwig
Quoted 4 lines · Rob Clark
From: Rob Clark <[email protected]>
Now that it isn't causing problems to use dma_map/unmap, we can drop the hack of using
dma_syncin certain cases.Great to see! What did solve the problems?
should be 0e764a01015dfebff8a8ffd297d74663772e248a ("iommu/arm-smmu:
Allow client devices to select direct mapping")
I still need to confirm whether qcom_iommu needs a similar thing, but I think it is ok as the iommu phandle link is down one level on the 'mdp' device, rather than attached to the toplevel drm device.
BR,
-R
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel