summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Stevens <stevensd@chromium.org>2021-08-11 06:04:01 +0200
committerGerd Hoffmann <kraxel@redhat.com>2021-08-12 14:58:31 +0200
commit3c383a3688b7d8bc83ed22b36d0fb50db0bd2608 (patch)
tree5f4f5d2e487b15db941bbde333f4c97e1faa7bdc
parentudmabuf: fix general protection fault in udmabuf_create (diff)
downloadlinux-3c383a3688b7d8bc83ed22b36d0fb50db0bd2608.tar.xz
linux-3c383a3688b7d8bc83ed22b36d0fb50db0bd2608.zip
drm/virtio: set non-cross device blob uuid_state
Blob resources without the cross device flag don't have a uuid to share with other virtio devices. When exporting such blobs, set uuid_state to STATE_ERR so that virtgpu_virtio_get_uuid doesn't hang. Signed-off-by: David Stevens <stevensd@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/20210811040401.1264234-1-stevensd@chromium.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_prime.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_prime.c b/drivers/gpu/drm/virtio/virtgpu_prime.c
index 807a27a16365..e45dbf14b307 100644
--- a/drivers/gpu/drm/virtio/virtgpu_prime.c
+++ b/drivers/gpu/drm/virtio/virtgpu_prime.c
@@ -98,6 +98,8 @@ struct dma_buf *virtgpu_gem_prime_export(struct drm_gem_object *obj,
} else {
bo->uuid_state = STATE_ERR;
}
+ } else if (!(bo->blob_flags & VIRTGPU_BLOB_FLAG_USE_CROSS_DEVICE)) {
+ bo->uuid_state = STATE_ERR;
}
exp_info.ops = &virtgpu_dmabuf_ops.ops;