Skip to content
Snippets Groups Projects
Commit ffda6454 authored by Dmitry Osipenko's avatar Dmitry Osipenko
Browse files

drm/virtio: Set missing bo->attached flag


VirtIO-GPU driver now supports detachment of shmem BOs from host, but
doing it only for imported dma-bufs. Mark all shmem BOs as attached, not
just dma-bufs. This is a minor correction since detachment of a non-dmabuf
BOs not supported today.

Signed-off-by: default avatarDmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: default avatarVivek Kasireddy <vivek.kasireddy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241129155357.2265357-1-dmitry.osipenko@collabora.com
parent 5dd8b536
Branches
No related tags found
No related merge requests found
...@@ -250,7 +250,6 @@ static int virtgpu_dma_buf_init_obj(struct drm_device *dev, ...@@ -250,7 +250,6 @@ static int virtgpu_dma_buf_init_obj(struct drm_device *dev,
virtio_gpu_cmd_resource_create_blob(vgdev, bo, &params, virtio_gpu_cmd_resource_create_blob(vgdev, bo, &params,
ents, nents); ents, nents);
bo->guest_blob = true; bo->guest_blob = true;
bo->attached = true;
dma_buf_unpin(attach); dma_buf_unpin(attach);
dma_resv_unlock(resv); dma_resv_unlock(resv);
......
...@@ -1300,6 +1300,9 @@ virtio_gpu_cmd_resource_create_blob(struct virtio_gpu_device *vgdev, ...@@ -1300,6 +1300,9 @@ virtio_gpu_cmd_resource_create_blob(struct virtio_gpu_device *vgdev,
virtio_gpu_queue_ctrl_buffer(vgdev, vbuf); virtio_gpu_queue_ctrl_buffer(vgdev, vbuf);
bo->created = true; bo->created = true;
if (nents)
bo->attached = true;
} }
void virtio_gpu_cmd_set_scanout_blob(struct virtio_gpu_device *vgdev, void virtio_gpu_cmd_set_scanout_blob(struct virtio_gpu_device *vgdev,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment