I don't exactly understand the deeper meaning of your post, but I do cross compile and I am not building kernels on the test machine. But the issue is clear v4l2m2m is currently not supported for meson8, maybe Martin will look into that in future.
Posts by stevie101
-
-
chewitt, does not seem to work, but was worth a try:
added to meson8.dtsi:
vdec: video-codec@c8820000 {
compatible = "amlogic,gxbb-vdec", "amlogic,gx-vdec", "amlogic,meson8-vdec";
reg = <0x0 0xc8820000 0x0 0x10000>,
<0x0 0xc110a580 0x0 0xe4>;
reg-names = "dos", "esparser";interrupts = <GIC_SPI 44 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 32 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "vdec", "esparser";
amlogic,canvas = <&canvas>;
};dmesg:
[ 4.862672] meson_vdec: module is from the staging directory, the quality is unknown, you have been warned.
[ 4.864183] meson-vdec c8100000.video-codec: can't request region for resource [mem 0xc8100000-0x9091ffff]
[ 4.864209] meson-vdec c8100000.video-codec: probe with driver meson-vdec failed with error -16This is for somebody with knowledge, I am just fiddling around
BR
-
chewitt, wow very useful info.
Your first assumptions are all correct.
1. issue missing v4l2 drivers for meson in kernel --> recompiled
2. meson_vdec loaded, but there is no device
meson_vdec: module is from the staging directory, the quality is unknown, you have been warned.
LibreELEC:/dev # v4l2-ctl --all
Cannot open device /dev/video0, exiting.amlogic-canvas c8006020.video-lut: Endianness is not supported on this SoC --> repeating with "direct plane"
Raining all day here, so I will check the device tree and see if I can do some copy paste, as you suggested.
Thanks again.
-
chewitt, thanks for the clarification. It is really confusing nowadays with graphic drivers on socs :-). Interestingly ffmpeg-v4lrequest drops the cpu load and makes 1080p videos watchable (around 20fps). Yes, concerning firmware, I did expect a load request for meson_vdec, but there is nothing visible in dmesg.
If anyone is interested, here are the files for chewitt's 10.85/10.88 release booting into kodi. Replace files on fat partition. Working here with tronsmart-s82.dtb. No video acceleration !
DownloadA file is available for download and streaming via UploadNow by following this linkuploadnow.io -
I guess you misunderstood, 6.9 rc6 is compiled including the patches. This kernel, including a modified initrd, has been applied to a bookworm image. The image is booting fine, GBM is working. From I understand you have done exactly the same with an existing Armbian image.
So the question is what is necessary to get video acceleration ? I am currently trying with mpv and ffmpeg-v4l2request, like
-vo=gpu --gpu-context=drm --drm-draw-plane=overlay --drm-drmprime-video-plane=primary
which gives me
[vo/gpu] VT_GETMODE failed: Inappropriate ioctl for device
[vo/gpu/opengl] Failed to set up VT switcher. Terminal switching will be unavailable.
[vo/gpu] No suitable format found on draw plane (tried: GBM_FORMAT_ARGB8888 and GBM_FORMAT_XRGB8888).
[vo/gpu-next] Can't handle VT release - signal already used
[vo/gpu-next/opengl] Failed to set up VT switcher. Terminal switching will be unavailable.
[vo/gpu-next] No suitable format found on draw plane (tried: GBM_FORMAT_ARGB8888 and GBM_FORMAT_XRGB8888).Therefore my question, do you working video acceleration for h264 ?
-
Synerworks, thanks, I did try the provided "patch.zip" on plane 6.9-rc6. Kodi is running on 10.88 Libreelec provided by Chewitt and on hexdump0815's bookworm debian image. The main problem is that I get not video acceleration - ok on debian this is expected, but the Libreelec image....
It is offering "drm prime" acceleration, on "direct plane" no picture just distortions, with "EGL" a video with some strange pixel but no video acceleration, cpu load with h264 1920x1080 --> 340%. Do you have video acceleration working ?
BR
-
Martin seems to be MIA at the moment so the best I can suggest is self-building using my AMLMX branch but with the Linux package update to use his latest kernel source (Linux 6.3 IIRC) to see if anything changed.
I did already, cross compiled his version of 6.3 with the config from your kernel version 6.2 and modified your image file with kernel 6.3. It does boot, but the issue is the same. I also believe the frequency issue is not the root cause. I adjusted the dtbs file to use a fixed frequency and ignore the opp table - the error message is gone but still the same issue with kodi.
Next I have tried Armbian with kernel 5.14 to get a bit more control. Xorg refuses to start since no permission to /dev/dri/dri0. Probably something with the driver itself. So it seems there is no access to the Mali 450 device. Strange that it works on S805, I didn't expect it be so much different than the S802.
Br,
-
I have tried your image (LibreELEC-AMLMX.arm-10.88.0-box.img) on my old probox x2 (S802) since Kodi 18.9 is getting more and more outdated, unfortunately.
Following status:
it does boot with meson8-tronsmart-s82.dtb. boot screen logo was yellow or green but I guess this is not relevant for now. Kodi is permanently restarting:
Code
Display More############# kodi CRASH LOG ############### ################ SYSTEM INFO ################ Date: Fri Sep 15 08:57:42 UTC 2023 kodi Options: --standalone -fs Arch: armv7l Kernel: Linux 6.2.0-rc1 #1 SMP Wed Jan 11 05:20:55 UTC 2023 Release: LibreELEC 10.88.0 ############## END SYSTEM INFO ############## ############### STACK TRACE ################# =====> Core file: /storage/.cache/cores/core.!usr!lib!kodi!kodi.bin.1694768245.889 ========================================= [New LWP 889] [New LWP 890] [New LWP 892] [New LWP 893] [New LWP 894] [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". Core was generated by `/usr/lib/kodi/kodi.bin --standalone -fs'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x010a3d44 in KODI::WINDOWING::GBM::CDRMUtils::FindPlanes() () [Current thread is 1 (Thread 0xb2bd3900 (LWP 889))] Thread 5 (Thread 0xacdff280 (LWP 894)): #0 0xb4645ed8 in epoll_wait () from /usr/lib/libc.so.6 #1 0x00576d40 in CLibInputHandler::Process() () #2 0x0085e150 in CThread::Action() () #3 0x010de448 in ?? () #4 0x00858d58 in ?? () #5 0xb443dd24 in ?? () from /usr/lib/libstdc++.so.6 #6 0xb45d3070 in ?? () from /usr/lib/libc.so.6 Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 4 (Thread 0xad7ff280 (LWP 893)): #0 0xb46333c8 in read () from /usr/lib/libc.so.6 #1 0xb6da497c in lirc_nextcode () from /usr/lib/liblirc_client.so.0 #2 0x00552810 in CLirc::Process() () #3 0x0085e150 in CThread::Action() () #4 0x010de448 in ?? () #5 0x00858d58 in ?? () #6 0xb443dd24 in ?? () from /usr/lib/libstdc++.so.6 #7 0xb45d3070 in ?? () from /usr/lib/libc.so.6 Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 3 (Thread 0xae1ff280 (LWP 892)): #0 0xb46399c0 in poll () from /usr/lib/libc.so.6 #1 0xb6b23838 in ?? () from /usr/lib/libpulse.so.0 Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 2 (Thread 0xb2bd0280 (LWP 890)): #0 0xb45cf740 in ?? () from /usr/lib/libc.so.6 #1 0xb45d26f4 in pthread_cond_wait () from /usr/lib/libc.so.6 #2 0x0085d58c in ?? () #3 0x00f77cec in ANNOUNCEMENT::CAnnouncementManager::Process() () #4 0x0085e150 in CThread::Action() () #5 0x010de448 in ?? () #6 0x00858d58 in ?? () #7 0xb443dd24 in ?? () from /usr/lib/libstdc++.so.6 #8 0xb45d3070 in ?? () from /usr/lib/libc.so.6 Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 1 (Thread 0xb2bd3900 (LWP 889)): #0 0x010a3d44 in KODI::WINDOWING::GBM::CDRMUtils::FindPlanes() () #1 0x010b21b8 in KODI::WINDOWING::GBM::CDRMUtils::InitDrm() () #2 0x010b272c in KODI::WINDOWING::GBM::CDRMAtomic::InitDrm() () #3 0x010aafc8 in KODI::WINDOWING::GBM::CWinSystemGbm::InitWindowSystem() () #4 0x010b58b4 in KODI::WINDOWING::GBM::CWinSystemGbmEGLContext::InitWindowSystemEGL(int, int) () #5 0x010b5bc4 in KODI::WINDOWING::GBM::CWinSystemGbmGLESContext::InitWindowSystem() () #6 0x00a09e24 in CApplication::CreateGUI() () #7 0x008985c0 in XBMC_Run () #8 0x002e52f8 in main () ############# END STACK TRACE ###############
So I have stopped it at boot via autostart.sh.
I believe the root is cause is an issue with the drm kernel driver not being able to set the frequency:
Code
Display More2553.470380] lima d00c0000.gpu: gp - mali450 version major 0 minor 0 [ 2553.470440] lima d00c0000.gpu: pp0 - mali450 version major 0 minor 0 [ 2553.470486] lima d00c0000.gpu: pp1 - mali450 version major 0 minor 0 [ 2553.470530] lima d00c0000.gpu: pp2 - mali450 version major 0 minor 0 [ 2553.470580] lima d00c0000.gpu: pp4 - mali450 version major 0 minor 0 [ 2553.470625] lima d00c0000.gpu: pp5 - mali450 version major 0 minor 0 [ 2553.470669] lima d00c0000.gpu: pp6 - mali450 version major 0 minor 0 [ 2553.470691] lima d00c0000.gpu: l2 cache 8K, 4-way, 64byte cache line, 128bit external bus [ 2553.470703] lima d00c0000.gpu: l2 cache 128K, 4-way, 64byte cache line, 128bit external bus [ 2553.470714] lima d00c0000.gpu: l2 cache 128K, 4-way, 64byte cache line, 128bit external bus [ 2553.471021] lima d00c0000.gpu: bus rate = 141666667 [ 2553.471034] lima d00c0000.gpu: mod rate = 318750000 [ 2553.473924] [drm] Initialized lima 1.1.0 20191231 for d00c0000.gpu on minor 1 [ 2553.528922] lima d00c0000.gpu: _opp_config_clk_single: failed to set clock rate: -16 [ 2553.528960] devfreq d00c0000.gpu: dvfs failed with (-16) error [ 2553.588735] lima d00c0000.gpu: _opp_config_clk_single: failed to set clock rate: -16 [ 2553.588751] devfreq d00c0000.gpu: dvfs failed with (-16) error [ 2553.648728] lima d00c0000.gpu: _opp_config_clk_single: failed to set clock rate: -16 [ 2553.648742] devfreq d00c0000.gpu: dvfs failed with (-16) error [ 2553.708751] lima d00c0000.gpu: _opp_config_clk_single: failed to set clock rate: -16 [ 2553.708767] devfreq d00c0000.gpu: dvfs failed with (-16) error
Perhaps something wrong within the dtbs, not sure.
Other than that, lan is working, bluetooth might be - quite amazing to see kernel 6.2.0-rc1 booting on this old device.
br,