]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: enable memory self refresh on 9xx
authorLi Peng <peng.li@linux.intel.com>
Wed, 27 Jan 2010 11:01:11 +0000 (19:01 +0800)
committerEric Anholt <eric@anholt.net>
Mon, 22 Feb 2010 16:46:50 +0000 (11:46 -0500)
commitf5accfac11a9dcd5f6c7e021a6496b50d617a87d
tree1753500fd849e4dd68a4878f31baa95743699535
parenta4cbb56b36d2c47c81e35b71ab7971b05f30a751
drm/i915: enable memory self refresh on 9xx

Enabling memory self refresh (SR) on 9xx needs to set additional
register bits. On 945, we need bit 31 of FW_BLC_SELF to enable the
write to self refresh bit and bit 16 to enable the write of self
refresh watermark. On 915, bit 12 of INSTPM is used to enable SR.

SR will take effect when CPU enters C3+ state and its entry/exit
should be automatically controlled by H/W, driver only needs to set
SR enable bits in wm update. But this isn't safe in my test on 945
because GPU is hung. So this patch explicitly enables SR when GPU
is idle, and disables SR when it is busy. In my test on a netbook of
945GSE chipset, it saves about 0.8W idle power.

Signed-off-by: Li Peng <peng.li@intel.com>
[anholt: rebased against 2f0d044750733f4a43396ffd67def7ac0fdedbc1
by adding disable of INSTPM SR bit on 915GM for two pipe setup]
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_display.c