hardware/intel/common/libva
修订版 | 83fcb107ad01ee6acc558b736b12db6bea6f7d2f (tree) |
---|---|
时间 | 2017-06-15 17:40:48 |
作者 | Philipp Kerling <pkerling@casi...> |
Commiter | Xiang, Haihao |
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>
@@ -183,8 +183,12 @@ registry_handle_global( | ||
183 | 183 | struct va_wayland_drm_context *wl_drm_ctx = data; |
184 | 184 | |
185 | 185 | if (strcmp(interface, "wl_drm") == 0) { |
186 | + /* bind to at most version 2, but also support version 1 if | |
187 | + * compositor does not have v2 | |
188 | + */ | |
186 | 189 | wl_drm_ctx->drm = |
187 | - wl_registry_bind(wl_drm_ctx->registry, id, wl_drm_ctx->drm_interface, 2); | |
190 | + wl_registry_bind(wl_drm_ctx->registry, id, wl_drm_ctx->drm_interface, | |
191 | + (version < 2) ? version : 2); | |
188 | 192 | } |
189 | 193 | } |
190 | 194 |