DMFBuf does not work on Pinebook Pro/Rockchip RK3399
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox105 | --- | fixed |
People
(Reporter: monkeyboyted, Assigned: rmader)
References
(Blocks 2 open bugs, )
Details
Attachments
(8 files, 3 obsolete files)
User Agent: Mozilla/5.0 (X11; Linux aarch64; rv:92.0) Gecko/20100101 Firefox/92.0
Steps to reproduce:
- Enable gfx.webrender.all gfx.compositor.forced-enabled gfx.webrender.compositor
- Start Firefox in wayland
$MOZ_ENABLE_WAYLAND=1 firefox - Navigate to about support
- Look at DMABUF
Actual results:
Firefox prints out this error in the shell
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: Failed to create EGLContext!: 0x3009 (t=1.17142) [GFX1-]: Failed to create EGLContext!: 0x3009
About:support
DMABUF
available by default
failed by runtime: Failed to configure
disabled by default: Disabled by default
force_enabled by user: Force enabled by pref
blocklisted by env: Blocklisted by gfxInfo
unavailable by runtime: Hardware Webrender requires DMAbuf support
Expected results:
Firefox should report DMABUF is available because the pinebook pro uses Panfront/Bitfrost opensource driver
I believe Collabora invested in that particular Mali driver.
Reporter | ||
Updated•3 years ago
|
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Graphics: WebRender' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Reporter | ||
Comment 2•3 years ago
|
||
glxinfo
Assignee | ||
Comment 3•3 years ago
|
||
Thanks, that should be enough for the moment for us to start debugging! There's one thing I'd like to ask you: could you also check latest nightly[1] and paste the output of about:support
for that (once vanilla/with default settings, once with MOZ_ENABLE_WAYLAND=1
)?
1: https://www.mozilla.org/en-GB/firefox/channel/desktop/#nightly
Comment 4•3 years ago
|
||
Linux aarch64
There is no official arm64 Linux Nightly yet.
Autoland has arm64 Linux builds, but not every autoland build has one.
- Open https://treeherder.mozilla.org/jobs?repo=autoland&tier=2
- Search for "Linux AArch64 opt" with a green "B"
- Then click on "Artifacts" and download target.tar.bz2. It's like a Nightly without updater.
Comment 5•3 years ago
•
|
||
Panfrost -- Mali T860 (Panfrost)
2014: https://www.collabora.com/about-us/blog/2014/08/13/wayland-x11-arm-mali/
2018: T62x, not T860: https://community.arm.com/developer/tools-software/graphics/f/discussions/9886/update-mali-t62x-gbm-drivers
T860 in 2018: https://www.phoronix.com/scan.php?page=news_item&px=Panfrost-T860-Bring-Up
T860 in 2019: https://patchwork.freedesktop.org/patch/297644/
2021: "[PATCH 10/12] drm/panfrost: add DMA-buf user fence support" https://yhbt.net/lore/all/20210504132729.2046-11-christian.koenig@amd.com/
Reporter | ||
Comment 6•3 years ago
|
||
94.0a1 (2021-09-15) (64-bit)
Reporter | ||
Comment 7•3 years ago
|
||
https://www.collabora.com/news-and-blog/blog/2020/11/03/from-panfrost-to-production-a-tale-of-open-source-graphics/
https://www.collabora.com/news-and-blog/blog/2019/06/05/joining-collabora-for-a-summer-of-panfrost/
https://blogs.gnome.org/engagement/2019/10/03/alyssa-rosenzweig-panfrost/
https://patchwork.kernel.org/project/dri-devel/patch/20190401074730.12241-4-robh@kernel.org/
Hi Darkspirit,
Does these links help you?
Reporter | ||
Comment 8•3 years ago
|
||
My apologies. Here is a completely vanilla about support in json format. The earlier file has glx.webrender.all, glx.webrender.compositor and glx.webrender.compositor.force-enabled enabled.
Comment 9•3 years ago
•
|
||
"windowProtocol": "wayland",
Driver Vendor: mesa/swrast
Reporter | ||
Comment 10•3 years ago
|
||
I accidentally turned on MOZ_ENABLE_WAYLAND=1
Comment 11•3 years ago
|
||
What log do you get in the terminal if start Nightly with MOZ_LOG="Dmabuf:5" ./firefox
?
Reporter | ||
Comment 12•3 years ago
|
||
Hi Darkspirit,
I am sorry I am late
MOZ_LOG="Dmabuf:5" ./firefox-bin
[Parent 38218: Main Thread]: D/Dmabuf wl_drm is available.
[Parent 38218: Main Thread]: D/Dmabuf zwp_linux_dmabuf_v1 is available.
[Parent 38218: Main Thread]: D/Dmabuf nsDMABufDevice::Configure()
[Parent 38218: Main Thread]: D/Dmabuf Loading DMABuf system library libgbm.so.1 ...
[Parent 38218: Main Thread]: D/Dmabuf Failed: We're missing DRM render device!
Firefox nightly
Assignee | ||
Comment 13•3 years ago
•
|
||
Comment 8 and comment 10 appear to have invalid JSON content - they don't open for me. Please use "Copy text to clipboard" in about:support
instead.
(In reply to monkeyboyted from comment #12)
...
[Parent 38218: Main Thread]: D/Dmabuf Failed: We're missing DRM render device!
Thanks, then we roughly know where the issue lies[1]. Will have a look.
1: https://searchfox.org/mozilla-central/source/toolkit/xre/glxtest.cpp#402-407
Updated•3 years ago
|
Updated•3 years ago
|
Reporter | ||
Comment 14•3 years ago
|
||
Resubmit moz enabled about support
Reporter | ||
Comment 15•3 years ago
|
||
Resubmitting about support into plain text
Reporter | ||
Comment 16•3 years ago
|
||
I realize that MOZ_ENABLE_WAYLAND was set globally on my computer. Do'h. Now, it is vanilla with all these gtk warnings.
(firefox:5176): Gtk-WARNING **: 13:28:50.735: Theme parsing error: gtk.css:68:35: The style property GtkButton:child-displacement-x is deprecated and shouldn't be used anymore. It will be removed in a future version
(firefox:5176): Gtk-WARNING **: 13:28:50.736: Theme parsing error: gtk.css:69:35: The style property GtkButton:child-displacement-y is deprecated and shouldn't be used anymore. It will be removed in a future version
(firefox:5176): Gtk-WARNING **: 13:28:50.736: Theme parsing error: gtk.css:73:46: The style property GtkScrolledWindow:scrollbars-within-bevel is deprecated and shouldn't be used anymore. It will be removed in a future version
(firefox:5176): Gtk-WARNING **: 13:28:50.833: Theme parsing error: gtk.css:68:35: The style property GtkButton:child-displacement-x is deprecated and shouldn't be used anymore. It will be removed in a future version
(firefox:5176): Gtk-WARNING **: 13:28:50.833: Theme parsing error: gtk.css:69:35: The style property GtkButton:child-displacement-y is deprecated and shouldn't be used anymore. It will be removed in a future version
(firefox:5176): Gtk-WARNING **: 13:28:50.833: Theme parsing error: gtk.css:73:46: The style property GtkScrolledWindow:scrollbars-within-bevel is deprecated and shouldn't be used anymore. It will be removed in a future version
(firefox:5176): Gtk-WARNING **: 13:28:50.953: Theme parsing error: gtk.css:68:35: The style property GtkButton:child-displacement-x is deprecated and shouldn't be used anymore. It will be removed in a future version
(firefox:5176): Gtk-WARNING **: 13:28:50.953: Theme parsing error: gtk.css:69:35: The style property GtkButton:child-displacement-y is deprecated and shouldn't be used anymore. It will be removed in a future version
(firefox:5176): Gtk-WARNING **: 13:28:50.953: Theme parsing error: gtk.css:73:46: The style property GtkScrolledWindow:scrollbars-within-bevel is deprecated and shouldn't be used anymore. It will be removed in a future version
(firefox:5176): Gtk-WARNING **: 13:28:51.049: Theme parsing error: gtk.css:68:35: The style property GtkButton:child-displacement-x is deprecated and shouldn't be used anymore. It will be removed in a future version
(firefox:5176): Gtk-WARNING **: 13:28:51.049: Theme parsing error: gtk.css:69:35: The style property GtkButton:child-displacement-y is deprecated and shouldn't be used anymore. It will be removed in a future version
(firefox:5176): Gtk-WARNING **: 13:28:51.049: Theme parsing error: gtk.css:73:46: The style property GtkScrolledWindow:scrollbars-within-bevel is deprecated and shouldn't be used anymore. It will be removed in a future version
Assignee | ||
Comment 17•3 years ago
|
||
The GTK theme warnings suggest that you are using a non-default theme which needs to get updated. Unlikely we can do anything about it on the Firefox side.
Assignee | ||
Comment 18•3 years ago
|
||
It looks to me like like what we need to do here is use the new EGL_EXT_device_drm_render_node
extension. IIUC it would replace what we currently do in [3], even though we need to keep that around as a fallback.
For the record, given that the V3D driver is currently buggy on HW-WR (bug 1725624) and thus should not be activated by default, there's also no DmaBuf usage by default. I.e. this has a rather low priority for me, even though it would be good to have.
1: https://github.com/KhronosGroup/EGL-Registry/pull/127
2: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11797
3: https://searchfox.org/mozilla-central/source/toolkit/xre/glxtest.cpp#351-420
Comment 19•3 years ago
|
||
The severity field is not set for this bug.
:jimm, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Assignee | ||
Comment 20•3 years ago
|
||
This is now blocked by https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12796
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 21•3 years ago
|
||
We have a custom render node discovery code (needed for DMABUF) that
predates the EGL_DRM_RENDER_NODE_FILE_EXT
extension. It has additional
value that it helps us discover the right vendor and device ID on
multi-GPU setups (there's a EGL extension far that backing, but
not ready yet).
In case our custom code fails - notably split display/render SoCs,
which are common in the ARM world - lets use
EGL_DRM_RENDER_NODE_FILE_EXT
as fallback. This will ensure we
get a valid render node path on all devices, assuming the driver
supports that extension right. These SoCs are usually no multi-GPU
systems. If they are, we still don't get the right IDs - but an
extension for that is in the making.
Note: Mesa does not implement this right for such SoCs, i.e. it
will fail just as our own custom code. However, there's a MR in
review - once it lands, things should start working, see
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12796
Depends on D134254
Comment 22•3 years ago
|
||
Pushed by robert.mader@posteo.de: https://hg.mozilla.org/integration/autoland/rev/e5c53da802b9 Use EGL_DRM_RENDER_NODE_FILE_EXT in glxtest, r=gfx-reviewers,aosmond
Assignee | ||
Comment 23•3 years ago
|
||
As said before, this bug is not fixed by the patch above until https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12796 landed and got rolled out. Thus keeping this bug open till then.
Comment 24•3 years ago
|
||
bugherder |
Assignee | ||
Comment 26•2 years ago
|
||
Some devices do not use the same DRM device for KMS and rendering. On
these, we currently don't manage to derive the right render node from
the KMS device. In many if not most such cases there is only a single
render node available on the system though. Thus use that as fallback.
Notes:
-
We only call this code if the driver in use advertices
EGL_EXT_device_drm
, i.e. is actually a DRM driver and thus
should have a render node. -
This should all become unnecessary once the respective drivers
supportEXT_device_drm_render_node
- it does not look like that
will happen soon though.
Assignee | ||
Comment 27•2 years ago
|
||
Comment 28•2 years ago
|
||
Pushed by robert.mader@posteo.de: https://hg.mozilla.org/integration/autoland/rev/b5120429298b Guess DRM render node if only one is available, r=gfx-reviewers,lsalzman
Reporter | ||
Comment 29•2 years ago
|
||
MOZ_LOG="Dmabuf:5" ./firefox-bin
[GFX1-]: glxtest: DRM render node not clearly detectable. Falling back to using the only one that was found.
[GFX1-]: glxtest: VA-API test failed: failed to initialise VAAPI connection.
[Parent 1738: Main Thread]: D/Dmabuf wl_drm is available.
[Parent 1738: Main Thread]: D/Dmabuf zwp_linux_dmabuf_v1 is available.
[Parent 1738: Main Thread]: D/Dmabuf Using DRM device /dev/dri/renderD128
[Parent 1738: Main Thread]: D/Dmabuf nsDMABufDevice::Configure()
[Parent 1738: Main Thread]: D/Dmabuf Loading DMABuf system library libgbm.so.1 ...
[Parent 1738: Main Thread]: D/Dmabuf DMABuf is enabled
[GFX1-]: Failed to create EGLContext!: 0x3009
Reporter | ||
Comment 30•2 years ago
|
||
Reporter | ||
Comment 31•2 years ago
|
||
I meant night build at that particular commit aka build id 20220809222238
Reporter | ||
Comment 32•2 years ago
|
||
I took the time to report the VAAPI connection bug
Comment 33•2 years ago
|
||
bugherder |
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Reporter | ||
Comment 34•2 years ago
|
||
ls /dev/dri/
by-path card0 card1 renderD128
[doop@hostname firefox]$ ls /dev/dri/by-path/
platform-display-subsystem-card platform-ff9a0000.gpu-card platform-ff9a0000.gpu-render
Reporter | ||
Comment 35•2 years ago
|
||
tree /dev/dri/
/dev/dri/
├── by-path
│ ├── platform-display-subsystem-card -> ../card0
│ ├── platform-ff9a0000.gpu-card -> ../card1
│ └── platform-ff9a0000.gpu-render -> ../renderD128
├── card0
├── card1
└── renderD128
Assignee | ||
Comment 36•2 years ago
|
||
monkeyboyted: thanks for that info, however there's no need for it any more :)
Description
•