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 to new function Signed-off-by: Daniel Vetter <daniel.vetter at intel.com> Cc: David Airlie <airlied at linux.ie> Cc: Gerd Hoffmann <kraxel at redhat.com> Cc: virtualization at lists.linux-foundation.org --- drivers/gpu/drm/virtio/virtgpu_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index 6ccbd01cd888..346cef5ce251 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -150,7 +150,7 @@ static int virtio_gpu_object_shmem_init(struct virtio_gpu_device *vgdev, if (ret < 0) return -EINVAL; - shmem->pages = drm_gem_shmem_get_sg_table(&bo->base.base); + shmem->pages = drm_gem_shmem_get_pages_sgt(&bo->base.base); if (!shmem->pages) { drm_gem_shmem_unpin(&bo->base.base); return -EINVAL; -- 2.26.2
Thomas Zimmermann
2020-May-14 07:46 UTC
[PATCH 4/9] drm/virtio: Call the right shmem helpers
Am 11.05.20 um 11:35 schrieb Daniel Vetter:> 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 to new function > > Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>Acked-by: Thomas Zimmermann <tzimmermann at suse.de>> Cc: David Airlie <airlied at linux.ie> > Cc: Gerd Hoffmann <kraxel at redhat.com> > Cc: virtualization at lists.linux-foundation.org > --- > drivers/gpu/drm/virtio/virtgpu_object.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c > index 6ccbd01cd888..346cef5ce251 100644 > --- a/drivers/gpu/drm/virtio/virtgpu_object.c > +++ b/drivers/gpu/drm/virtio/virtgpu_object.c > @@ -150,7 +150,7 @@ static int virtio_gpu_object_shmem_init(struct virtio_gpu_device *vgdev, > if (ret < 0) > return -EINVAL; > > - shmem->pages = drm_gem_shmem_get_sg_table(&bo->base.base); > + shmem->pages = drm_gem_shmem_get_pages_sgt(&bo->base.base); > if (!shmem->pages) { > drm_gem_shmem_unpin(&bo->base.base); > return -EINVAL; >-- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 N?rnberg, Germany (HRB 36809, AG N?rnberg) Gesch?ftsf?hrer: Felix Imend?rffer -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20200514/aaa7cbee/attachment.sig>
Maybe Matching Threads
- [PATCH 4/4] drm/virtio: move virtio_gpu_mem_entry initialization to new function
- [PATCH 4/4] drm/virtio: move virtio_gpu_mem_entry initialization to new function
- [PATCH v2 4/4] drm/virtio: move virtio_gpu_mem_entry initialization to new function
- [PATCH] drm/virtio: Fix an IS_ERR() vs NULL check in virtio_gpu_object_shmem_init()
- [PATCH 4/4] drm/virtio: move virtio_gpu_mem_entry initialization to new function