search for: __sg_alloc_table_from_pages

Displaying 16 results from an estimated 16 matches for "__sg_alloc_table_from_pages".

2020 Aug 18
2
[PATCH 1/2] drm: allow limiting the scatter list size.
On Tue, Aug 18, 2020 at 09:57:59AM +0200, Christian K?nig wrote: > Am 18.08.20 um 09:48 schrieb Gerd Hoffmann: > > Add max_segment argument to drm_prime_pages_to_sg(). When set pass it > > through to the __sg_alloc_table_from_pages() call, otherwise use > > SCATTERLIST_MAX_SEGMENT. > > > > Also add max_segment field to gem objects and pass it to > > drm_prime_pages_to_sg() calls in drivers and helpers. > > > > Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> > > I'm mi...
2020 Aug 18
2
[PATCH 1/2] drm: allow limiting the scatter list size.
Add max_segment argument to drm_prime_pages_to_sg(). When set pass it through to the __sg_alloc_table_from_pages() call, otherwise use SCATTERLIST_MAX_SEGMENT. Also add max_segment field to gem objects and pass it to drm_prime_pages_to_sg() calls in drivers and helpers. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- include/drm/drm_gem.h | 8 ++++++++ include/drm/drm_p...
2020 Sep 08
2
[PATCH v4 1/1] drm: allow limiting the scatter list size.
...:53:02PM +0200, Daniel Vetter wrote: > On Mon, Sep 7, 2020 at 1:24 PM Gerd Hoffmann <kraxel at redhat.com> wrote: > > > > Add drm_device argument to drm_prime_pages_to_sg(), so we can > > call dma_max_mapping_size() to figure the segment size limit > > and call into __sg_alloc_table_from_pages() with the correct > > limit. > > > > This fixes virtio-gpu with sev. Possibly it'll fix other bugs > > too given that drm seems to totaly ignore segment size limits > > so far ... > > > > v2: place max_segment in drm driver not gem object. > > v...
2020 Sep 07
2
[PATCH v4 1/1] drm: allow limiting the scatter list size.
Add drm_device argument to drm_prime_pages_to_sg(), so we can call dma_max_mapping_size() to figure the segment size limit and call into __sg_alloc_table_from_pages() with the correct limit. This fixes virtio-gpu with sev. Possibly it'll fix other bugs too given that drm seems to totaly ignore segment size limits so far ... v2: place max_segment in drm driver not gem object. v3: move max_segment next to the other gem fields. v4: just use dma_max_mapping...
2020 Aug 18
2
[PATCH v2 1/2] drm: allow limiting the scatter list size.
Add max_segment argument to drm_prime_pages_to_sg(). When set pass it through to the __sg_alloc_table_from_pages() call, otherwise use SCATTERLIST_MAX_SEGMENT. Also add max_segment field to drm driver and pass it to drm_prime_pages_to_sg() calls in drivers and helpers. v2: place max_segment in drm driver not gem object. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- include/drm/drm_device.h...
2020 Aug 18
0
[PATCH 1/2] drm: allow limiting the scatter list size.
Am 18.08.20 um 09:48 schrieb Gerd Hoffmann: > Add max_segment argument to drm_prime_pages_to_sg(). When set pass it > through to the __sg_alloc_table_from_pages() call, otherwise use > SCATTERLIST_MAX_SEGMENT. > > Also add max_segment field to gem objects and pass it to > drm_prime_pages_to_sg() calls in drivers and helpers. > > Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> I'm missing an explanation why this should be us...
2020 Sep 07
0
[PATCH v3 1/2] drm: allow limiting the scatter list size.
Add max_segment argument to drm_prime_pages_to_sg(). When set pass it through to the __sg_alloc_table_from_pages() call, otherwise use SCATTERLIST_MAX_SEGMENT. Also add max_segment field to drm driver and pass it to drm_prime_pages_to_sg() calls in drivers and helpers. v2: place max_segment in drm driver not gem object. v3: move max_segment next to the other gem fields. Signed-off-by: Gerd Hoffmann <kra...
2020 Sep 07
0
[PATCH v4 1/1] drm: allow limiting the scatter list size.
On Mon, Sep 7, 2020 at 1:24 PM Gerd Hoffmann <kraxel at redhat.com> wrote: > > Add drm_device argument to drm_prime_pages_to_sg(), so we can > call dma_max_mapping_size() to figure the segment size limit > and call into __sg_alloc_table_from_pages() with the correct > limit. > > This fixes virtio-gpu with sev. Possibly it'll fix other bugs > too given that drm seems to totaly ignore segment size limits > so far ... > > v2: place max_segment in drm driver not gem object. > v3: move max_segment next to the other ge...
2020 Sep 01
0
[PATCH v2 1/2] drm: allow limiting the scatter list size.
On Tue, Aug 18, 2020 at 11:20:16AM +0200, Gerd Hoffmann wrote: > Add max_segment argument to drm_prime_pages_to_sg(). When set pass it > through to the __sg_alloc_table_from_pages() call, otherwise use > SCATTERLIST_MAX_SEGMENT. > > Also add max_segment field to drm driver and pass it to > drm_prime_pages_to_sg() calls in drivers and helpers. > > v2: place max_segment in drm driver not gem object. > > Signed-off-by: Gerd Hoffmann <kraxel at redh...
2020 Sep 08
0
[PATCH v4 1/1] drm: allow limiting the scatter list size.
...tter wrote: > > On Mon, Sep 7, 2020 at 1:24 PM Gerd Hoffmann <kraxel at redhat.com> wrote: > > > > > > Add drm_device argument to drm_prime_pages_to_sg(), so we can > > > call dma_max_mapping_size() to figure the segment size limit > > > and call into __sg_alloc_table_from_pages() with the correct > > > limit. > > > > > > This fixes virtio-gpu with sev. Possibly it'll fix other bugs > > > too given that drm seems to totaly ignore segment size limits > > > so far ... > > > > > > v2: place max_segment in drm...
2020 Aug 18
0
[PATCH 1/2] drm: allow limiting the scatter list size.
Am 18.08.20 um 10:27 schrieb Gerd Hoffmann: > On Tue, Aug 18, 2020 at 09:57:59AM +0200, Christian K?nig wrote: >> Am 18.08.20 um 09:48 schrieb Gerd Hoffmann: >>> Add max_segment argument to drm_prime_pages_to_sg(). When set pass it >>> through to the __sg_alloc_table_from_pages() call, otherwise use >>> SCATTERLIST_MAX_SEGMENT. >>> >>> Also add max_segment field to gem objects and pass it to >>> drm_prime_pages_to_sg() calls in drivers and helpers. >>> >>> Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> >&...
2019 Aug 08
1
[PATCH] drm/virtio: use virtio_max_dma_size
...oc_table_from_pages(bo->pages, pages, nr_pages, 0, - nr_pages << PAGE_SHIFT, GFP_KERNEL); + max_segment = virtio_max_dma_size(qdev->vdev); + max_segment &= ~(size_t)(PAGE_SIZE - 1); + if (max_segment > SCATTERLIST_MAX_SEGMENT) + max_segment = SCATTERLIST_MAX_SEGMENT; + ret = __sg_alloc_table_from_pages(bo->pages, pages, nr_pages, 0, + nr_pages << PAGE_SHIFT, + max_segment, GFP_KERNEL); if (ret) goto out; return 0; -- 2.18.1
2019 Aug 09
0
[PATCH v2] drm/virtio: use virtio_max_dma_size
...oc_table_from_pages(bo->pages, pages, nr_pages, 0, - nr_pages << PAGE_SHIFT, GFP_KERNEL); + max_segment = virtio_max_dma_size(qdev->vdev); + max_segment &= ~(size_t)(PAGE_SIZE - 1); + if (max_segment > SCATTERLIST_MAX_SEGMENT) + max_segment = SCATTERLIST_MAX_SEGMENT; + ret = __sg_alloc_table_from_pages(bo->pages, pages, nr_pages, 0, + nr_pages << PAGE_SHIFT, + max_segment, GFP_KERNEL); if (ret) goto out; return 0; -- 2.18.1
2019 Aug 13
0
[PATCH v3] drm/virtio: use virtio_max_dma_size
...- ret = sg_alloc_table_from_pages(bo->pages, pages, nr_pages, 0, - nr_pages << PAGE_SHIFT, GFP_KERNEL); + max_segment = virtio_max_dma_size(qdev->vdev); + max_segment &= PAGE_MASK; + if (max_segment > SCATTERLIST_MAX_SEGMENT) + max_segment = SCATTERLIST_MAX_SEGMENT; + ret = __sg_alloc_table_from_pages(bo->pages, pages, nr_pages, 0, + nr_pages << PAGE_SHIFT, + max_segment, GFP_KERNEL); if (ret) goto out; return 0; -- 2.18.1
2019 Aug 13
0
[PATCH v4] drm/virtio: use virtio_max_dma_size
...- ret = sg_alloc_table_from_pages(bo->pages, pages, nr_pages, 0, - nr_pages << PAGE_SHIFT, GFP_KERNEL); + max_segment = virtio_max_dma_size(qdev->vdev); + max_segment &= PAGE_MASK; + if (max_segment > SCATTERLIST_MAX_SEGMENT) + max_segment = SCATTERLIST_MAX_SEGMENT; + ret = __sg_alloc_table_from_pages(bo->pages, pages, nr_pages, 0, + nr_pages << PAGE_SHIFT, + max_segment, GFP_KERNEL); if (ret) goto out; return 0; -- 2.18.1
2019 Sep 04
0
[PATCH AUTOSEL 5.2 36/94] drm/virtio: use virtio_max_dma_size
...- ret = sg_alloc_table_from_pages(bo->pages, pages, nr_pages, 0, - nr_pages << PAGE_SHIFT, GFP_KERNEL); + max_segment = virtio_max_dma_size(qdev->vdev); + max_segment &= PAGE_MASK; + if (max_segment > SCATTERLIST_MAX_SEGMENT) + max_segment = SCATTERLIST_MAX_SEGMENT; + ret = __sg_alloc_table_from_pages(bo->pages, pages, nr_pages, 0, + nr_pages << PAGE_SHIFT, + max_segment, GFP_KERNEL); if (ret) goto out; return 0; -- 2.20.1