Re: [linux-sunxi] Re: [PATCH sunxi-boards 1/3] h3: Add fex file for Orange Pi PC

2015-12-22 Thread Siarhei Siamashka
On Sat, 19 Dec 2015 22:18:28 +0100
Thomas Kaiser  wrote:

> Siarhei Siamashka wrote:
> 
> > It's likely that the credit for "unlocking" the 1.5 GHz clock speed
> > actually belongs to third-party modders.  
> 
> Thanks for clarifying this (and all the additional informations). I'll
> try to correct this where I spread wrong "informations"/assumptions
> asapissimo.
> 
> > As there were no real objections, I have just pushed the Orange Pi PC
> > fex file to the sunxi-boards repository. This makes it the first FEX
> > file for the H3 SoC :-)  
> 
> Great. Only one single question (I've overlooked before). Why
> 
> boot_clock = 1200
> 
> (especially since you wrote about SY8106A's default 1.2V voltage being
> safe for operation at 1008 MHz)

Thanks, that was a good question.

The "boot_clock" parameter is not used by the linux kernel. It's the
Allwinner's bootloader thing. You can grep the H3 SDK sources to check
this.

As for the other things left to do, the DRAM clock speed needs to
be adjusted in the FEX file after we find a reasonable default DRAM
clock speed.

The reason is that on every cooling state change in the 3.4 kernel
(after crossing any temperature threshold, for example 70C), there
is a hook into the DRAM reclocking code. This code simply sets 480MHz
DRAM clock speed if the temperature is 100C or higher. And if the
temperature is below 100C, then the dram clock value from FEX is
used.

-- 
Best regards,
Siarhei Siamashka

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Re: [PATCH sunxi-boards 1/3] h3: Add fex file for Orange Pi PC

2015-12-19 Thread Thomas Kaiser
Siarhei Siamashka wrote:

> It's likely that the credit for "unlocking" the 1.5 GHz clock speed
> actually belongs to third-party modders.

Thanks for clarifying this (and all the additional informations). I'll
try to correct this where I spread wrong "informations"/assumptions
asapissimo.

> As there were no real objections, I have just pushed the Orange Pi PC
> fex file to the sunxi-boards repository. This makes it the first FEX
> file for the H3 SoC :-)

Great. Only one single question (I've overlooked before). Why

boot_clock = 1200

(especially since you wrote about SY8106A's default 1.2V voltage being
safe for operation at 1008 MHz)

Thx,

Thomas




-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Re: [PATCH sunxi-boards 1/3] h3: Add fex file for Orange Pi PC

2015-12-19 Thread Siarhei Siamashka
On Wed, 9 Dec 2015 00:40:18 -0800 (PST)
Thomas Kaiser  wrote:

> Siarhei Siamashka:
> 
> > Extracted from the Lubuntu_1404_For_OrangePiPC_v0_8_0_.img.xz image: 
> >
> > http://www.orangepi.org/downloadresources/orangepipc/oragepipc_4a0e8d960f7f0a52606dfaba58.html
> >  
> >
> > Not necessarily the best one
> >  
> 
> This is the worst one since it's the origin of all thermal problems with 
> Orange Pis

It is not the worst one. This particular FEX file only allows clock
speeds up to 1.2 GHz because the CPU clock frequency must satisfy
*both* cpufreq and also cooling state requirements at once. Yes, the
cpufreq table lists 1.5GHz as the maximum clock frequency. But at the
same time, the highest cooling state only allows 4 cores running at
1.2GHz in this FEX. I had some explanations about this in my third
patch "h3: Update cpufreq and cooling state tables on Orange Pi PC".

It's likely that the credit for "unlocking" the 1.5 GHz clock speed
actually belongs to third-party modders.

> and the result of product marketing: Advertising the H3 to be 
> able to run at "up to 1.6Ghz".

Right now http://www.orangepi.org/orangepipc/ page does not say
anything about the CPU clock frequency. I guess, there was a time
period when nobody had any idea about what would be the CPU clock
speed limit because Allwinner does not really provide this information
in the H3 manual.

Regarding the product marketing. The primary competitors are probably
the Raspberry Pi 2 running at 900 MHz and the ODROID C1 running at 1.5
GHz. So 1.6 GHz would definitely look attractive in the marketing
materials if this was true.

It looks like H3 can be clocked at least up to 1.3 GHz with the
CPU core voltage not exceeding the 1.4V limit specified in the H3
manual. But running all 4 cores at this clock speeds for prolonged
periods of time may be difficult because of thermal throttling.
On the other hand, a single-threaded workload at 1.3 GHz is
probably perfectly fine. It's roughly the same as
https://en.wikipedia.org/wiki/Intel_Turbo_Boost
Intel is playing safe and provides two clock frequencies in the
marketing materials (the "nominal" clock frequency and the "boosted"
one). Maybe that's the way to go?

A heatsink is just an optional performance feature, which may allow
your system to run faster and keep the cores always running at full
speed. It is not necessary for reliable operation, but the peak
performance may degrade without it.

> All Steven did was to increase clockspeeds 
> and to adjust the Vcore voltage of the two available operting points in the 
> dvs table he took from Draco by 200mV (to be able to reach the 
> extremity_freq as scaling_max_freq).
> 
> And the result is that everyone using OS images for H3 based Orange Pi 
> models has to suffer from heat/stability problems. When you replace this 
> moronic dvfs table with something sane (a few more operating points and not 
> only 2 already exceeding the recommended maximum values), you won't even 
> need a heatsink:
> 
> http://linux-sunxi.org/User_talk:Tkaiser#Lessons_to_learn_from_Xunlong
> 
> With Xunlong's dvfs settings switching between 1.2 Ghz and 1.56 GHz *while 
> being idle* the SoC's temperature increases by 12°C.
> 
> I don't know what I'm doing wrong but I can fire up cpuburn-a7 running on 
> all 4 CPU cores at 1.2Ghz on my Orange Pi PC without thermal throttling, 
> without CPU cores being dropped and also without heatsink/fan attached. Can 
> please anyone explain to me what's wrong with my Orange Pi?

This is called undervolting. With overclocking one is pushing the
absolute performance limits. And with undervolting one pushing the
performance/watt limits.

But there is some variation in voltage tolerances between different
samples, so sufficient safety headroom must be provided in the
general purpose configuration to make it suitable for everyone.
Even if you can reduce the voltage to the very minimum on your
board, this does not automatically mean that any other guy with
a different Orange Pi PC board would be also able to use the same
voltage safely.

As there were no real objections, I have just pushed the Orange Pi PC
fex file to the sunxi-boards repository. This makes it the first FEX
file for the H3 SoC :-)

-- 
Best regards,
Siarhei Siamashka

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.