How do you increase VPU clock on i.MX6S?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do you increase VPU clock on i.MX6S?

Jump to solution
3,430 Views
ralph__
Contributor IV

My VPU is running at 270MHz and my Freescale FAE has said I should increase the VPU clock to 328MHz but I don't know how to. There used to be the ability in the kernel to select a config option and increase it to 352MHz (CONFIG_MX6_VPU_352M) but this has been removed from the kernel and there is no simple way to forward-port these changes to the file in question (arch/arm/mach-imx/clk-imx6q.c).

I have the latest kernel patches but it's tricky to work out exactly what to do. Please can someone help.

Tags (3)
1 Solution
1,566 Views
AnsonHuang
NXP Employee
NXP Employee

Hi, ralph

     I ported the patch to L3.10.17 for you, the patch is attached, you can refer to the patch and try to port to your code base, below is the log I tested, the VPU freq is increased, but please be noted that I did NOT do stress test on this patch, so you have to do more test on your platform, this patch is just to guide you how to increase VPU freq based n L3.10.17, it is NOT the patch that we released in our default Linux BSP! If it works for you, please close this topic, thanks!

i.MX6Q:

root@imx6qdlsolo:~# cat /sys/kernel/debug/clk/clk_summary | grep vpu
          vpu_axi_sel           0           0            352000000
             vpu_axi_podf       0           0            352000000
                vpu_axi         0           0            352000000
root@imx6qdlsolo:~# /unit_tests/memtool 0x20c4018 1
E
Reading 0x1 count starting at address 0x020C4018

0x020C4018:  00014204

root@imx6qdlsolo:~#

i.MX6DL:

Reading 0x1 count starting at address 0x020C4018

0x020C4018:  00A55204

root@imx6qdlsolo:~# cat /sys/kernel/debug/clk/clk_summary | grep vpu
          vpu_axi_sel           0           0            327724137
             vpu_axi_podf       0           0            327724137
                vpu_axi         0           0            327724137

View solution in original post

0 Kudos
10 Replies
1,566 Views
SergioSolis
NXP Employee
NXP Employee

hello Ralph,

Please let me know if this thread helps:

Re: i.MX6Q: How to increase the VPU frequency?

0 Kudos
1,566 Views
ralph__
Contributor IV

Hi, unfortunately that is of no help as the patches it refers to do not seem to exist in any repositories anywhere.

Ralph

0 Kudos
1,566 Views
ralph__
Contributor IV

Anson (the person who wrote a patch to increase VPU frequency in the latest Yocto) has told me the repository is at ssh://sw-git01-tx30.am.freescale.net/git/sw_git/repos/linux-2.6-imx, branch: imx_3.10.y.


I don't have access to this unfortunately. Maybe it's an internal Freescale repository?

0 Kudos
1,566 Views
AnsonHuang
NXP Employee
NXP Employee

Hi, Ralph

     Yes, the repository I gave you is in our internal git.

     To increase the VPU freq to 328MHz on i.MX6S, you need to do some changes based on the kernel you are using, could you please tell me which kernel which release you are using?

0 Kudos
1,566 Views
ralph__
Contributor IV

Thanks for your reply Yongcai.

I am using Kernel version 3.10.17

0 Kudos
1,567 Views
AnsonHuang
NXP Employee
NXP Employee

Hi, ralph

     I ported the patch to L3.10.17 for you, the patch is attached, you can refer to the patch and try to port to your code base, below is the log I tested, the VPU freq is increased, but please be noted that I did NOT do stress test on this patch, so you have to do more test on your platform, this patch is just to guide you how to increase VPU freq based n L3.10.17, it is NOT the patch that we released in our default Linux BSP! If it works for you, please close this topic, thanks!

i.MX6Q:

root@imx6qdlsolo:~# cat /sys/kernel/debug/clk/clk_summary | grep vpu
          vpu_axi_sel           0           0            352000000
             vpu_axi_podf       0           0            352000000
                vpu_axi         0           0            352000000
root@imx6qdlsolo:~# /unit_tests/memtool 0x20c4018 1
E
Reading 0x1 count starting at address 0x020C4018

0x020C4018:  00014204

root@imx6qdlsolo:~#

i.MX6DL:

Reading 0x1 count starting at address 0x020C4018

0x020C4018:  00A55204

root@imx6qdlsolo:~# cat /sys/kernel/debug/clk/clk_summary | grep vpu
          vpu_axi_sel           0           0            327724137
             vpu_axi_podf       0           0            327724137
                vpu_axi         0           0            327724137

0 Kudos
1,566 Views
ralph__
Contributor IV

Hi Yongcai,

I applied the patch but when I select "352M" the kernel locks up on boot:

Starting kernel ...

using ft address 0x00000000

Using machid 0xEBB

uart regs:

rxd - 0x00000000

txd - 0x00000000

ctrl1 - 0x00000001

ctrl2 - 0x00004027

ctrl3 - 0x00000784

ctrl4 - 0x00008000

fifo ctrl - 0x00000200

status 1 - 0x00000240

status 2 - 0x00001000

escape char - 0x0000002B

escape timeout - 0x00000000

bpm inc - 0x0000000F

bpm mod - 0x0000015B

baud rate count - 0x00000008

one millisecond - 0x00000000

test reg - 0x00000060

485 ctrl - 0x00000000

~

When I select "328M" it boots properly and when I run "dump_clocks.sh" it tells me the VPU is now running at 328MHz. Unfortunately the effect of increasing the VPU speed is to decrease the decode frame rate to 53.6fps from 56.8fps. :-(

Is there a way to increase the IPU clock speed without increasing the VPU clock or any other clock?

Thanks,

Ralph

0 Kudos
1,566 Views
AnsonHuang
NXP Employee
NXP Employee

Hi, ralph

     The 352MHz is only for i.MX6Q, 328MHz is only for i.MX6DL/S, your platfor is i.MX6S, you should only use 328MHz. I have no idea why you got decrease decode frame with high vpu freq.

1,566 Views
ralph__
Contributor IV

I've now moved to an i.MX6Q board. Do you know what the maximum VPU frequency on this is?

Thanks.

0 Kudos
1,566 Views
AnsonHuang
NXP Employee
NXP Employee

i.MX6Q supports 352MHz for VPU freq, our L3.10 kernel support this feature by enabling CONFIG_MX6_VPU_352M config.