RK3328 4K HEVC stutter frame drop

  • I'm not an expert of others rockchip socs, but with rk3228 (not the same of the one discussed in this thread) the only boards that can handle 4k contents are the ones with ddr3 and clock rate >= 600mhz.

    maybe can be useful to check also type and clock of DDR RAM.

  • Can you reboot, and have a look at the next kodi.log? If the errors of #11 don't appear after that, fine.

    http://ix.io/4Kx7

    Yeah here's the log. No errors like your original post.


    Have you read https://wiki.libreelec.tv/configuration/4k-hdr ? - the configs discussed should generally help with most media playback.

    Yeah, read over that first thing and tried stuff before opening a thread.

    I'm not an expert of others rockchip socs, but with rk3228 (not the same of the one discussed in this thread) the only boards that can handle 4k contents are the ones with ddr3 and clock rate >= 600mhz.

    maybe can be useful to check also type and clock of DDR RAM.

    So mine is the https://libre.computer/products/roc-rk3328-cc/ which has ddr4. How can I go about finding the DRAM frequency? We don't have lshw installed. Not sure what other tools are installed since it is a stripped down linux.

    Edited once, last by FurmanSK: Merged a post created by FurmanSK into this post. (November 1, 2023 at 3:13 PM).

  • So what tools are in place to do this on a nightly build of version 12? I couldn't find any tools that even let me see what the ram speed is at right now. I did ask this question on the Libre.computers forums and they said it wasn't an issue of overclocking and should ask the question here. Just need to know tools to use for it since its a stripped down basic linux and also if there are ways to OC things if needed.

    That log didn't do any video playing either, so I could go back and try again right now and upload another log after a reboot to see if anything sticks out. I do appreciate your help Da Flex .

  • Hi FurmanSK,

    share the output of

    Code
    cat /sys/kernel/debug/clk/clk_summary

    if this sysfs entry exists, it will show info about every hardware clock on your board.

    Overclock is a bit harder because it depends on what the official builds for rk3328 contain.

    In the soc rk3228 (and I believe in others too) there is a ddr controller called dmc (dynamic memory controller) which can manage the frequency of the ddr chips at runtime (scaling it up and down).

    To work it needs legacy blobs and driver which I imagine (but I don't know) are excluded from the official builds.

    On rk3228 works because my build is unofficial and I've assembled such legacy pieces.

  • Here's the output for that command. ilmich

  • I need to recheck with my boards, but

    Code
        pll_dpll                          1        1        0   664000000          0     0  50000         Y
           dpll                           1        1        0   664000000          0     0  50000         Y
              clk_ddr                     2        2        0   664000000  

    this should be the clock of ddr. Internally clock is divided by 2 so your ram frequency is 332Mhz.

    I imagine that the GUI is also not very fluid, especially at high resolutions.

    Without the drivers I mentioned, one way to overclock the RAM is via bootloader. In practice, when the bootloader initializes the RAM it tries to use a higher clock. This can create problems because high clocks need a higher voltage (which the DMC manages automatically).

    I'll try to study this official build and see if I can do something, but I can't guarantee because I have no way to try.

  • Hi FurmanSK,

    I've builted a version of bootloader with 534Mhz ddr4.

    So first make a backup of your installation and after

    - download this bootloader https://ilmich.libreelec.tv/rk3328/u-boot-rockchip.bin

    - flash it in your bootmedia (from a linux machine or directly in a ssh session of your libreelec installation)

    Code
    dd if=u-boot-rockchip.bin of=${BOOT_DISK} bs=32k seek=1

    where ${BOOT_DISK} is your boot device (for example /dev/mmcblk0)

    If works you should see an higher pll_dpll in clk_summary.

    Let me known.

    Michele

  • Ok, so I tried it with /dev/mmcblk0 as thats what I had in /dev and rebooted. It did not come back up after reboot or even power cycling. Is there a way to put in linux and mount (I assume yes)?

    ilmich

    Don't you have an unoffical build for this chip?

  • Here is an old image I made 2 years ago for ROC CC, not sure if it still works with the stock kernel, LE wasn't interested in adding any new Rockchip devices if it wasn't based on mainline Linux so I abandoned the project.

    mo123
    July 13, 2021 at 5:23 AM

    Here are the dmc drivers I used from Armbian.

    Maybe it can be added to custom images to scale the DDR correctly.

    https://github.com/armbian/build/…anopi-r2s.patch - Also contains dmc drivers

    build/rk3328-add-dmc-driver.patch at 65fc2b84079857baafe863bbb0f61051cb551c07 · armbian/build
    Armbian Linux build tools. Contribute to armbian/build development by creating an account on GitHub.
    github.com

    https://github.com/armbian/build/…nable-dmc.patch - Example for a different RK3328 device with DDR4 memory, similar to ROC CC.

  • Did you see my response ilmich ?

  • I can't find any documentation that states what the DRAM should be running at natively. I also mentioned it to LibreComputers folks that the ram was running so slow and they were going to check with the LE team to make sure the right DRAM reclocking code was in the roc-cc builds.

  • sorry FurmanSK, busy at work.

    Keep in mind that libreelec use U-Boot mainline (not the legacy one with proprietary blobs that maybe librecompurer folks suggests).

    So the low DDR clock is defined in the device tree for roc-cc of U-Boot mainline source code.

    You can try libreelec 10 where U-Boot legacy and binary blobs are used in place of the mainline and see if there are some differences.

  • Keep in mind that libreelec use U-Boot mainline (not the legacy one with proprietary blobs that maybe librecompurer folks suggests)

    LibreComputer are upstream champions so I would expect their boards to work correctly. Their lead (Da Xue) is normally reachable in Slack in East Coast US hours to check things.

  • Anything major relating to h265/HEVC or 4k?

    Only the switch from U-Boot legacy --> U-Boot mainline.

    LibreComputer are upstream champions so I would expect their boards to work correctly.

    board works correctly but ddr3 clock is set to 330mhz(https://github.com/u-boot/u-boot/…r4-666.dtsi#L26) that is too low for 4k contents. A ddr3 clock scaler exists, but without someone that upstream a driver, ddr3 clock is fixed and initialized at boot.

  • ilmich Just checking in, any updates or things I could maybe help testing with? I could look at adding to my build server and see how the image works with building one up from source.

    Hi, I'm trying to make you a new build by changing the frequency of the ddr3 a little. Please note that I don't have your board, so I can't guarantee that it will work. I'm doing this to try to give you a hand because these boards are phenomenal (I work with Android boxes with older soc) and sometimes you just need to tune them a little.

    Fingers crossed
    Michele