Displaying 7 results from an estimated 7 matches for "drm_gem_shmem_get_pages_sgt".
2020 May 11
1
[PATCH 4/9] drm/virtio: Call the right shmem helpers
drm_gem_shmem_get_sg_table is meant to implement
obj->funcs->get_sg_table, for prime exporting. The one we want is
drm_gem_shmem_get_pages_sgt, which also handles imported dma-buf, not
just native objects.
v2: Rebase, this stuff moved around in
commit 2f2aa13724d56829d910b2fa8e80c502d388f106
Author: Gerd Hoffmann <kraxel at redhat.com>
Date: Fri Feb 7 08:46:38 2020 +0100
drm/virtio: move virtio_gpu_mem_entry initialization...
2019 Jun 28
1
[PATCH v4 11/12] drm/virtio: switch from ttm to gem shmem helpers
...em_obj->base);
> > + bo->base.base.funcs = &virtio_gpu_gem_funcs;
> Move this to virtio_gpu_create_object.
Fixed.
> > + ret = drm_gem_shmem_pin(&obj->base.base);
> The bo is attached for its entire lifetime, at least currently. Maybe
> we can use drm_gem_shmem_get_pages_sgt (and get rid of obj->pages).
Already checked this.
We can't due to the iommu quirks.
cheers,
Gerd
2020 Jun 19
0
[PATCH] drm/virtio: Fix an IS_ERR() vs NULL check in virtio_gpu_object_shmem_init()
The drm_gem_shmem_get_pages_sgt() function returns error pointers on
error, it never returns NULL.
Fixes: d323bb44e4d2 ("drm/virtio: Call the right shmem helpers")
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
---
drivers/gpu/drm/virtio/virtgpu_object.c | 4 ++--
1 file changed, 2 insertions(+), 2 d...
2020 Aug 24
2
Is: virtio_gpu_object_shmem_init issues? Was:Re: upstream boot error: general protection fault in swiotlb_map
...R2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> Call Trace:
> dma_direct_map_page include/linux/dma-direct.h:170 [inline]
> dma_direct_map_sg+0x3bb/0x670 kernel/dma/direct.c:368
> dma_map_sg_attrs+0xd0/0x160 kernel/dma/mapping.c:183
> drm_gem_shmem_get_pages_sgt drivers/gpu/drm/drm_gem_shmem_helper.c:700 [inline]
> drm_gem_shmem_get_pages_sgt+0x1fc/0x310 drivers/gpu/drm/drm_gem_shmem_helper.c:679
> virtio_gpu_object_shmem_init drivers/gpu/drm/virtio/virtgpu_object.c:153 [inline]
> virtio_gpu_object_create+0x2fd/0xa70 drivers/gpu/drm/virtio/virt...
2019 Jun 20
2
[PATCH v4 11/12] drm/virtio: switch from ttm to gem shmem helpers
virtio-gpu basically needs a sg_table for the bo, to tell the host where
the backing pages for the object are. So the gem shmem helpers are a
perfect fit. Some drm_gem_object_funcs need thin wrappers to update the
host state, but otherwise the helpers handle everything just fine.
Once the fencing was sorted the switch was surprisingly easy and for the
most part just removing the ttm code.
v4:
2019 Jun 20
2
[PATCH v4 11/12] drm/virtio: switch from ttm to gem shmem helpers
virtio-gpu basically needs a sg_table for the bo, to tell the host where
the backing pages for the object are. So the gem shmem helpers are a
perfect fit. Some drm_gem_object_funcs need thin wrappers to update the
host state, but otherwise the helpers handle everything just fine.
Once the fencing was sorted the switch was surprisingly easy and for the
most part just removing the ttm code.
v4:
2019 Jun 27
0
[PATCH v4 11/12] drm/virtio: switch from ttm to gem shmem helpers
...L;
> + if (WARN_ON_ONCE(obj->pages))
> + return -EINVAL;
>
> - if (!obj->pages) {
> - int ret;
> + ret = drm_gem_shmem_pin(&obj->base.base);
The bo is attached for its entire lifetime, at least currently. Maybe
we can use drm_gem_shmem_get_pages_sgt (and get rid of obj->pages).
> + if (ret < 0)
> + return -EINVAL;
>
> - ret = virtio_gpu_object_get_sg_table(vgdev, obj);
> - if (ret)
> - return ret;
> + obj->pages = drm_gem_shmem_get_sg_ta...