search for: drm_prime_pages_to_sg

Displaying 20 results from an estimated 33 matches for "drm_prime_pages_to_sg".

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/...
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_s...
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 Hof...
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...
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 nex...
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 limit...
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 g...
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. > > > > Signe...
2019 Feb 27
1
[PATCH 3/3] drm/virtio: implement prime export
Just run drm_prime_pages_to_sg() on the ttm pages list to get an sg_table for export. The pages list is created at object initialization time, so there should be no need to handle an unpopulated page list. Add a sanity check nevertheless. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/virtio/vir...
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. >>>...
2020 Sep 08
2
[PATCH v4 1/1] drm: allow limiting the scatter list size.
On Mon, Sep 07, 2020 at 03: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 to...
2020 Sep 08
0
[PATCH v4 1/1] drm: allow limiting the scatter list size.
On Tue, Sep 08, 2020 at 07:48:58AM +0200, Gerd Hoffmann wrote: > On Mon, Sep 07, 2020 at 03: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 > > >...
2020 Nov 09
0
[PATCH 1/2] drm/msm: Use struct dma_buf_map in GEM vmap ops
.../drivers/gpu/drm/msm/msm_gem_prime.c b/drivers/gpu/drm/msm/msm_gem_prime.c index 515ef80816a0..9880348a4dc7 100644 --- a/drivers/gpu/drm/msm/msm_gem_prime.c +++ b/drivers/gpu/drm/msm/msm_gem_prime.c @@ -22,12 +22,19 @@ struct sg_table *msm_gem_prime_get_sg_table(struct drm_gem_object *obj) return drm_prime_pages_to_sg(obj->dev, msm_obj->pages, npages); } -void *msm_gem_prime_vmap(struct drm_gem_object *obj) +int msm_gem_prime_vmap(struct drm_gem_object *obj, struct dma_buf_map *map) { - return msm_gem_get_vaddr(obj); + void *vaddr; + + vaddr = msm_gem_get_vaddr(obj); + if (IS_ERR(vaddr)) + return PTR_...
2018 Jan 11
5
[PATCH 1/5] drm/prime: Remove duplicate forward declaration
From: Thierry Reding <treding at nvidia.com> struct device is forward-declared twice. Remove the second instance. Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk> Signed-off-by: Thierry Reding <treding at nvidia.com> --- include/drm/drm_prime.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/drm/drm_prime.h b/include/drm/drm_prime.h index
2020 Sep 29
0
[PATCH v3 3/7] drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends
..._prime.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c index 135fbff6fecf..36c03e287e29 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c @@ -22,12 +22,17 @@ struct sg_table *etnaviv_gem_prime_get_sg_table(struct drm_gem_object *obj) return drm_prime_pages_to_sg(obj->dev, etnaviv_obj->pages, npages); } -void *etnaviv_gem_prime_vmap(struct drm_gem_object *obj) +int etnaviv_gem_prime_vmap(struct drm_gem_object *obj, struct dma_buf_map *map) { - return etnaviv_gem_vmap(obj); + void *vaddr = etnaviv_gem_vmap(obj); + if (!vaddr) + return -ENOMEM; + d...
2020 Oct 15
1
[PATCH v4 06/10] drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends
...m_prime.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c index a6d9932a32ae..bc2543dd987d 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c @@ -22,9 +22,14 @@ struct sg_table *etnaviv_gem_prime_get_sg_table(struct drm_gem_object *obj) return drm_prime_pages_to_sg(obj->dev, etnaviv_obj->pages, npages); } -void *etnaviv_gem_prime_vmap(struct drm_gem_object *obj) +int etnaviv_gem_prime_vmap(struct drm_gem_object *obj, struct dma_buf_map *map) { - return etnaviv_gem_vmap(obj); + void *vaddr = etnaviv_gem_vmap(obj); + if (!vaddr) + return -ENOMEM; + d...
2020 Oct 15
0
[PATCH v4 06/10] drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends
...m/etnaviv/etnaviv_gem_prime.c > index a6d9932a32ae..bc2543dd987d 100644 > --- a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c > +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c > @@ -22,9 +22,14 @@ struct sg_table *etnaviv_gem_prime_get_sg_table(struct drm_gem_object *obj) > return drm_prime_pages_to_sg(obj->dev, etnaviv_obj->pages, npages); > } > > -void *etnaviv_gem_prime_vmap(struct drm_gem_object *obj) > +int etnaviv_gem_prime_vmap(struct drm_gem_object *obj, struct dma_buf_map *map) > { > - return etnaviv_gem_vmap(obj); > + void *vaddr = etnaviv_gem_vmap(obj)...
2020 Sep 29
14
[PATCH v3 0/7] Support GEM object mappings from I/O memory
DRM's fbdev console uses regular load and store operations to update framebuffer memory. The bochs driver on sparc64 requires the use of I/O-specific load and store operations. We have a workaround, but need a long-term solution to the problem. This patchset changes GEM's vmap/vunmap interfaces to forward pointers of type struct dma_buf_map and updates the generic fbdev emulation to use
2020 Sep 29
14
[PATCH v3 0/7] Support GEM object mappings from I/O memory
DRM's fbdev console uses regular load and store operations to update framebuffer memory. The bochs driver on sparc64 requires the use of I/O-specific load and store operations. We have a workaround, but need a long-term solution to the problem. This patchset changes GEM's vmap/vunmap interfaces to forward pointers of type struct dma_buf_map and updates the generic fbdev emulation to use
2019 Jul 02
2
[PATCH v6 11/18] drm/virtio: switch from ttm to gem shmem helpers
...fers with virtgpu */ -struct sg_table *virtgpu_gem_prime_get_sg_table(struct drm_gem_object *obj) -{ - struct virtio_gpu_object *bo = gem_to_virtio_gpu_obj(obj); - - if (!bo->tbo.ttm->pages || !bo->tbo.ttm->num_pages) - /* should not happen */ - return ERR_PTR(-EINVAL); - - return drm_prime_pages_to_sg(bo->tbo.ttm->pages, - bo->tbo.ttm->num_pages); -} - struct drm_gem_object *virtgpu_gem_prime_import_sg_table( struct drm_device *dev, struct dma_buf_attachment *attach, struct sg_table *table) { return ERR_PTR(-ENODEV); } - -void *virtgpu_gem_prime_vmap(struct drm_gem_o...