diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2021-03-12 14:00:44 +0400 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2021-03-26 06:37:03 +0100 |
commit | 96ee096a1332086285c98d92f750ea0c3cb32564 (patch) | |
tree | b161ba3a1b5d066a1957865eb342047b42e49f38 /contrib/vhost-user-gpu/vugbm.h | |
parent | 0c27b9c5687fd276e26c3a95ca6d89f792fc7a1c (diff) | |
download | qemu-96ee096a1332086285c98d92f750ea0c3cb32564.zip qemu-96ee096a1332086285c98d92f750ea0c3cb32564.tar.gz qemu-96ee096a1332086285c98d92f750ea0c3cb32564.tar.bz2 |
vhost-user-gpu: fix vugbm_device_init fallback
vugbm implements GBM device wrapping, udmabuf and memory fallback.
However, the fallback/detection logic is flawed, as if "/dev/udmabuf"
failed to be opened, it will not initialize vugbm and crash later.
Rework the vugbm_device_init() logic to initialize correctly in all
cases.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210312100108.2706195-4-marcandre.lureau@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'contrib/vhost-user-gpu/vugbm.h')
-rw-r--r-- | contrib/vhost-user-gpu/vugbm.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/vhost-user-gpu/vugbm.h b/contrib/vhost-user-gpu/vugbm.h index 66f1520..82bc493 100644 --- a/contrib/vhost-user-gpu/vugbm.h +++ b/contrib/vhost-user-gpu/vugbm.h @@ -54,7 +54,7 @@ struct vugbm_buffer { uint32_t format; }; -bool vugbm_device_init(struct vugbm_device *dev, int fd); +void vugbm_device_init(struct vugbm_device *dev, int fd); void vugbm_device_destroy(struct vugbm_device *dev); bool vugbm_buffer_create(struct vugbm_buffer *buffer, struct vugbm_device *dev, |