Commit Graph

19 Commits

Author SHA1 Message Date
Sil Vilerino ffc0b0dbc4 va_display_drm: Allow VGEM for WSL2
Signed-off-by: Sil Vilerino <sivileri@microsoft.com>
2023-02-15 06:49:26 -08:00
Brian Norris ecd26b3910 test_va_api: Don't assume our DRM node is first
Similar to:

  bfb6b98ed6 exclude vgem node and invalid drm node in vainfo

But adapted to use drmGetDevices2() for more generic handling.

It's possible to have a vgem node at 128, and the VA-API node is at 129,
for example.

Signed-off-by: Brian Norris <briannorris@chromium.org>
2023-02-03 13:50:26 +08:00
Sil Vilerino 410a228564 vainfo: Add support for Win32 device enumeration and selection 2022-10-27 09:17:39 -07:00
Sil Vilerino ef9b9a284c vainfo: add va-win32 support
Signed-off-by: Sil Vilerino <sivileri@microsoft.com>
2022-10-23 21:39:00 +08:00
Emil Velikov f6f6b33c38 common: print the display being attempted
Currently we silently fall-though all possible display types. Which is
fairly confusing for the end user if `vainfo` works but it fails on
their favourite program.

Add an explicit print, saving time to both users and developers.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2022-09-30 08:43:41 -07:00
Carl Zhang bfb6b98ed6 exclude vgem node and invalid drm node in vainfo
call drm function to avoid invalid node
check the name of vgem

Signed-off-by: Carl Zhang <carl.zhang@intel.com>
2022-02-17 02:58:30 -05:00
Carl Zhang 42dd2b216e unify the code styles using the style_unify script
use astyle to unify the code style
copy the style_unify script from
https://github.com/intel/libva/blob/master/style_unify

Signed-off-by: Carl Zhang <carl.zhang@intel.com>
2021-09-29 20:59:40 -04:00
Haihao Xiang 1bea64e121 Add '-Wall' or '-fstack-protector' compilation flags
In addition, this fixes all warnings reported by -Wall

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2018-06-05 14:18:03 +08:00
tiantian 71fc4bb9ba add vainfo support in android
Signed-off-by: tiantian <tiantian.wang@intel.com>
2018-06-05 13:45:17 +08:00
Lionel Landwerlin 5b10b33025 add meson build
v2: remove gtest meson file

v3: install binaries
    respect disabled libraries
    apply cpp_args to all test files
    add full version

v4: define HAVE_* macros

v5: Downgrade meson requirement to 0.42.0
2018-03-21 08:34:47 +08:00
Xu Guangxin 9c42f5ae8b android: remove vaPutSurface dependency
vaPutSurface only used in libva-utils. The actual application/omx
implementation never use it.
It will introduce many header files in android framework.Android change
rapidly, the directory or file name changed in versionto version. It's
hard to catch up and maintain support for many versionof android.
2018-01-26 10:33:56 +08:00
Victor Toso a2cc4901a0 wayland: Fix small leak of wl_registry on VADisplay
The struct wl_registry is created with wl_proxy_marshal_constructor()
while calling wl_display_get_registry() and must be freed wtih
wl_proxy_destroy() by calling wl_registry_destroy().

72 bytes in 1 blocks are definitely lost in loss record 6 of 10
   at 0x4C2EF35: calloc (in vgpreload_memcheck-amd64-linux.so)
   by 0x5FD7503: ??? (in libwayland-client.so.0.3.0)
   by 0x5FD7A26: wl_proxy_marshal_array_constructor_versioned
   by 0x5FD7D7B: wl_proxy_marshal_constructor
   by 0x10B096: wl_display_get_registry (wayland-client-protocol.h:966)
   by 0x10AD72: va_open_display_wayland (va_display_wayland.c:91)
   by 0x10A43B: va_open_display (va_display.c:154)
   by 0x109B0A: main (vainfo.c:107)

Signed-off-by: Victor Toso <victortoso@redhat.com>
2017-12-19 10:30:02 -08:00
Victor Toso 3a83ce4a56 Remove some unused variables
- vainfo/vainfo.c
  Variables 'tmp' and 'file_size' in parse_args() were never used.

- common/va_display.c
  Variable 'device_name' was introduced at f36a392a96 but it was
  never used.

Signed-off-by: Victor Toso <victortoso@redhat.com>
2017-12-15 08:52:46 -08:00
Xiang, Haihao 16196be3da Replace abort() with exit(1)
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2017-07-18 15:46:16 +08:00
Xiang, Haihao be3d349cd9 vainfo: Add '--help' to show available options
vainfo has '--display' and '--device' options, but these options are
hidden, hence add '--help' to show these options

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2017-07-18 15:46:16 +08:00
Xiang, Haihao f36a392a96 vainfo: add an option "--device" to specify a drm device
This option is only available when the drm display is specified in the
command line

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2017-07-18 15:46:16 +08:00
Xiang, Haihao d535dfcb25 Add the missing header files
v2: Add the missing header files to noinst_HEADERS instead.

This fixes https://github.com/01org/libva-utils/issues/26

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit cb3a33ea5e)
2017-03-17 12:49:33 +08:00
Daniel Charles d2918a28b8 add missing files for make dist
when creating the package tarball, autogen.sh is handy to have and
the header files are necessary for compilation.

TEST="make dist should include autogen.sh, loadsurface.h and"
TEST="loadsurface_yuv.h on the final tarballs."
TEST="Then tarball user can compile in the same way as github clone"

Signed-off-by: Daniel Charles <daniel.charles@intel.com>
2017-03-07 10:24:05 -08:00
Daniel Charles c9af683d6c libva-utils: initial commit
libva-utils is a new git repository that will host sample applications
for libva, conformance tests and others relevant to libva

It is using the same version as libva and it should follow libva version.
It is intended to be released together with libva
It has the same license as libva

Initial functionality ports the vainfo application from libva repository.
The git history for it will remain on libva.  To port vainfo, also the
a common libva-display library was ported. The original tests for encoder
and decoder are also ported to this repository. debian folder for vainfo
was also ported

The basic tests are going to be substituted by a new set of tests based
on Gtest framework.

libva-utils will dynamically link libva, use pkg-config to compile and
link properly.

Signed-off-by: Daniel Charles <daniel.charles@intel.com>
2016-11-29 11:41:17 -08:00