search for: dma_sync_sg_for_device

Displaying 18 results from an estimated 18 matches for "dma_sync_sg_for_device".

2020 Sep 08
2
[PATCH] drm/virtio: drop quirks handling
...virtio_gpu_object *bo = gem_to_virtio_gpu_obj(objs->objs[0]); struct virtio_gpu_transfer_to_host_2d *cmd_p; struct virtio_gpu_vbuffer *vbuf; - bool use_dma_api = !virtio_has_dma_quirk(vgdev->vdev); struct virtio_gpu_object_shmem *shmem = to_virtio_gpu_shmem(bo); - if (use_dma_api) - dma_sync_sg_for_device(vgdev->vdev->dev.parent, - shmem->pages->sgl, shmem->pages->nents, - DMA_TO_DEVICE); + dma_sync_sg_for_device(vgdev->vdev->dev.parent, + shmem->pages->sgl, shmem->pages->nents, + DMA_TO_DEVICE); cmd_p = virtio_gpu_alloc_c...
2020 Sep 08
2
[PATCH] drm/virtio: drop quirks handling
...virtio_gpu_object *bo = gem_to_virtio_gpu_obj(objs->objs[0]); struct virtio_gpu_transfer_to_host_2d *cmd_p; struct virtio_gpu_vbuffer *vbuf; - bool use_dma_api = !virtio_has_dma_quirk(vgdev->vdev); struct virtio_gpu_object_shmem *shmem = to_virtio_gpu_shmem(bo); - if (use_dma_api) - dma_sync_sg_for_device(vgdev->vdev->dev.parent, - shmem->pages->sgl, shmem->pages->nents, - DMA_TO_DEVICE); + dma_sync_sg_for_device(vgdev->vdev->dev.parent, + shmem->pages->sgl, shmem->pages->nents, + DMA_TO_DEVICE); cmd_p = virtio_gpu_alloc_c...
2020 Sep 08
0
[PATCH] drm/virtio: drop quirks handling
...tio_gpu_obj(objs->objs[0]); > struct virtio_gpu_transfer_to_host_2d *cmd_p; > struct virtio_gpu_vbuffer *vbuf; > - bool use_dma_api = !virtio_has_dma_quirk(vgdev->vdev); > struct virtio_gpu_object_shmem *shmem = to_virtio_gpu_shmem(bo); > > - if (use_dma_api) > - dma_sync_sg_for_device(vgdev->vdev->dev.parent, > - shmem->pages->sgl, shmem->pages->nents, > - DMA_TO_DEVICE); > + dma_sync_sg_for_device(vgdev->vdev->dev.parent, > + shmem->pages->sgl, shmem->pages->nents, > + DMA_TO_DEVICE); >...
2018 Sep 20
0
[PATCH] drm/virtio: pass virtio_gpu_object to virtio_gpu_cmd_transfer_to_host_{2d, 3d}
..._gpu_vbuffer *vbuf; - struct virtio_gpu_fbdev *vgfbdev = vgdev->vgfbdev; - struct virtio_gpu_framebuffer *fb = &vgfbdev->vgfb; - struct virtio_gpu_object *obj = gem_to_virtio_gpu_obj(fb->base.obj[0]); bool use_dma_api = !virtio_has_iommu_quirk(vgdev->vdev); if (use_dma_api) dma_sync_sg_for_device(vgdev->vdev->dev.parent, - obj->pages->sgl, obj->pages->nents, + bo->pages->sgl, bo->pages->nents, DMA_TO_DEVICE); cmd_p = virtio_gpu_alloc_cmd(vgdev, &vbuf, sizeof(*cmd_p)); memset(cmd_p, 0, sizeof(*cmd_p)); cmd_p->hdr....
2018 Sep 19
0
[virtio-dev] [PATCH 2/2] drm/virtio: add iommu support.
Hi, > buffer. I tried to put a dma_sync_sg_for_device() on virtio_gpu_object obj->pages-sgl > before VIRTIO_GPU_CMD_TRANSFER_TO_HOST_2D is sent. This fixes the kernel console path. That should be the right place. > Once display manger is kicked off for example (sudo systemctl start lightdm.service) and > resource id 3 gets created from...
2020 Aug 19
4
[PATCH 05/28] media/v4l2: remove V4L2-FLAG-MEMORY-NON-CONSISTENT
...; enum dma_data_direction direction) > { > - struct vb2_dc_buf *buf = dbuf->priv; > - struct sg_table *sgt = buf->dma_sgt; > - > - if (vb2_dc_buffer_consistent(buf->attrs)) > - return 0; > - > - dma_sync_sg_for_device(buf->dev, sgt->sgl, sgt->nents, buf->dma_dir); > return 0; > } > > diff --git a/drivers/media/common/videobuf2/videobuf2-dma-sg.c b/drivers/media/common/videobuf2/videobuf2-dma-sg.c > index 0a40e00f0d7e5c..a86fce5d8ea8bf 100644 > --- a/drivers/media/common/vid...
2020 Aug 19
0
[PATCH 05/28] media/v4l2: remove V4L2-FLAG-MEMORY-NON-CONSISTENT
...return 0; } @@ -355,13 +343,6 @@ static int vb2_dc_dmabuf_ops_end_cpu_access(struct dma_buf *dbuf, enum dma_data_direction direction) { - struct vb2_dc_buf *buf = dbuf->priv; - struct sg_table *sgt = buf->dma_sgt; - - if (vb2_dc_buffer_consistent(buf->attrs)) - return 0; - - dma_sync_sg_for_device(buf->dev, sgt->sgl, sgt->nents, buf->dma_dir); return 0; } diff --git a/drivers/media/common/videobuf2/videobuf2-dma-sg.c b/drivers/media/common/videobuf2/videobuf2-dma-sg.c index 0a40e00f0d7e5c..a86fce5d8ea8bf 100644 --- a/drivers/media/common/videobuf2/videobuf2-dma-sg.c +++ b/dr...
2020 Aug 19
0
[PATCH 05/28] media/v4l2: remove V4L2-FLAG-MEMORY-NON-CONSISTENT
...enum dma_data_direction direction) >> { >> - struct vb2_dc_buf *buf = dbuf->priv; >> - struct sg_table *sgt = buf->dma_sgt; >> - >> - if (vb2_dc_buffer_consistent(buf->attrs)) >> - return 0; >> - >> - dma_sync_sg_for_device(buf->dev, sgt->sgl, sgt->nents, buf->dma_dir); >> return 0; >> } >> >> diff --git a/drivers/media/common/videobuf2/videobuf2-dma-sg.c b/drivers/media/common/videobuf2/videobuf2-dma-sg.c >> index 0a40e00f0d7e5c..a86fce5d8ea8bf 100644 >> ---...
2009 Sep 10
1
[Bug 23830] New: nouvea modules on 2.6.31-rc6 failed
...on.h: At top level: include/asm-generic/dma-mapping-common.h:173: warning: 'enum dma_data_direction' declared inside parameter list include/asm-generic/dma-mapping-common.h:173: error: parameter 4 ('dir') has incomplete type include/asm-generic/dma-mapping-common.h: In function 'dma_sync_sg_for_device': include/asm-generic/dma-mapping-common.h:178: error: dereferencing pointer to incomplete type include/asm-generic/dma-mapping-common.h:179: error: dereferencing pointer to incomplete type In file included from /usr/src/linux-2.6.31_pvops-xen-rebase.master.tree-2009-08-31/arch/x86/include/asm/...
2009 Sep 02
20
Re: i686 vs i586 glibc segfault issue on 64-bit AMD Xen paravirt guests
On 09/02/09 01:10, Mitchell E Berger wrote: > I apologize for writing to you directly instead of through an officially > supported channel. No problem. > I''ve filed a bug against glibc in Redhat''s Bugzilla > for an issue that only seems to surface on 64-bit Xen paravirt guests > on AMD hosts. Filing this bug with the distro involved seemed to make > sense,
2016 Jun 02
0
[RFC v3 02/45] dma-mapping: Use unsigned long for dma_attrs
...oid dma_unmap_page(struct device *dev, dma_addr_t addr, BUG_ON(!valid_dma_direction(dir)); if (ops->unmap_page) - ops->unmap_page(dev, addr, size, dir, NULL); + ops->unmap_page(dev, addr, size, dir, 0); debug_dma_unmap_page(dev, addr, size, dir, false); } @@ -289,10 +315,10 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, } -#define dma_map_single(d, a, s, r) dma_map_single_attrs(d, a, s, r, NULL) -#define dma_unmap_single(d, a, s, r) dma_unmap_single_attrs(d, a, s, r, NULL) -#define dma_map_sg(d, s, n, r) dma_map_sg_attrs(d, s, n, r, NULL) -#define dma_unmap_sg(d, s,...
2020 Sep 15
0
[PATCH 01/18] media/v4l2: remove V4L2-FLAG-MEMORY-NON-CONSISTENT flag
...return 0; } @@ -355,13 +343,6 @@ static int vb2_dc_dmabuf_ops_end_cpu_access(struct dma_buf *dbuf, enum dma_data_direction direction) { - struct vb2_dc_buf *buf = dbuf->priv; - struct sg_table *sgt = buf->dma_sgt; - - if (vb2_dc_buffer_consistent(buf->attrs)) - return 0; - - dma_sync_sg_for_device(buf->dev, sgt->sgl, sgt->nents, buf->dma_dir); return 0; } diff --git a/drivers/media/common/videobuf2/videobuf2-dma-sg.c b/drivers/media/common/videobuf2/videobuf2-dma-sg.c index 0a40e00f0d7e5c..a86fce5d8ea8bf 100644 --- a/drivers/media/common/videobuf2/videobuf2-dma-sg.c +++ b/dr...
2020 Aug 19
5
[PATCH 05/28] media/v4l2: remove V4L2-FLAG-MEMORY-NON-CONSISTENT
...; >> { > >> - struct vb2_dc_buf *buf = dbuf->priv; > >> - struct sg_table *sgt = buf->dma_sgt; > >> - > >> - if (vb2_dc_buffer_consistent(buf->attrs)) > >> - return 0; > >> - > >> - dma_sync_sg_for_device(buf->dev, sgt->sgl, sgt->nents, buf->dma_dir); > >> return 0; > >> } > >> > >> diff --git a/drivers/media/common/videobuf2/videobuf2-dma-sg.c b/drivers/media/common/videobuf2/videobuf2-dma-sg.c > >> index 0a40e00f0d7e5c..a86fce5d8e...
2020 Aug 19
39
a saner API for allocating DMA addressable pages
Hi all, this series replaced the DMA_ATTR_NON_CONSISTENT flag to dma_alloc_attrs with a separate new dma_alloc_pages API, which is available on all platforms. In addition to cleaning up the convoluted code path, this ensures that other drivers that have asked for better support for non-coherent DMA to pages with incurring bounce buffering over can finally be properly supported. I'm still a
2008 Dec 22
17
[PATCH 0 of 9] swiotlb: use phys_addr_t for pages
Hi all, Here''s a work in progress series whcih does a partial revert of the previous swiotlb changes, and does a partial replacement with Becky Bruce''s series. The most important difference is Becky''s use of phys_addr_t rather than page+offset to represent arbitrary pages. This turns out to be simpler. I didn''t replicate the map_single_page changes, since
2020 Sep 14
20
a saner API for allocating DMA addressable pages v2
Hi all, this series replaced the DMA_ATTR_NON_CONSISTENT flag to dma_alloc_attrs with a separate new dma_alloc_pages API, which is available on all platforms. In addition to cleaning up the convoluted code path, this ensures that other drivers that have asked for better support for non-coherent DMA to pages with incurring bounce buffering over can finally be properly supported. I'm still a
2020 Sep 15
32
a saner API for allocating DMA addressable pages v3
Hi all, this series replaced the DMA_ATTR_NON_CONSISTENT flag to dma_alloc_attrs with a separate new dma_alloc_pages API, which is available on all platforms. In addition to cleaning up the convoluted code path, this ensures that other drivers that have asked for better support for non-coherent DMA to pages with incurring bounce buffering over can finally be properly supported. As a follow up I
2016 Jun 02
52
[RFC v3 00/45] dma-mapping: Use unsigned long for dma_attrs
Hi, This is third approach (complete this time) for replacing struct dma_attrs with unsigned long. The main patch (2/45) doing the change is split into many subpatches for easier review (3-43). They should be squashed together when applying. *Important:* Patchset is *only* build tested on allyesconfigs: ARM, ARM64, i386, x86_64 and powerpc. Please provide reviewes and tests for other