cedar_ve driver not able to allocate memory
#1
Hello

I have been trying to make use of the h264 encoder by obtaining the source code for the cedar_ve driver from here:

https://github.com/uboborov/sunxi-cedar-mainline

I have successfully built the driver, but when I try and load it the driver fails with the error in the kernel log:

Quote:[  110.831285] sunxi-cedar 1c0e000.video-engine: could not assign reserved memory, ret: -22


I have checked the device tree to ensure that it is consistent with the sources in the above git repository.

I'm not sure why the driver is not able to allocate the needed memory. I have tried setting the CMA pool both from the boot parameters by adding:

Quote:setenv bootargs "${bootargs} cma=60M"
to boot.cmd and rebuilding before rebooting.


I have also tried adding this to my device tree:
Code:
    reserved-memory {
                #address-cells = <1>;
                #size-cells = <1>;
                ranges;

                /* Address must be kept in the lower 256 MiBs of DRAM for VE. */
                cma_pool: cma@44000000 {
                compatible = "shared-dma-pool";
                size = <0x6000000>;
                alloc-ranges = <0x4a000000 0x6000000>;
                reusable;
                linux,cma-default;
            };
        };

I updated the video engine entry in the deivce tree to that it referenced the cma_pool entry:

Code:
        ve: video-engine@01c0e000 {
                        compatible = "allwinner,sunxi-cedar-ve";
                        reg = <0x01c0e000 0x1000>,
                                <0x01c00000 0x10>,
                                <0x01c20000 0x800>;
                        memory-region = <&cedar_buf>;
                        syscon = <&syscon>;
                        clocks = <&ccu CLK_BUS_VE>, <&ccu CLK_VE>,
                                <&ccu CLK_DRAM_VE>;
                        clock-names = "ahb", "mod", "ram";
                        resets = <&ccu RST_BUS_VE>;
                        interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
                        allwinner,sram = <&ve_sram 1>;
                };
But I still get the same error.

Has anyone successfully managed to get the cedar_ve driver to work on a pine cube? Is there a set of instructions that someone could point me to that will help me resolce this issue.

Andrew
  Reply


Messages In This Thread
cedar_ve driver not able to allocate memory - by ajellisuk - 11-19-2021, 05:59 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)