Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
_thalamus Old
(Last edited by _thalamus; 13th September 2012 at 07:30 AM.)
#1  
Guest
Thanks Meter
Posts: n/a
Default [Kernel][Patch][Stable] IDLE2 for S5PV210 (v0.391) (Improved Deep Idle/LPAUDIO)

Update (10/09/2012):
IDLE2 v0.391 - details here.
Known issues:
  • Bluetooth sometimes doesn't work correctly in rare cases on some devices. I've done all I can with this. Whenever I test it, it works. So this one is going to be for the community to solve, should anyone wish to fix it.
  • Excessive battery drain during suspend. Unsure why this occurs, I'm investigating. It actually uses less battery if you kill suspend by holding a wakelock. This suggests to me that the device is 'pretending' to go into suspend, it *is* freezing tasks and calling wfi, but I suspect the SoC isn't being powered off, which may be a syscon issue. Time to do more TRM reading.


Update (09/09/2012):
Current version v0.390, which I'm also going to declare stable. It *may* still have minor bugs, but the blockers are definitely fixed, such as the kernel panics and lockups. The code churn is also over, as the implementation is looking good and cheap.

Development is now in this branch.
Changes here, here and here.
I also deleted a load of old crap from below.



Update (30/08/2012):
Still too busy / lazy to update the first post. Actually getting the damn thing working takes priority.
Current development is all taking place in this branch.
Current version (v0.370) highlights:
  • It actually saves power now after I fixed a few bugs causing stupidly low residencies.
  • Enabled continually. TOP block will be left on unless the screen is off, or the USB is plugged in.
  • CPU frequency set to 800MHz at all times whilst screen off
  • Tons of code re-written / refactored / deleted / reinvented.
  • Plenty of code comments added.
  • Statistics exported to /sys/kernel/debug/idle2/statistics (note the changed path) - Enable in menuconfig (CONFIG_S5P_IDLE2_STATS) (Would be better if this were disabled for 'stable' builds). I will probably remove it once IDLE2 is declared stable.
  • Hot path code is now cheap as chips.
  • IDLE / resume stuff reworked to use the S5P platform suspend code instead of specific assembly.
  • Blah blah blah. Probably loads more, but I forget, I've rewritten 90% of the code 2 or 3 times now, but I've learnt a lot.

Ignore the majority of the below, it's old and inaccurate. Perhaps I will update it sometime.

Any sensible questions regarding the code, ask in the thread.

No n00bs and no moronic questions please, think before post.



Patches and improvement suggestions are more than welcome, particularly now I think the code churn has stopped.


Credits and copyright of IDLE2 v0.3xx:

Originally, the majority was a port of code from Samsungs 2.6.32 P1000 kernel, hence Samsung retained the copyright because the changes were minor.

This is no longer the case as the current status of v0.3xx is that the vast majority of it, over 90%, is original code written by me as I have completely reworked and rewritten pretty much everything.

Describing it as a 'port' is not appropriate either, as it's not a port, it's a completely fresh implementation which has pretty much nothing in common with Samsungs LPAUDIO or Ezekeels didle, other than it achieves the same thing, arguably in a more robust and cheaper way, utilising as much common code as possible such as the platform suspend code.

IDLE2 was inspired by:
  • Samsungs P1000 kernel (my original port)
  • OMAP3/4 cpuidle
  • NVIDIA T2/3 cpuidle
  • S5PV210 TRM

There are a few portions of code in idle2.c which bear resemblance to the code in Samsungs 2.6.32 kernel, such as the defines and struct for the device checks, the memory allocation in idle2_post_init(), the gpio code in s5p_enter_idle2(), checks for activity in MMC/OneNAND et al, but the rest is entirely my work.

In short: The MMC & OneNAND activity check and the GPIO power down are Samsung code with modifications, but that is the extent of Samsung copyright.


Wilful kanging, not clearly giving proper credits and not contributing back is extremely unwelcome.
Open source is not about copying other peoples work, a principle which some developers don’t get.
The GPL was never designed for the purpose of copying code verbatim and riding on other peoples work, it was designed to allow freedom of code, a continual cycle of improvement and peer review, so consider that please and if you aren't prepared to work like that, perhaps consider the reasons why you are actually 'developing' and releasing stuff on here.
The Following 48 Users Say Thank You to For This Useful Post: [ Click to Expand ]
 
teoserio
Old
#2  
Member
Thanks Meter 17
Posts: 82
Join Date: Dec 2010
Location: Desio
another awesome work by this awesome community. many thanks thalamus
Modello: Google Nexus S i9023
Rom: AvatarROM
Kernel: Marmite

Zeppelinrox's V6 SuperCharger
V6 setup guide by me (ITA) --> zoOM...zoOM...
_thalamus Old
#3  
Guest
Thanks Meter
Posts: n/a
Quote:
Originally Posted by teoserio View Post
another awesome work by this awesome community. many thanks thalamus
You are very welcome.

I almost forgot...(lol)

If you want to try it out, right now, it's in my latest kernel release, which is available here. Info on my blog here.
 
djjonastybe
Old
#4  
Senior Member
Thanks Meter 329
Posts: 684
Join Date: Sep 2010
Location: Tienen

 
DONATE TO ME
Can you be so kind to update your first post and tell us how we use the patch files???

I would like to link to your thread from my tutorial how to compile a kernel.

This way we can teach more people to make kernels and they can make their own also.
 
Randomwalker
Old
#5  
Senior Member
Thanks Meter 60
Posts: 321
Join Date: Dec 2011
Quote:
Originally Posted by djjonastybe View Post
Can you be so kind to update your first post and tell us how we use the patch files???
There is a readme in the patch directory.
_thalamus Old
#6  
Guest
Thanks Meter
Posts: n/a
Quote:
Originally Posted by djjonastybe View Post
Can you be so kind to update your first post and tell us how we use the patch files???

I would like to link to your thread from my tutorial how to compile a kernel.

This way we can teach more people to make kernels and they can make their own also.
It tells you how to use the patch files in the readme which is included in the same directory as the patches.
 
teoserio
Old
#7  
Member
Thanks Meter 17
Posts: 82
Join Date: Dec 2010
Location: Desio
Quote:
Originally Posted by _thalamus View Post
You are very welcome.

I almost forgot...(lol)

If you want to try it out, right now, it's in my latest kernel release, which is available here. Info on my blog here.
Okay i'll flash it later and report back with results
Modello: Google Nexus S i9023
Rom: AvatarROM
Kernel: Marmite

Zeppelinrox's V6 SuperCharger
V6 setup guide by me (ITA) --> zoOM...zoOM...
 
mixtapes08
Old
#8  
mixtapes08's Avatar
Senior Member
Thanks Meter 994
Posts: 2,987
Join Date: Sep 2011
Location: Quezon City
look's promising..
Galaxy Nexus: AOSPilipinas 4.2.2 + fancy kernel
Nexus S: Slimbean 4.2.2 + Matr1x kernel

 
zbiecik
Old
#9  
zbiecik's Avatar
Member
Thanks Meter 7
Posts: 56
Join Date: Aug 2008
Location: Syców
I checked and it works on the Jelly Bean. Android 4.1.1 AOSP

Jelly Bean i tapatalk
Samsung galaxy Note II
 
Harbb
Old
#10  
Harbb's Avatar
Senior Member
Thanks Meter 461
Posts: 1,107
Join Date: Dec 2011
Location: Sydney
Astonishing work Thalamus. Ill be testing this as soon as possible, which means not now since its 4am and I just watched the new Batman.

Ill throw out some numbers as soon as I get some sleep, though I very much like some of the improvements you've made. I have high hopes.
Device: Nexus S i9023

 
Post Reply+
Tags
deep idle, idle2, nexus s, power save
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...