Skip to content

Conversation

@jbeich
Copy link
Contributor

@jbeich jbeich commented Jan 15, 2020

Depends on #292. Runtime tested via i965, iHD+QSV and radeonsi from Mesa.

@jbeich
Copy link
Contributor Author

jbeich commented Jan 15, 2020

@Niacat, can you try building Wayland backend on NetBSD?
@iarebatman, I've salvaged useful bits from #350. Can you recheck?

@alarixnia
Copy link

alarixnia commented Jan 15, 2020

@jbeich Seems to build successfully with meson and -Dwayland=yes on NetBSD. Haven't tested it, but these files are generated:

./output/va/198dea3@@va-wayland@sha/wayland_va_wayland.c.o
./output/va/198dea3@@va-wayland@sha/wayland_va_wayland_drm.c.o
./output/va/198dea3@@va-wayland@sha/wayland_va_wayland_emgd.c.o

Just realized this PR is for the autotools build system. Afraid not, with BSD make:

Making all in wayland                   
make[3]: make[3]: don't know how to make wayland-drm-client-protocol.h. Stop

But with gmake it's fine.

@jbeich
Copy link
Contributor Author

jbeich commented Oct 7, 2020

What would it take to merge this? I'm not affiliated with any vendor, so can't negotiate through sales. DragonFly, FreeBSD, NetBSD have VAAPI enabled in binary packages for years. Transcoding in Plex using VAAPI (libva but not libmfx) is popular among FreeNAS users.

libva, libva-utils, intel-vaapi-driver are already somewhat portable and don't change much, so the maintanence should be low.

Copy link
Contributor

@dvrogozh dvrogozh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for upstreaming BSD changes!

Initial PR description says that this PR depends on #292. Is that still true or #363 became self-sufficient?

Effectively I have nothing against merging this in. The only question I have is: who can be a contact point in case more changes will be needed or some questions will arise? I wish we had some kind of file like MAINTANERS or OWNERS or whatever (might be wiki article) listing whom people can contact w/ different questions.

@jbeich
Copy link
Contributor Author

jbeich commented Oct 13, 2020

Initial PR description says that this PR depends on #292. Is that still true or #363 became self-sufficient?

#292 is still necessary but it's a runtime fix (used by mpv --gpu-context=drm and encoding) with small risk. This PR contains only build-related changes with zero risk (after passing CI).

who can be a contact point in case more changes will be needed or some questions will arise?

FreeBSD package maintainer (currently, @jbeich) or FreeBSD graphics team/maillist (e.g., @evadot, @zeising, @myfreeweb).

../va/va_trace.c:291:28: error: use of undeclared identifier '__NR_gettid'
    pid_t thd_id = syscall(__NR_gettid);
                           ^
../va/va_trace.c:669:28: error: use of undeclared identifier '__NR_gettid'
    pid_t thd_id = syscall(__NR_gettid);
                           ^
../va/va_trace.c:708:28: error: use of undeclared identifier '__NR_gettid'
    pid_t thd_id = syscall(__NR_gettid);
                           ^
../va/va_trace.c:1234:28: error: use of undeclared identifier '__NR_gettid'
    pid_t thd_id = syscall(__NR_gettid);
                           ^
BSD sed doesn't support inlining argument for `i` command, so embed
newlines as proposed in http://austingroupbugs.net/view.php?id=249

  GEN      wayland-drm-client-protocol.c
sed: 1: "1i#include "sysdeps.h"
": command i expects \ followed by text
On DragonFly and FreeBSD config are installed to /usr/local/etc by default.
ld: error: unable to find library -ldl
../va/va.c:455:64: error: use of undeclared identifier 'RTLD_NODELETE'
        handle = dlopen( driver_path, RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE );
                                                               ^
Unlike Linux it uses Meson/Clang to improve coverage.
@dvrogozh
Copy link
Contributor

Thx. No, I don't like squashing either. @jbeich : did you have travis ci passing at some point? /I'll give it couple of hours in hope it will work, but will merge if it won't. If you will note that you had it working - this will give me some confidence:)./

@jbeich
Copy link
Contributor Author

jbeich commented Oct 15, 2020

Same commit on TravisCI:

@dvrogozh dvrogozh mentioned this pull request Oct 16, 2020
@dvrogozh
Copy link
Contributor

This builds ok on freebsd: https://github.com/dvrogozh/libva/actions/runs/311038053. Let's try to merge this in. There is a risk that travis CI is not enabled correctly for freebsd, but we can deal with this separately.

@dvrogozh dvrogozh merged commit 437d426 into intel:master Oct 16, 2020
@uartie
Copy link

uartie commented Oct 16, 2020

This breaks build on ubuntu focal (20.04):

17:05:59,298 INFO  - va_trace.c:67:14: error: static declaration of ‘gettid’ follows non-static declaration
17:05:59,299 INFO  - 67 | static pid_t gettid()
17:05:59,299 INFO  - | ^~~~~~
17:05:59,299 INFO  - In file included from /usr/include/unistd.h:1170,
17:05:59,299 INFO  - from va_trace.c:48:
17:05:59,299 INFO  - /usr/include/x86_64-linux-gnu/bits/unistd_ext.h:34:16: note: previous declaration of ‘gettid’ was here
17:05:59,299 INFO  - 34 | extern __pid_t gettid (void) __THROW;
17:05:59,299 INFO  - | ^~~~~~

@uartie
Copy link

uartie commented Oct 16, 2020

... and Fedora builds broken too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants