-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Chromium (hardware accelerated) video playing performance improvement and regression #5475
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
Comments
Can you describe how you measured the improvement, and then the degredation? |
With your command line on a Pi 400 running the latest kernel, I'm seeing no unexpected swiotlb activity (the obvious cause of slowdown when changing DMA masks).
|
Here is the video file I have used https://we.tl/t-0GTGqQ4yXr |
I'm using vc4-kms-v3d overlay. These are my chromium messages (when is loaded rpi-update e5f7c2648572b7acbc4fbc0e654281ea2d2e94bb): [2830:2830:0519/164347.591162:ERROR:chrome_browser_cloud_management_controller.cc(162)] Cloud management controller initialization aborted as CBCM is not enabled. |
Without the "Set a 1GB ZONE_DMA limit" commit, i.e. what you get after an rpi-update to raspberrypi/rpi-firmware@8cad204, I get a kernel warning and an error from the codec:
|
Yes I get the same message playing video on Chromium, anyway after that commit the video performance doesn't degradate [ 105.688083] bcm2835-codec bcm2835-codec: dma alloc of size 4096 failed These all DMA messages: [ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool |
I suspect that results in the hardware codec not working and falling back to software decode. I think you are saying that performance is better with software than hardware. Assuming this is the case then this is better reported here. |
Yes you're right, it was falling back to software decode I see the CPU usage. So there is no issue, and also for chromium browser, because with the last rpi firmware update ( 38d69e35292e129700ef50443c3ecc37e4124d91 ), hardware decoding on Chromium browser works again. |
Describe the bug
I noticed that the work done for mapping CPU physical addresses and DMA addresses (included in rpi-update e5f7c2648572b7acbc4fbc0e654281ea2d2e94bb) has improved h264 video playing performance (fps) through chromium browser using hardware acceleration. Thank you for that!
This is the setup:
Chromium-browser 113.0.5672.95-rpt1 on raspios bullseye 64 bit 6.1.28.
Raspberry CM4 (4GB RAM)
From rpi-update 38d69e35292e129700ef50443c3ecc37e4124d91, setting a 1GB ZONE_DMA limit (raspberrypi/linux commit e158dcb), there is otherwise a regression on video playing performance (fps) with same previous setup.
Steps to reproduce the behaviour
Play a local h264 video file 1080p 60fps with fullscreen chromium (just on HDMI1 FHD 1920x1080@60Hz, with HDMI2 off) .
This the string to launch chromium-browser:
chromium-browser --ignore-gpu-blocklist --use-gl=egl --enable-gpu-rasterization --enable-accelerated-video-decode --enable-features=VaapiVideoDecoder --enable-zero-copy --start-fullscreen
Device (s)
Raspberry Pi CM4
System
IMPROVEMENT:
pi@raspberrypi:~ $ cat /etc/rpi-issue
Raspberry Pi reference 2023-05-03
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 7c750947a959fb626a70c09fd17c65815df192ac, stage4
pi@raspberrypi:~ $ vcgencmd version
Apr 25 2023 18:26:03
Copyright (c) 2012 Broadcom
version d7f9c2b4ef7e4a8c0b04374a879ce89d7a948453 (clean) (release) (start)
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 6.1.28-v8+ #1649 SMP PREEMPT Fri May 12 14:25:37 BST 2023 aarch64 GNU/Linux
REGRESSION:
pi@raspberrypi:~ $ cat /etc/rpi-issue
Raspberry Pi reference 2023-05-03
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 7c750947a959fb626a70c09fd17c65815df192ac, stage4
pi@raspberrypi:~ $ vcgencmd version
Apr 25 2023 18:26:03
Copyright (c) 2012 Broadcom
version d7f9c2b4ef7e4a8c0b04374a879ce89d7a948453 (clean) (release) (start)
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 6.1.28-v8+ #1651 SMP PREEMPT Wed May 17 14:34:39 BST 2023 aarch64 GNU/Linux
Logs
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: