[Galaxy S Advance I9070 Android Development] mkaluza:
Update

All the changes I made were merged into CoCore-refresh kernel (3.0.31) and 3.0.101 by TeamCanjica, so they will hit 'mainstream' in some time when they release another build.

This thread is over ;)

/Update

Hi,

I've been working on this kernel for some time with improving undervolting in mind. It's based on CoCore Refresh r10 by CoCafe and of course the credit goes to him where it's due.

Main changes:

- rewritten liveOPP internals.

It improved stability a lot - it now allows to use 300/500/700/900 MHz frequencies with no problem and it allows to undervolt low frequencies even more. Freqs >1GHz are now stable at varm=0x32 (at least on my phone), which also saves a lot of power.

Freqs <=400 MHz now use 0x12 (0.925V) voltage by default - It's the original voltage for 400MHz and you can go even lower when undervolting

- rewritten Mali booster algorithm.

It's far from perfect yet, but it eliminated instability due to the fact, that CoCafe's mali booster and "original" booster (switching between APE 50/100 OPP) were working independently and could cause a crash when the original algorithm switched to APE_50_OPP while mali boost was active. APE_50_OPP voltage is 1V by default (0x18), so when clock is boosted to i.e. 700MHz and it switched to 50 OPP, the result was 350MHz @ 1V, which mihgt be too low.

- allow to set APE and DDR OPP with liveOPP

echo apeopp=25/50/100 > arm_stepXX and echo ddropp=...

before the kernel would set ape/ddr opp to 100 for freqs above 400MHz

- allow changing ape_50_opp voltage

echo 0xXX > /sys/kernel/mali/mali_gpu_vape_50_opp

- make wlan/mmc boost tunables available through sysfs in /sys/kernel/performance/*

- Memory split changed to 2G/2G and switch highmem off - it's not needed with this split

- removed some unnecessary drivers and moved others to modules to reduce kernel size

- changed kernel compression to LZO

- 631MB available memory

- 7800ms kernel boot time

Download & install:

Mediafire

That's partition image - flash it with dd:

dd if=kernel.mk-r1-release.img of=/dev/block/mmcblk0p15

It's also good to create a symlink from /system/lib/modules to /lib/modules - it'll allow modules to autoload, enable modprobe to work and also you can use KoControl app to manage module loading.

Source:

GitHub

TODO:

- create a package for flashing with recovery and place modules (7MB) in /system/lib/modules instead of a ramdisk

- touchbooster has a bug that causes it to limit max freq to 1000MHz on boost.

- figure out how to enable setting of minimal cpu freq - now touchboost always resets it to 100MHz

- add interactive gov from Zwliew kernel

- create more power optimized, auto tuning 'foreground' governor (long story)

My voltage settings

(default kernel voltages are more conservative - set those from init scripts and test them for stability!):

100 - 0x0f

200 - 0x10

300 - 0x11

400 - 0x12

500 - 0x14

600 - 0x18

700 - 0x1d

800 - 0x24

900 - 0x28

1000 - 0x2f

1050..1250 - 0x32

Mali gpu voltage

Default voltage from CoCafe is way too high - idx0 vape could be just 1V since that's the voltage, when mali is running at 1/2 speed (200MHz by default).

My settings (for safety they are 3 steps higher than the lowest working voltage for given freq).

#0 - 0x17

#5 - 0x1c

#9 - 0x23

I don't overclock the gpu - my low index is set to 0 (200MHz), and hi (boosted) to 5(400MHz), which is the original mali freq. That gives mi 100MHz when working at half speed. I don't use any fancy UI effects, so it's enough - when not plaing a game, mali is only working at 100/200MHz and only boosts when loaded. Params:

boost_low idx=0

boost_low threshold=30

boost_delay 2000

boost_high idx=5

boost_high threshold=220

Default kernel settings are left unchanged - set those manually from init scripts.

I place the thread here because I'm not allowed to post in developer forums (<10 messages limit).

MK