hardware/intel/common/vaapi
Revisión | f139dafa59172d40543f2ec469a035d3de9fdc6a (tree) |
---|---|
Tiempo | 2019-01-11 15:44:33 |
Autor | Haihao Xiang <haihao.xiang@inte...> |
Commiter | Xiang, Haihao |
Check the interface from libva first
And bump libva dependency to 1.4.0
This fixes https://github.com/intel/intel-vaapi-driver/issues/419
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
@@ -10,7 +10,7 @@ m4_append([intel_vaapi_driver_version], intel_vaapi_driver_pre_version, [.pre]) | ||
10 | 10 | ]) |
11 | 11 | |
12 | 12 | # libva minimum version requirement |
13 | -m4_define([va_api_version], [1.1.0]) | |
13 | +m4_define([va_api_version], [1.4.0]) | |
14 | 14 | |
15 | 15 | # libdrm minimum version requirement |
16 | 16 | m4_define([libdrm_version], [2.4.52]) |
@@ -397,6 +397,7 @@ i965_output_wayland_init(VADriverContextP ctx) | ||
397 | 397 | struct i965_driver_data * const i965 = i965_driver_data(ctx); |
398 | 398 | struct dso_handle *dso_handle; |
399 | 399 | struct wl_vtable *wl_vtable; |
400 | + struct VADriverVTableWayland * const vtable = ctx->vtable_wayland; | |
400 | 401 | |
401 | 402 | static const struct dso_symbol libegl_symbols[] = { |
402 | 403 | { |
@@ -465,25 +466,29 @@ i965_output_wayland_init(VADriverContextP ctx) | ||
465 | 466 | if (!i965->wl_output) |
466 | 467 | goto error; |
467 | 468 | |
468 | - i965->wl_output->libegl_handle = dso_open(LIBEGL_NAME); | |
469 | - if (!i965->wl_output->libegl_handle) { | |
470 | - i965->wl_output->libegl_handle = dso_open(LIBEGL_NAME_FALLBACK); | |
471 | - if (!i965->wl_output->libegl_handle) | |
469 | + wl_vtable = &i965->wl_output->vtable; | |
470 | + | |
471 | + if (vtable->wl_interface) | |
472 | + wl_vtable->drm_interface = vtable->wl_interface; | |
473 | + else { | |
474 | + i965->wl_output->libegl_handle = dso_open(LIBEGL_NAME); | |
475 | + if (!i965->wl_output->libegl_handle) { | |
476 | + i965->wl_output->libegl_handle = dso_open(LIBEGL_NAME_FALLBACK); | |
477 | + if (!i965->wl_output->libegl_handle) | |
478 | + goto error; | |
479 | + } | |
480 | + | |
481 | + dso_handle = i965->wl_output->libegl_handle; | |
482 | + if (!dso_get_symbols(dso_handle, wl_vtable, sizeof(*wl_vtable), | |
483 | + libegl_symbols)) | |
472 | 484 | goto error; |
473 | 485 | } |
474 | 486 | |
475 | - dso_handle = i965->wl_output->libegl_handle; | |
476 | - wl_vtable = &i965->wl_output->vtable; | |
477 | - if (!dso_get_symbols(dso_handle, wl_vtable, sizeof(*wl_vtable), | |
478 | - libegl_symbols)) | |
479 | - goto error; | |
480 | - | |
481 | 487 | i965->wl_output->libwl_client_handle = dso_open(LIBWAYLAND_CLIENT_NAME); |
482 | 488 | if (!i965->wl_output->libwl_client_handle) |
483 | 489 | goto error; |
484 | 490 | |
485 | 491 | dso_handle = i965->wl_output->libwl_client_handle; |
486 | - wl_vtable = &i965->wl_output->vtable; | |
487 | 492 | if (!dso_get_symbols(dso_handle, wl_vtable, sizeof(*wl_vtable), |
488 | 493 | libwl_client_symbols)) |
489 | 494 | goto error; |