Apalis i.MX6 VPU over clock setting

Our customer use Apalis iMX6 Dual 1GB IT with BSP2.8.
Currently they are trying to port to BSP5.7.
They was using VPU overclocking settings in BSP2.8.
It works on BSP2.8 but doesn’t seem to work on BSP5.7.

2.8

cat /sys/kernel/debug/clk/clk_summary | grep vpu

vpu_axi_sel 1 1 352000000 0 0
vpu_axi_podf 1 1 352000000 0 0
vpu_axi 1 1 352000000 0 0

5.7

cat /sys/kernel/debug/clk/clk_summary | grep vpu

vpu_axi_sel              0        0        0   264000000          0     0  50000
  vpu_axi_podf           0        0        0   264000000          0     0  50000
    vpu_axi              0        0        0   264000000          0     0  50000

Kernel config is enabled in BSP5.7.
zcat /proc/config.gz | grep CONFIG_MX6_VPU_352M
CONFIG_MX6_VPU_352M=y

BSP5.7 seems to have less VPU overclocking source code.

In BSP2.8,
(oe-core/build/tmp-glibc/work-shared/apalis-imx6/kernel-source)
./arch/arm/mach-imx/busfreq-imx.c:#ifndef CONFIG_MX6_VPU_352M
./arch/arm/mach-imx/mach-imx6q.c: if (IS_ENABLED(CONFIG_MX6_VPU_352M)) {
./drivers/clk/imx/clk-imx6q.c:#ifdef CONFIG_MX6_VPU_352M
./drivers/cpufreq/imx6q-cpufreq.c:#ifdef CONFIG_MX6_VPU_352M

In BSP5.7,
(oe-core/build/tmp/work-shared/apalis-imx6/kernel-source)
./arch/arm/mach-imx/busfreq-imx.c:#ifndef CONFIG_MX6_VPU_352M

What should they do to use VPU overclocking with BSP5.7?

Best regards.

Hi @developer0916 , let me check with the BSP team but how are you testing this? Does it greatly
affect performance?

Alvaro.

You can see performance gains with 352M.
p 52.

P8
Video and Image Codec and Data Pipeline for the i.MX 6 Series.
mx-6-se…

The customer is encoding two things at the same time:
They won’t make it in time without overclocking.

1920x1080 30p
960x540 30p

Best regards.

Dear @developer0916 , we confirmed the issue.

We don’t know why this snippet of code was removed but it seems that there was a big refactor of the code.

Fortunately, we could port the changes from BSP 2.8 to 5 and got the 352MHz output.

We haven’t test the encoding capabilities but it should work.

vpu_patch.patch (1.6 KB)

We will check if we can add this in BSP 6.

Kind regards,
Alvaro.

Thanks for providing the patch.
I have checked the NXP kernel source code and there is no overclocking support in any version.

https://source.codeaurora.org/external/imx/linux-imx/

I think Toradex may have added their own code to BSP2.8.
I think that may have been left out of BSP5.
What do you think?

Best regards.

Interesting, I’ve asked the BSP team, but since the presentation you showed was from NXP/Freescale I would think that NXP directly supported this.

Kind regards,
Alvaro.

By the way, will the overclocking feature be built into the kernel in the future?

Best regards.

We will try to categorize this as a bug and see if we can fix it but we cannot make any promises.

Kind regards,
Alvaro.

Hi @developer0916 , unfortunately, I don’t have good news.

It seems NXP completely removed this moving forward, the drivers are not upstreamed and since BSP 6+ support for Apalis iMX6 will be mainline only, BSP 5 is the last BSP that will have any kind of support of the VPU overclocking (with the patch).

Of course customers can implement this from their side checking the changes from BSP 3 but we won’t implement this.

Another option is that someone mainlines this.

Kind regards,
Alvaro