[PATCH 1/2] drm/i915/gvt: use DMA flags for dma map/unmap

Chuanxiao Dong chuanxiao.dong at intel.com
Fri Feb 24 02:03:02 UTC 2017


Use DMA dma/unmap flags for better understanding

Signed-off-by: Chuanxiao Dong <chuanxiao.dong at intel.com>
---
 drivers/gpu/drm/i915/gvt/kvmgt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c
index 0f7f5d9..4b5e88b 100644
--- a/drivers/gpu/drm/i915/gvt/kvmgt.c
+++ b/drivers/gpu/drm/i915/gvt/kvmgt.c
@@ -101,7 +101,7 @@ static int gvt_dma_map_iova(struct intel_vgpu *vgpu, kvm_pfn_t pfn,
 		return -EFAULT;
 
 	daddr = dma_map_page(dev, page, 0, PAGE_SIZE,
-			PCI_DMA_BIDIRECTIONAL);
+			DMA_BIDIRECTIONAL);
 	if (dma_mapping_error(dev, daddr))
 		return -ENOMEM;
 
@@ -115,7 +115,7 @@ static void gvt_dma_unmap_iova(struct intel_vgpu *vgpu, unsigned long iova)
 	dma_addr_t daddr;
 
 	daddr = (dma_addr_t)(iova << PAGE_SHIFT);
-	dma_unmap_page(dev, daddr, PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
+	dma_unmap_page(dev, daddr, PAGE_SIZE, DMA_BIDIRECTIONAL);
 }
 
 static struct gvt_dma *__gvt_cache_find(struct intel_vgpu *vgpu, gfn_t gfn)
-- 
2.7.4



More information about the intel-gvt-dev mailing list