[PORT FROM R2] intel_idle: re-introduce c6 to c4 demotion
authorIllyas Mansoor <illyas.mansoor@intel.com>
Fri, 11 Nov 2011 13:13:45 +0000 (18:43 +0530)
committerbuildbot <buildbot@intel.com>
Wed, 21 Dec 2011 14:41:20 +0000 (06:41 -0800)
commit13f45df6a66c97e7c1885474e67d8d543dc6e1d2
treefad772756cf2666b02ecb660e4d129d2e465e213
parent5320c546686102d3f038da907309fb42677509b2
[PORT FROM R2] intel_idle: re-introduce c6 to c4 demotion

BZ: 14243

In patch #19777 BZ 7240 we reasoned that using set_s0ix_complete implementation
will effectively remove the need for C6 to C4 demotion.

But based on BZ 12588 analysis and conclusion that C6 to C4 offload is still
required in some cases even thou set_s0ix_complete() is called suggests that
we need to get back C6 to C4 demotion logic and also get back the fix for LPMP3
BZ 5212 power regression. Also in case we demote we dont have to increment/decrement
C6 counter.

This patch fixes this scenario:
1. s0i3 command issued in MID_PMU
2. c6 offload bit not set
3. c4 demoted but need_reschdule was set so no mwait executed.
4. idle: c6 latency found so soc_s0ix_idle get called with eax==C6_HINT
5. in this case mfld_s0ix_enter not called
6. need_reschudle now not true so mwait(c6) issued.

Hence will have to get back the c6 to c4 demotion logic.

Change-Id: Ib35e2756a3d99e30418869b84f8befb7b8faa98e
Orig-Change-Id: Ic7740686c45679438154b456a06f99f947577eed
Signed-off-by: Illyas Mansoor <illyas.mansoor@intel.com>
Reviewed-on: http://android.intel.com:8080/29304
Reviewed-by: Martin, LoicX <loicx.martin@intel.com>
Tested-by: Martin, LoicX <loicx.martin@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
arch/x86/platform/mfld/pmu.c
drivers/idle/intel_idle.c
include/linux/intel_mid_pm.h