Loading drivers/gpu/drm/msm/msm_gem.c +5 −10 Original line number Diff line number Diff line Loading @@ -104,11 +104,12 @@ static struct page **get_pages(struct drm_gem_object *obj) msm_obj->pages = p; /* For non-cached buffers, ensure the new pages are clean * because display controller, GPU, etc. are not coherent: /* * Make sure to flush the CPU cache for newly allocated memory * so we don't get ourselves into trouble with a dirty cache */ if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED)) dma_map_sg(dev->dev, msm_obj->sgt->sgl, dma_sync_sg_for_device(dev->dev, msm_obj->sgt->sgl, msm_obj->sgt->nents, DMA_BIDIRECTIONAL); } Loading @@ -120,12 +121,6 @@ static void put_pages(struct drm_gem_object *obj) struct msm_gem_object *msm_obj = to_msm_bo(obj); if (msm_obj->pages) { /* For non-cached buffers, ensure the new pages are clean * because display controller, GPU, etc. are not coherent: */ if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED)) dma_unmap_sg(obj->dev->dev, msm_obj->sgt->sgl, msm_obj->sgt->nents, DMA_BIDIRECTIONAL); sg_free_table(msm_obj->sgt); kfree(msm_obj->sgt); Loading Loading
drivers/gpu/drm/msm/msm_gem.c +5 −10 Original line number Diff line number Diff line Loading @@ -104,11 +104,12 @@ static struct page **get_pages(struct drm_gem_object *obj) msm_obj->pages = p; /* For non-cached buffers, ensure the new pages are clean * because display controller, GPU, etc. are not coherent: /* * Make sure to flush the CPU cache for newly allocated memory * so we don't get ourselves into trouble with a dirty cache */ if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED)) dma_map_sg(dev->dev, msm_obj->sgt->sgl, dma_sync_sg_for_device(dev->dev, msm_obj->sgt->sgl, msm_obj->sgt->nents, DMA_BIDIRECTIONAL); } Loading @@ -120,12 +121,6 @@ static void put_pages(struct drm_gem_object *obj) struct msm_gem_object *msm_obj = to_msm_bo(obj); if (msm_obj->pages) { /* For non-cached buffers, ensure the new pages are clean * because display controller, GPU, etc. are not coherent: */ if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED)) dma_unmap_sg(obj->dev->dev, msm_obj->sgt->sgl, msm_obj->sgt->nents, DMA_BIDIRECTIONAL); sg_free_table(msm_obj->sgt); kfree(msm_obj->sgt); Loading