No performance difference between 1.5, 1.75 & 2GHz

Moderators: odroid, mdrjr

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby brad » Thu Feb 23, 2017 4:02 pm

crashoverride wrote:I propose that this interim solution should be adding #ifdef's (config) to the uboot source code. This would allow a configuration switch that will build either stock or over-clock enabled boot firmware. Anyone using mainline is already accustomed to compiling/configuration. Adding uboot as a one time build requirement does not seem to be an undue burden.

[edit]
To clarify, HardKernel would continue to supply the boot loader as it is today. Those wishing "stock" DVFS can configure and build uboot without over-clocking tables by altering the config file.


Thanks for your information and expertise. @odroid do you think something like this might be possible as an interim solution?
brad
 
Posts: 686
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby odroid » Thu Feb 23, 2017 4:54 pm

We will look into the feasibility early next week since we have some other urgent issues.
User avatar
odroid
Site Admin
 
Posts: 27973
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby joy » Mon Feb 27, 2017 10:15 am

Hi.

It's available to send a domain value via SCPI command, 'SCPI_CMD_GET_DVFS_INFO',
then get back the specific dvfs table from bl via trustzone.
There will be two dvfs table set in bl301 area.
It means we can choose one of dvfs tables when booting-up.
My approach is as following.

1. Mainline kernel
- domain number will be '0'.
- in this case, bl301 will deliver the limited dvfs table those max frequency is 1.536GHz by default.
Code: Select all
struct scpi_opp_entry cpu_dvfs_tbl_limited[] = {
   DVFS( 100000000,  870),
   DVFS( 250000000,  870),
   DVFS( 500000000,  870),
   DVFS(1000000000,  990),
   DVFS(1296000000, 1100),
   DVFS(1536000000, 1100),
};


2. The existing HK's ODROID-C2 kernel
- in scpi kernel driver, the highest bit (7th) of domain number will be set as '1'.
- bl301 will check the bit first and then the full dvfs table those max frequency is 2.016GHz via the SCPI command.
- and then we can handle the max frequency as the way that is implemented in C2 kernel with 'max_freq' in boot.ini.
Code: Select all
struct scpi_opp_entry cpu_dvfs_tbl[] = {
   DVFS( 100000000,  870),
   DVFS( 250000000,  870),
   DVFS( 500000000,  870),
   DVFS(1000000000,  990),
   DVFS(1296000000, 1100),
   DVFS(1536000000, 1100),
   DVFS(1656000000, 1100),
   DVFS(1680000000, 1100),
   DVFS(1752000000, 1130),
   DVFS(1896000000, 1130),
   DVFS(1920000000, 1130),
   DVFS(1944000000, 1130),
   DVFS(2016000000, 1130),
};


I think it's the best way so far that we don't need to separate boot binary and can support mainline.
How about your opinions?

We are planning to release this scheme soon. (both of u-boot and kernel)
I will note the release version once we've done release.
joy
 
Posts: 457
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby rooted » Tue Feb 28, 2017 2:12 am

I like this approach as it takes the pressure off the kernel developers, of course others may disagree but I can't imagine why.
User avatar
rooted
 
Posts: 4940
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby brad » Tue Feb 28, 2017 10:00 am

I agree this looks good allowing both kernels to run from the same boot blob for the moment. Thanks!
brad
 
Posts: 686
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby joy » Tue Feb 28, 2017 10:49 am

rooted, brad,
Thanks for your opinions.

We've released the new version including this scheme first on Ubuntu.
Code: Select all
root@odroid64:~# uname -a
Linux odroid64 3.14.79-107 #1 SMP PREEMPT Sun Feb 26 22:53:59 BRT 2017 aarch64 aarch64 aarch64 GNU/Linux

https://github.com/hardkernel/u-boot_fi ... 5d9bfb4143
https://github.com/hardkernel/linux/com ... b4aedd5aa7

By default, the max freq. of default dvfs will be 1.536GHz on mainline kernel,
and with the kernel patch and existing 'max_freq' scheme on HK's c2 kernel, 2.016GHz is max freq.

For Android, we're planning to include them for next release version.
I will share the version once the release is done.
And new bl301.bin in u-boot/fip/gxb/bl301.bin will be merged on HK's github soon.
joy
 
Posts: 457
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby brad » Tue Feb 28, 2017 5:52 pm

joy wrote:By default, the max freq. of default dvfs will be 1.536GHz on mainline kernel,
and with the kernel patch and existing 'max_freq' scheme on HK's c2 kernel, 2.016GHz is max freq.


Thanks for your good work on this I haven't tested as yet but it seems this will allow normal boot and offloading overclocking to the running kernel on the C2 :)
brad
 
Posts: 686
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby umiddelb » Tue Feb 28, 2017 6:58 pm

+1

Thank you!
umiddelb
 
Posts: 438
Joined: Thu Jan 29, 2015 6:42 am
languages_spoken: English, German
ODROIDs: ODROID-C1, ODROID-XU4, ODROID-C2

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby odroid » Tue Feb 28, 2017 6:59 pm

The new bootloader is included in the latest Ubuntu image too.
http://odroid.com/dokuwiki/doku.php?id= ... _note_v2.3
User avatar
odroid
Site Admin
 
Posts: 27973
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby umiddelb » Tue Feb 28, 2017 10:03 pm

odroid wrote:The new bootloader is included in the latest Ubuntu image too.
http://odroid.com/dokuwiki/doku.php?id= ... _note_v2.3

Did you update the u-boot binary here as well?
umiddelb
 
Posts: 438
Joined: Thu Jan 29, 2015 6:42 am
languages_spoken: English, German
ODROIDs: ODROID-C1, ODROID-XU4, ODROID-C2

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby odroid » Wed Mar 01, 2017 11:38 am

umiddelb wrote:
odroid wrote:The new bootloader is included in the latest Ubuntu image too.
http://odroid.com/dokuwiki/doku.php?id= ... _note_v2.3

Did you update the u-boot binary here as well?


Yes, use this file.
http://dn.odroid.com/S905/BootLoader/OD ... ase.tar.gz
User avatar
odroid
Site Admin
 
Posts: 27973
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby joy » Thu Mar 02, 2017 3:00 pm

The u-boot commit with the new bl301.bin has been merged on HK's github.
https://github.com/hardkernel/u-boot/co ... 87c2c445a5

And as odroid mentioned, the sd_fusing file in this link is also available.
http://dn.odroid.com/S905/BootLoader/OD ... ase.tar.gz

Android Marshmallow v2.4 or higher version will support this scheme, too.
joy
 
Posts: 457
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby umiddelb » Mon Mar 06, 2017 8:21 pm

Thank you! I've enabled the scpi_clocks in arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts (i.e. removed the disabled statement) in Kevin Hilman's v4.12/integ branch to get cpufreq scaling support back.
umiddelb
 
Posts: 438
Joined: Thu Jan 29, 2015 6:42 am
languages_spoken: English, German
ODROIDs: ODROID-C1, ODROID-XU4, ODROID-C2

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby RickyTerzis » Wed Jul 26, 2017 2:20 am

Hi...i am a new user here. As per my knowledge the freq table is controlled via the ARM Trustzone controller.There is no hackable way of changing the voltage / freq table without modifying the binary blobs and signing them somehow. We "assume" that Amlogic set them up properly and they are working.

printed circuit assembly
Last edited by RickyTerzis on Thu Oct 05, 2017 4:48 am, edited 1 time in total.
RickyTerzis
 
Posts: 1
Joined: Wed Jul 26, 2017 2:14 am
languages_spoken: English
ODROIDs: Phone

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby brad » Fri Jul 28, 2017 7:23 pm

RickyTerzis wrote:We "assume" that Amlogic set them up properly and they are working.


I think at the time this post was started it was assumed but no longer. Hardkernel and many users did some extensive testing when concerns were raised.

With any chip we have firmware for which the source is not disclosed to users, be it Intel, AMD or amlogic and in many cases we assume they have it right.
brad
 
Posts: 686
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby chenrp » Thu Sep 21, 2017 1:56 pm

Any news on the s912 max frequency?
chenrp
 
Posts: 2
Joined: Thu Sep 21, 2017 1:51 pm
languages_spoken: english

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby stmicro » Thu Sep 21, 2017 2:24 pm

S905, S905X, S905W, S905D and S912 have 1.5Ghz max clock frequency.
stmicro
 
Posts: 225
Joined: Tue Apr 28, 2015 4:23 pm
Location: shenzhen china
languages_spoken: english, chinese
ODROIDs: Many Odroids and Rpis.

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby chenrp » Thu Sep 21, 2017 2:48 pm

I know...
Just though that we can get a little more.
chenrp
 
Posts: 2
Joined: Thu Sep 21, 2017 1:51 pm
languages_spoken: english

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby stmicro » Thu Sep 21, 2017 2:52 pm

afaik, hardkernel didn't make any sbc with s912. so you have to ask it to your board manufacturer.
stmicro
 
Posts: 225
Joined: Tue Apr 28, 2015 4:23 pm
Location: shenzhen china
languages_spoken: english, chinese
ODROIDs: Many Odroids and Rpis.

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby huantxo » Mon May 07, 2018 7:50 pm

Sorry for reviving this old thread, but there are many interesting explanations that I would like to understand in order to do development in other Amlogic SoC's. The problem is that there are two attached files that are not available anymore:

c2_1.6MHz_freq_patch.zip
c2_freq_patch_0902.zip

If anyone, by chance, has some archived version of those files, I'd greatly appreciate if they could share them.
Thank you very much.
huantxo
 
Posts: 22
Joined: Thu Feb 22, 2018 1:09 am
languages_spoken: English, Spanish
ODROIDs: HC1, XU4

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby rooted » Mon May 07, 2018 8:52 pm

huantxo wrote:Sorry for reviving this old thread, but there are many interesting explanations that I would like to understand in order to do development in other Amlogic SoC's. The problem is that there are two attached files that are not available anymore:

c2_1.6MHz_freq_patch.zip
c2_freq_patch_0902.zip

If anyone, by chance, has some archived version of those files, I'd greatly appreciate if they could share them.
Thank you very much.
They wouldn't work on a different SBC, we have a special bl firmware on the C2 that allows for "overclocking".
User avatar
rooted
 
Posts: 4940
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby huantxo » Tue May 08, 2018 1:14 am

@rooted Thank you very much for your response. I know that the patch is already implemented in current C2 kernel git, and I understand that there are different versions in the git history. I also understand that the binaries won't work in other Meson SoC's.

But if you notice the following post: viewtopic.php?f=141&t=23044&start=150#p158346, you'l see it states that doing a diff between those two particular versions of the BLOB, you'll get a six-byte difference that corresponds to the CPU frequency-setting code. That is why I need those particular two files, to combine that information with the rest of the info in the post. Particularly, with the Chromium OS EC sources. All that information is very valuable in developing a similar solution for other Meson SoC's.

And that is the reason why I need those two particular versions of the BLOB's, and not any other. Regarding the versions in the git history, I cannot be sure any of them correspond to those specific two versions.

So, again, if someone had an archived version of these two files, I'd be greatly thankful if they could share them:
c2_1.6MHz_freq_patch.zip
c2_freq_patch_0902.zip
huantxo
 
Posts: 22
Joined: Thu Feb 22, 2018 1:09 am
languages_spoken: English, Spanish
ODROIDs: HC1, XU4

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby rooted » Tue May 08, 2018 2:41 am

Nice :)
User avatar
rooted
 
Posts: 4940
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby huantxo » Thu May 10, 2018 7:28 pm

The post author still had an archived version of the files, and he kindly emailed them to me. I'm attaching them here, just in case anybody else ever needs them.
Attachments
c2_1.6MHz_freq_patch.zip
(22.5 KiB) Downloaded 15 times
c2_freq_patch_0902.zip
(23.23 KiB) Downloaded 16 times
huantxo
 
Posts: 22
Joined: Thu Feb 22, 2018 1:09 am
languages_spoken: English, Spanish
ODROIDs: HC1, XU4

Re: No performance difference between 1.5, 1.75 & 2GHz

Unread postby rooted » Fri May 11, 2018 12:25 am

That was good of you to seek out and link them, hope it works out for you.
User avatar
rooted
 
Posts: 4940
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Previous

Return to Issues

Who is online

Users browsing this forum: No registered users and 1 guest