An quick fix to this is to add a usleep() call in the DisplayHardwareBase::DisplayEventThread::threadLoop() function in case FB_EARLYSUSPEND is missing so that the thread stops using all CPU.
With the attached patch, the threadLoop() function will only be called six times per second. Perhaps it would be possible to suspend the thread entirely when FB_EARLYSUSPEND is missing since the thread does not seem to be doing anything.
It reduced surfaceflinger's CPU usage to 5-7% with linaro-wallpaper, 0-1% without.
An quick fix to this is to add a usleep() call in the DisplayHardware Base::DisplayEv entThread: :threadLoop( ) function in case FB_EARLYSUSPEND is missing so that the thread stops using all CPU.
With the attached patch, the threadLoop() function will only be called six times per second. Perhaps it would be possible to suspend the thread entirely when FB_EARLYSUSPEND is missing since the thread does not seem to be doing anything.
It reduced surfaceflinger's CPU usage to 5-7% with linaro-wallpaper, 0-1% without.