diff options
author | Philipp Kerling <pkerling@casix.org> | 2017-06-13 09:54:06 +0200 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2017-06-15 16:40:48 +0800 |
commit | 83fcb107ad01ee6acc558b736b12db6bea6f7d2f (patch) | |
tree | 935cd4a055648618dd6f76eaf7195df957a3288a /va | |
parent | 6ce91ae201d0320664bb1d440973e57f6acee017 (diff) | |
download | libva-83fcb107ad01ee6acc558b736b12db6bea6f7d2f.tar.gz |
wayland: Also support wl_drm version 1
Just using version 2 without checking would lead to a protocol error
bringing down the entire application, and wl_drm version 1 is still
supported since v2 only adds PRIME capabilities.
Signed-off-by: Philipp Kerling <pkerling@casix.org>
Diffstat (limited to 'va')
-rw-r--r-- | va/wayland/va_wayland_drm.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/va/wayland/va_wayland_drm.c b/va/wayland/va_wayland_drm.c index 97dfee1..4a24a2c 100644 --- a/va/wayland/va_wayland_drm.c +++ b/va/wayland/va_wayland_drm.c @@ -183,8 +183,12 @@ registry_handle_global( struct va_wayland_drm_context *wl_drm_ctx = data; if (strcmp(interface, "wl_drm") == 0) { + /* bind to at most version 2, but also support version 1 if + * compositor does not have v2 + */ wl_drm_ctx->drm = - wl_registry_bind(wl_drm_ctx->registry, id, wl_drm_ctx->drm_interface, 2); + wl_registry_bind(wl_drm_ctx->registry, id, wl_drm_ctx->drm_interface, + (version < 2) ? version : 2); } } |