Jump to content

Ryzer

Members
  • Posts

    55
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Right will give it another go. Turns out adjusting the CMA is not straightforward in the case of the A10 or A20. The Video Engine can only access the first 256mb of memory, which is addressed via a DMA pool in the respective dtsi files. Anything higher than the default 96mb causes it become dissociated from the DMA pool. i suspect that's what lead to my earlier crashes.
  2. Just to add if I try skipping forward it trips up and goes back to software decoding. Tried adjusting CMA buffers (128mb) but this just leads to the system crashing. [lavf] queuing seek to 243.633333 [lavf] execute seek (to 243.633333 flags 4) [lavf] seek done [file] stream level seek from 32352085 to 32875635 [vd] Pixel formats supported by decoder: vdpau vaapi drm_prime yuv420p [vd] Codec profile: Main (0x4d) [vd] Requesting pixfmt 'drm_prime' from decoder. [ffmpeg/video] h264: v4l2_request_try_format: pixelformat 842094158 not supported for type 1 [ffmpeg/video] h264: v4l2_request_buffer_alloc: create buffers failed for type 1, Cannot allocate memory (12) [ffmpeg/video] h264: Failed setup for format drm_prime: hwaccel initialisation returned error. [vd] Pixel formats supported by decoder: vdpau vaapi yuv420p yuv420p [vd] Codec profile: Main (0x4d) [vd] Requesting pixfmt 'yuv420p' from decoder. [statusline] (Paused) V: 00:04:03 / 01:24:45 (5%) [osd/libass] libass API version: 0x1701000 [osd/libass] libass source: tarball: 0.17.1 [vd] Falling back to software decoding. [vd] Detected 2 logical cores.
  3. Hi @Nick A The problem appears to be at my end, anyway managed to download the ffmpeg-vl42-request debs in the end and will be testing shortly. Thanks for the patches, I only had a slight hiccup when trying to integrate 2 of them. I found that patch 556 no longer appears to be necessary as those changes already appear to be implemented within my current Armbian build fork. The A10 and A20 use the Mali 400 so I have also borrowed patch 125. Good to here the CMA no longer need to be adjusted. Latest build has completed successfully. MPV is using ffmpeg-request. Now it seems to use hardware decoding. That is the good news at least. The bad news is that it is an incomprehensive grid of sqaures. At the beginning I still get this line: [vo/gpu] VT_GETMODE failed: Inappropriate ioctl for device. Thanks Ryzer
  4. Hi Nick, Thanks for the suggestion, after doing a bit more research it does seem like v4l2-request is better suited. I did attempt following jocks instructions but I could not add the apt repo as it yielded a network unreachable error. AS a work around I will try with Kwiboo's instead: https://github.com/Kwiboo/FFmpeg as this also has v4l2-request support. Thanks for providing the patches, I am interested to see how they will preform on the A10, I will be sure to implement them next time I get round to a system build. Once I get a positive indication that hardware acceleration is working I will trying increasing the CMA size but I may need to change screens. My current system only has a cma of 96MB, in the past I found if I set it too high it will stop displaying at all on my 4K monitor. @jwalds I dont believe so, I have yet to find a patch that adds encoding to the cedrus driver. A possible start point would be here: https://github.com/bootlin/linux/tree/cedrus/h264-encoding as it looks like some work has at least started. just to add testing with MPV did not exactly yield great results, the image seems to bounce up and down for a few seconds then freezes as the system appears to crash Thanks Ryzer
  5. Hi Jwalds, Looking back I just realised that you are still using kernel-6.1, which is now considered "legacy" and no longer as actively supported. You are likely to have better chance of success with an image built around at least kernel 6.6 which has a more developed version of the cedrus driver. To clarify a further more the cedrus driver is exposed via the v4l framework so this is what ffmpeg has to be built with support for. Now I managed to successful build ffmpeg on my own board, a Pcduino2 (A10) which admittedly is much older than H616 but shares the same cedrus driver and some of the same codecs. In my case I found that ffmpeg failed when attempting hardware decoding. Looking into the debug output, ffmpeg was detecting the cedrus driver but apparently running into somekind of formatting issue. I don't know of it is caused by the demo clip I was using or an underlying issue in the driver. best of luck Ryzer
  6. Hi All, Good to hear that the cedrus driver appears to be initialized correctly. It has been a while since I last tried hardware accelerated playback and unfortunately did not have much success. From what I remember from another topic is that in order to utilize the cedrus, ffmpeg has to be compiled with v4l2m2m (--enable-v4l2-m2m) support in place. From what I can tell this is not set in the system packaged version of ffmpeg. Hope this helps Ryzer
  7. Hi Jwalds, From what I can tell looking at the sun50i-h618-orangepi-zero2w.dts it gets it's definitions from the sun50i-h616.dtsi so it's a start but support would also need to be added to the cedrus driver to appropriately support the H616 SOC. Now I did notice this patch: https://github.com/armbian/build/blob/main/patch/kernel/archive/sunxi-6.13/patches.armbian/drv-staging-media-sunxi-cedrus-add-H616-variant.patch however I do not know if this will actually work. If you look at the kernel configuration file you need to ensure that the cedrus module is set. Best of luck Ryzer
  8. HI David, Probably the easiest way to it. I can confirm by my Pcduino3 that Hdmi at least works although only with current (tested with 6.6.75) for the moment. I found that while the components are correctly enabled in edge (tested with 6.12.9) hdmi fails due to some a fault with the "hdmi-connector" component of the drm driver. all the best Ryzer
  9. Hi Jwalds, It's definitely possible as there is Hardware support for it however the software support does not currently exist within the current Cedrus driver. To the best of my knowledge there is currently no mainline video encoding support for any Allwinner SOC. There are problem some efforts to get it working though, one such is: https://bootlin.com/blog/open-source-linux-kernel-support-for-the-allwinner-v3-v3s-s3-h-264-video-encoder/ while target at the V3 it should set the groundwork for getting encoding supported on other Allwinner SOCs. If there is already some form of decoding support then there should already be the video engine / video codec engine node within the main H616 dts. While I prefer overlays there are certain limits meaning it has to been integrated into the main dts rather than via an overlay. Found this out recently myself when exploring G2D hardware block present in some Allwinner SOCs. Best of luck Ryzer
  10. Hi Kopia, I have recently been try to build modules myself and ran into the same issue. Since I am still learning I thought I messed up somewhere but found that even when trying a simple module resulted in the kind of error. I tried the simplest module available by Johannes4linux: https://github.com/Johannes4Linux/Linux_Driver_Tutorial/tree/main/01_hello I currently have a Pcduino2 (Allwinner A10) running 6.12.9-edge-sunxi, which at first sight appears to load the module correctly but when lsmod is called I then experience a segfault. If I try lsmod before loading the simple hello module then lsmod works as expected. Before load hello module: ryan@pcduino2-1:~$ lsmod Module Size Used by aes_arm_bs 20480 2 crypto_simd 12288 1 aes_arm_bs aes_arm 12288 3 aes_arm_bs ccm 16384 6 sunrpc 360448 1 rtl8xxxu 167936 0 mac80211 667648 1 rtl8xxxu cfg80211 618496 2 mac80211,rtl8xxxu axp20x_adc 16384 0 sun4i_gpadc_iio 12288 0 industrialio 61440 2 sun4i_gpadc_iio,axp20x_adc rfkill 20480 3 cfg80211 sun4i_ts 12288 0 libarc4 12288 1 mac80211 sunxi_cedrus 40960 0 v4l2_mem2mem 16384 1 sunxi_cedrus videobuf2_dma_contig 16384 1 sunxi_cedrus videobuf2_memops 16384 1 videobuf2_dma_contig videobuf2_v4l2 16384 2 sunxi_cedrus,v4l2_mem2mem videobuf2_common 45056 5 sunxi_cedrus,videobuf2_dma_contig,videobuf2_memops,v4l2_mem2mem,videobuf2_v4l2 videodev 188416 3 sunxi_cedrus,v4l2_mem2mem,videobuf2_v4l2 mc 36864 5 sunxi_cedrus,videobuf2_common,videodev,v4l2_mem2mem,videobuf2_v4l2 cpufreq_dt 16384 0 joydev 20480 0 input_leds 12288 0 evdev 16384 4 zram 24576 2 uio_pdrv_genirq 16384 0 uio 16384 1 uio_pdrv_genirq binfmt_misc 20480 1 dm_mod 98304 0 ip_tables 20480 0 x_tables 24576 1 ip_tables autofs4 36864 2 pinctrl_axp209 12288 0 lima 49152 0 gpu_sched 36864 1 lima sun4i_gpadc 12288 0 drm_shmem_helper 16384 1 lima sunxi 12288 0 phy_generic 16384 2 sunxi display_connector 16384 0 gpio_keys 16384 0 icplus 12288 1 With hello module loaded: ryan@pcduino2-1:~/exp-drivers/hello$ sudo dmesg | tail -n 5 [ 43.471780] wlx08d8330401aa: RX AssocResp from c0:c9:e3:3b:8b:9e (capab=0x1431 status=0 aid=3) [ 43.490077] usb 1-1: rtl8xxxu_bss_info_changed: HT supported [ 43.740960] wlx08d8330401aa: associated [ 2938.378205] hello: loading out-of-tree module taints kernel. [ 2938.380171] hello - Hello, Kernel! if I try to remove the module, this does not work: rmmod: ERROR: ../libkmod/libkmod-module.c:856 kmod_module_remove_module() could not remove 'hello': Resource temporarily unavailable rmmod: ERROR: could not remove module hello: Resource temporarily unavailable when calling lsmod: Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.135358] Internal error: Oops: 5 [#1] SMP THUMB2 Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.535871] Process lsmod (pid: 1697, stack limit = 0xa7033696) Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.548141] Stack: (0xf0cfde00 to 0xf0cfe000) Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.558824] de00: c1705770 00000000 00000000 ffffffff c3f07000 7cfe460c 67cf1b22 7cfe460c Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.573450] de20: 00000400 c4169a50 00000000 bf9ea044 c4169a68 f0cfdeb0 bf9ea044 c030d02f Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.588095] de40: 00000000 00000000 f0cfde98 c4169a78 00000001 c98f7800 2e8f6000 c3898000 Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.602746] de60: c4169fa0 00000000 f0cfdf80 c44e03c0 00000000 00000400 00000001 c0c21784 Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.617464] de80: c0355e81 c030d37d 00000400 00000001 01cc6c68 00000400 00000001 00000000 Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.632093] dea0: f0cfde90 00000400 00000001 00000000 c44e03c0 00000000 00000000 00000000 Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.646728] dec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000400 7cfe460c Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.661312] dee0: 00000400 c44e03c0 c387a800 01cc6c68 f0cfdf80 c02e97b5 00001a55 c392c070 Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.675981] df00: c392c070 00000000 00000000 00000000 ffefe31c ef2d9880 00000000 7cfe460c Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.690649] df20: b6ec9fff f0cfdfb0 01cc706c 00000817 c387a800 00000255 c3898000 c0b0abff Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.705276] df40: 00000000 c0b0abff 00000000 00000000 00000000 7cfe460c 00000000 c44e03c0 Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.719907] df60: c44e03c0 00000000 00000000 c01002a0 c387a800 00000003 00000000 c02e9fe9 Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.734568] df80: 00000000 00000000 c01002a0 7cfe460c bef1f000 01cc52e0 000005e8 b6c15888 Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.749269] dfa0: 00000003 c0100061 01cc52e0 000005e8 00000003 01cc6c68 00000400 00000001 Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.763901] dfc0: 01cc52e0 000005e8 b6c15888 00000003 0000000a bef1f2b4 00000000 00000000 Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.778638] dfe0: 00000003 bef1f1e0 b6bb037b b6b29656 40070030 00000003 00000000 00000000 Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.793339] Call trace: Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.793356] m_show from seq_read_iter+0xd3/0x37c Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.813529] seq_read_iter from seq_read+0xa5/0xcc Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.824806] seq_read from vfs_read+0x79/0x21c Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.835638] vfs_read from ksys_read+0x45/0x9c Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.846407] ksys_read from ret_fast_syscall+0x1/0x5c Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.857833] Exception stack(0xf0cfdfa8 to 0xf0cfdff0) Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.869272] dfa0: 01cc52e0 000005e8 00000003 01cc6c68 00000400 00000001 Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.883870] dfc0: 01cc52e0 000005e8 b6c15888 00000003 0000000a bef1f2b4 00000000 00000000 Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.898449] dfe0: 00000003 bef1f1e0 b6bb037b b6b29656 Message from syslogd@pcduino2-1 at Mar 10 17:14:04 ... kernel:[ 3254.909859] Code: f240 1850 f2cc 08ea (6922) 4641 Segmentation fault I know this is edge kernel so it is likely to have issues but when I also tried this on my Pcduino3 (Allwinner A20) running 6.6.75-current-sunxi, it then had a segmentation fault straight away.
  11. Hi MastinZgZ, You would need to make sure the overlay has a pin control node to set PA5 to PWM function. Given this is most likely used for serial console as it is UART0, you should ideally route console output to another Serial port if available. When set up correctly you should be able to configure PWM output via /sys/class/pwm/pwmchip0. Then pin first has to be exported before it can be used and you also have to be in super user mode to configure the behavior. Hope this helps Ryzer
  12. @robertoj In terms of the actual TV encoder itself not significantly different, the same TV encoder driver is used for the H3. It just parses a different compatibility string to address any differences. If it still works on a device like the Orange Pi Zero then that is strong indicator that it is likely to work on the Banana Pi M1 Another thing to be mindful of is that the TV encoder is only part of the Display Engine. The A10 and A20 (which is the SOC on the Banana Pi M1) both have the 1st generation Display Engine where as the H3 is based on the 2nd generation.
  13. Hi David, Can you check that sun4i-a10-tv-encoder module is present with lsmod? If it is then you will probably need to edit the device tree to include the TV display nodes, the bindings can be found here: https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tv-encoder.yaml?h=v6.12.17 If not you can try to build the module if you have headers installed. Unfortunately I don't know the status of tv output support so there is a possibility even carrying out each of these steps that it may not. Best of luck Ryzer
  14. Hi jimw, Glad you have made progress. Its interesting that you got such a quick setup by amending the boot.cmd file, I will need to try that approuch myself for my other issues. I havent previously had reason to touch the boot.scr. Either I missed remember the last parameter or it may have changed, reviewing the binding it should be 'default-state = "on"; '. I mostly just watch youtube such as: Bootlin also provide a lot of good resources: https://bootlin.com/pub/conferences/2021/webinar/petazzoni-device-tree-101/petazzoni-device-tree-101.pdf Hope this help Ryzer
  15. Hi jimw, You are currently addressing the pin controller twice as it performs both pin control and gpio control operations. Try something like this which should work. The led node should make it visible in '/sys/class/leds' /dts-v1/; /plugin/; /{ compatible = "allwinner,sun7i-a20"; fragment@0 { target = <&pio>; __overlay__{ my_led_pin: my_led_pin { pins ="PH0"; function = "gpio_out"; }; }; }; fragment@1 { target-path = "/"; __overlay__ { leds: leds@0 { compatible = "gpio-leds"; pinctrl-names = "default"; pinctrl-0 = <&my_led_pin>; status = "okay"; led: led { label = "my_led"; gpios = <&pio 7 0 0>; default-on; }; }; }; }; }; note the pinctrl control reference '&pio' always take 3 arguments the first is the number of the port which starts with A=0 and goes to I=8. The second is the pin on that particular port and finally the pin state which can either be active high = 0 or active low = 1.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines