-
Notifications
You must be signed in to change notification settings - Fork 29
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
chromium v121 can't use egl to render video output #18
Comments
it works well with the BSP kernel and packages. but that doesn't looks like related to this issue, which could due to the difference between panfork and mali DDK(no vulkan, just EGL). the mali should support importing NV12 texture directly, maybe you can try to add logs in:
|
wait, SCANOUT usage is invalid for egl image factory, so guessing it should use: so the OzoneImageBackingFactory::IsSupported returns false, and we need to check into it, please add logs there to find which line returns false. |
Which ozone platform do you use? The above logs are running under ozone platform x11.
|
It's here that returning false: https://github.com/chromium/chromium/blob/121.0.6167.212/gpu/command_buffer/service/shared_image/ozone_image_backing_factory.cc#L296 |
|
After adding the patch from https://gitlab.freedesktop.org/mesa/mesa/-/issues/7745, I can play video with rkmpp now. But frame rate is extramely low, especially for av1 videos, only 4 FPS. And cpu usage is high compared with v114. |
only av1? how about other video formats? what pixel format did it output?(nv16?) guessing another renderer issue due to mesa and chromium(triggered software conversion) |
The av1 video is outputing NV12. |
AV1 video is here: bilibili-av1-test.mp4H264 video is from: https://mirrors.tuna.tsinghua.edu.cn/blender/demo/movies/BBB/bbb_sunflower_1080p_60fps_normal.mp4.zip |
both of them works well on my rk3588 evb with mali DDK, guessing something wrong with the rendering flow with mesa3d. so the nv12 dmabuf import and rendering works with old chromium(imported in V4L2VDA)+mesa3d, but failed with new chromium(likely in ui/ozone/common/native_pixmap_egl_binding.cc)+mesa3d can you add logs in that file's InitializeFromNativePixmap() to confirm? |
Here is the patch I add: https://paste.armbian.com/iciwoyufux
|
did it create valid eglimage(not null)? if not, try to get error info from eglGetError |
If eglimage is null, |
the dmabuf to eglimage should be zero-copy, then it will be attached to ecternal texture, which is zero-copy too, then it will be rendered to surfaces by gpu. |
Maybe it's the issue of panfork driver. Since panfork is not under good maintaince, I will toggle mainline panthor driver later. But mesa v24.1 does not support NV12 mapping like v23, I have to wait upstream solving this issue. |
I managed to make mainline panthor gpu driver running with 6.1 rkr1 kernel: armbian/linux-rockchip#171.
When the same mesa userspace panfrost driver runs with mainline kernel, mainline chromium can use v4l2 stateless decoding without crash. |
Finally I made it work with mainline panthor driver. I don't know why it didn't work before, and I can't reproduce the issue above.
|
I am running kernel 6.1.43 and gpu driver is panfork(mesa userspace driver and kernel arm mali driver)
Run chromium v121 with patches from meta-rockchip:
Here is log from
~/.config/chromium/chrome_debug.log
:https://paste.armbian.com/kafubisuwi
We can see:
EGL rendering related code should be at
media/gpu/v4l2/legacy
and I don't know if we can use that since google has dropped it.I think this line of patch makes chromium know it can render NV12 without color space conversion, but in fact it can't.
I also meet the same issue when testing mainline kernel v4l2 stateless decoding with the patch line above. Without that patch chromium can make use of libyuvimageprocessor to convert
NV12
toAR24
.The text was updated successfully, but these errors were encountered: