[PATCH v1 4/5] drm/virtio: Import prime buffers from other devices as guest blobs
Dmitry Osipenko
dmitry.osipenko at collabora.com
Thu Jul 18 19:33:59 UTC 2024
On 6/24/24 09:43, Vivek Kasireddy wrote:
> +static void virtgpu_dma_buf_move_notify(struct dma_buf_attachment *attach)
> +{
> + struct drm_gem_object *obj = attach->importer_priv;
> + struct virtio_gpu_device *vgdev = obj->dev->dev_private;
> + struct virtio_gpu_object *bo = gem_to_virtio_gpu_obj(obj);
> +
> + if (bo->created) {
> + virtio_gpu_cmd_resource_detach_backing(vgdev,
> + bo->hw_res_handle);
> + if (bo->sgt)
> + dma_buf_unmap_attachment(attach, bo->sgt,
> + DMA_BIDIRECTIONAL);
> +
> + bo->sgt = NULL;
> + }
BO detachment should be fenced, AFAICT. See
virtio_gpu_detach_object_fenced() in [1] for example.
[1]
https://lore.kernel.org/lkml/20240105184624.508603-1-dmitry.osipenko@collabora.com/T/#me62dca570fdae39c41bdf0867c9908ef62d5cc2e
BTW, for next version please correct the list of emails recipients. I
got only patch 0 in my inbox, for patches 1-5 only Gerd Hoffmann is CC'ed.
--
Best regards,
Dmitry
More information about the dri-devel
mailing list