Skip to content

Commit

Permalink
drm/virtio: set non-cross device blob uuid_state
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Stevens authored and Gerd Hoffmann committed Aug 12, 2021
1 parent b9770b0 commit 3c383a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/virtio/virtgpu_prime.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3c383a3

Please sign in to comment.