[PATCH 1/2] drm/i915/gvt: use DMA flags for dma map/unmap
Dong, Chuanxiao
chuanxiao.dong at intel.com
Wed Mar 1 06:28:22 UTC 2017
> -----Original Message-----
> From: intel-gvt-dev [mailto:intel-gvt-dev-bounces at lists.freedesktop.org] On
> Behalf Of Zhenyu Wang
> Sent: Wednesday, March 1, 2017 2:20 PM
> To: Dong, Chuanxiao <chuanxiao.dong at intel.com>
> Cc: intel-gvt-dev at lists.freedesktop.org
> Subject: Re: [PATCH 1/2] drm/i915/gvt: use DMA flags for dma map/unmap
>
> On 2017.02.24 10:03:02 +0800, Chuanxiao Dong wrote:
> > Use DMA dma/unmap flags for better understanding
> >
>
> Seems not necessary as they're interchangeable, like to keep as align with
> i915.
OK. Will drop this one. Thanks.
>
> > 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
> >
> > _______________________________________________
> > intel-gvt-dev mailing list
> > intel-gvt-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev
>
> --
> Open Source Technology Center, Intel ltd.
>
> $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
More information about the intel-gvt-dev
mailing list