Page 1 of 1

How to enable HW Encoder CEDAR in Nanopi Neo Core???

Posted: Wed Jun 01, 2022 2:54 am
by wolverin
hello.

My board Nanopi Neo CORE

Code: Select all

# uname -a
Linux NanoPi-NEO-Core 4.14.111 #126 SMP Mon Feb 22 17:04:18 CST 2021 armv7l armv7l armv7l GNU/Linux


I compiled and installed ffmpeg with Cedrus H264 and cedar_ve.ko
After that I see

Code: Select all

# dmesg | grep cedar
[    4.982170] cedar_ve: loading out-of-tree module taints kernel.
[    4.988972] sunxi cedar version 0.1


I'm trying to edit and compile /boot/sun8i-h3-nanopi-neo-core.dts using https://github.com/uboborov/sunxi-cedar-mainline/blob/master/5.7/sun8i-h3-nanopi-neo-air.dts

First I change before soc

Code: Select all

        reserved-memory {
                #address-cells = <0x01>;
                #size-cells = <0x01>;
                ranges;

                cma@43c00000 {
                        compatible = "shared-dma-pool";
                        reusable;
                        reg = < 0x57c00000 0x6000000 >;
                        linux,cma-default;
                        phandle = < 0x84 >;
                };
        };


and change in soc

Code: Select all

                video-engine@01c0e000 {
                        compatible = "allwinner,sunxi-cedar-ve";
                        reg = < 0x1c0e000 0x1000 0x1c00000 0x10 0x1c20000 0x800 >;
                        memory-region = < 0x84 >;
                        syscon = < 0x15 >;
                        clocks = < 0x03 0x29 0x03 0x6c 0x03 0x61 >;
                        clock-names = "ahb", "mod", "ram";
                        resets = < 0x03 0x1a >;
                        interrupts = < 0x00 0x3a 0x04 >;
                        status = "okay";
                };


after that I get

Code: Select all

# dmesg | grep cedar
[    4.944911] cedar_ve: loading out-of-tree module taints kernel.
[    4.951697] sunxi cedar version 0.1
[    4.955629] [cedar]: install start!!!
[    4.959521] cedar_ve: cedar-ve the get irq is 55
[    4.964193] sunxi-cedar 1c0e000.video-engine: assigned reserved memory node cma@43c00000
[    4.972512] sunxi-cedar 1c0e000.video-engine: syscon failed...
[    4.998164] sunxi-cedar 1c0e000.video-engine: failed to get ahb clock


then I change and the board is no longer loaded

Code: Select all

                syscon@1c00000 {
                        compatible = "allwinner,sun8i-h3-system-controller", "syscon";
                        reg = < 0x1c00000 0x1000 >;
                        #address-cells = < 0x01 >;
                        #size-cells = < 0x01 >;
                        ranges;

                        sram@1d00000 {
                            compatible = "mmio-sram";
                            reg = < 0x1d00000 0x80000 >;
                            #address-cells = < 0x01 >;
                            #size-cells = < 0x01 >;
                            ranges = < 0x00 0x1d00000 0x80000 >;

                            sram-section@0 {
                                compatible = "allwinner,sun8i-h3-sram-c1", "allwinner,sun4i-a10-sram-c1";
                                reg = < 0x00 0x80000 >;
                            };
                        };
                };

Re: How to enable HW Encoder CEDAR in Nanopi Neo Core???

Posted: Mon Jun 12, 2023 8:10 pm
by alexlans
Hello!
Do you make this?
What repo do you use for the cedrus?
I have used 3.4 kernel with update ubuntu 16 to ubuntu 18 and then to ubuntu 20.
Cedar is working. But very interesting your wey.