Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use VAAPI on headless amdgpu devices #134

Closed
agrajag9 opened this issue Dec 27, 2021 · 3 comments
Closed

Cannot use VAAPI on headless amdgpu devices #134

agrajag9 opened this issue Dec 27, 2021 · 3 comments

Comments

@agrajag9
Copy link

Describe the bug
VAAPI calls may never return if there's no display attached. This is at least true for the WX 2100.

There's an option in amdgpu_drv.c but I wasn't able to get it working.

FreeBSD version
stable/13-n248443-c89c8b894cf GENERIC amd64

PCI Info

pciconf -lv
vgapci0@pci0:3:0:0:     class=0x030000 rev=0x00 hdr=0x00 vendor=0x1002 device=0x6995 subvendor=0x1028 subdevice=0x0b0c
    vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
    device     = 'Lexa XT [Radeon PRO WX 2100]'
    class      = display
    subclass   = VGA

DRM KMOD version

drm-fbsd13-kmod 5.4.144.g20211013
drm-kmod g20190710_1

To Reproduce

  1. Detach all displays from amdgpu device
  2. Run LIBVA_TRACE=1 LIBVA_DRIVER_NAME=radeonsi vainfo
@valpackett
Copy link
Contributor

There's an option in amdgpu_drv.c but I wasn't able to get it working.

It's under #ifdef __linux__ so we don't have it.

I have no idea why that is the case, this was added in a really old commit and nothing that actually reads the value is ifdef'd, it's literally only the sysctl itself.

Please do try removing the ifdef and using the functionality.

@valpackett
Copy link
Contributor

@agrajag9
Copy link
Author

Wonderful! Sorry for not trying the quick fix on my end, both $HOME and $WORK have been oversaturated with more important stuff, but glad to see we've gotten there anyways!

freebsd-git pushed a commit to freebsd/freebsd-src that referenced this issue Feb 6, 2023
amdgpu's virtual display feature uses pci_name() to match a module parameter
string, and the documentation shows an example of `0000:26:00.0` for the name.
In our case the name was just `drmn`, which is not actually unique across
devices.

The other consumers are wireless drivers, which will benefit from this
change.

Generate the expected string for pci_name() to return.

Related to:	freebsd/drm-kmod#134
Sponsored by:	https://www.patreon.com/valpackett
Reviewed by:	bz, hselasky, manu (earlier)
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D34248
freebsd-git pushed a commit to freebsd/freebsd-src that referenced this issue Feb 17, 2023
amdgpu's virtual display feature uses pci_name() to match a module parameter
string, and the documentation shows an example of `0000:26:00.0` for the name.
In our case the name was just `drmn`, which is not actually unique across
devices.

The other consumers are wireless drivers, which will benefit from this
change.

Generate the expected string for pci_name() to return.

Related to:	freebsd/drm-kmod#134
Sponsored by:	https://www.patreon.com/valpackett
Reviewed by:	bz, hselasky, manu (earlier)
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D34248

(cherry picked from commit 393b0ba)
freebsd-git pushed a commit to freebsd/freebsd-src that referenced this issue Feb 23, 2023
amdgpu's virtual display feature uses pci_name() to match a module parameter
string, and the documentation shows an example of `0000:26:00.0` for the name.
In our case the name was just `drmn`, which is not actually unique across
devices.

The other consumers are wireless drivers, which will benefit from this
change.

Generate the expected string for pci_name() to return.

Related to:	freebsd/drm-kmod#134
Sponsored by:	https://www.patreon.com/valpackett
Reviewed by:	bz, hselasky, manu (earlier)
Approved by:	re (cperciva)
Differential Revision: https://reviews.freebsd.org/D34248

(cherry picked from commit 393b0ba)
(cherry picked from commit 30960c5)
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this issue Mar 22, 2023
amdgpu's virtual display feature uses pci_name() to match a module parameter
string, and the documentation shows an example of `0000:26:00.0` for the name.
In our case the name was just `drmn`, which is not actually unique across
devices.

The other consumers are wireless drivers, which will benefit from this
change.

Generate the expected string for pci_name() to return.

Related to:	freebsd/drm-kmod#134
Sponsored by:	https://www.patreon.com/valpackett
Reviewed by:	bz, hselasky, manu (earlier)
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D34248
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

No branches or pull requests

2 participants