gfx: a better way to do gfx suspend/resume at DPMS on/off
authorLi Peng <peng.li@intel.com>
Fri, 3 Aug 2012 06:44:52 +0000 (14:44 +0800)
committerLi Peng <peng.li@intel.com>
Fri, 3 Aug 2012 07:29:32 +0000 (15:29 +0800)
commitafe18a1d576790bc1a68b7f1a6ee4765a509ed95
treea8aec0509533352c10eab4e8e3a8f49e744b8a9b
parentd5d479618a3a791c2fa6bc1017df4f8ee564fd06
gfx: a better way to do gfx suspend/resume at DPMS on/off

A regression was introduced since we add gfx runtime pm support in DPMS
control interface and the "-sharevts" parameter for X launch on mfld, if
user run "xset dpms force off" and then "echo mem > /sys/power/state",
dsi dpi panel will fail to resume back.

Here is the problem analysis: at DPMS off, gfx driver will shutdown the
panel and enter runtime suspend, at this time if kernel doing system suspend,
PCI subsystem will call device's runtime resume interface if it find
device is in runtime suspend state. In this case it just resume gfx device
but doesn't handle dsi dpi panel, then it will cause panel fail to light on in
subsequent resume path.

The fix is directly calling  functions to control gfx device suspend/resume,
rather than the indirect way of pm_runtime_put() and pm_runtime_get().

Signed-off-by: Li Peng <peng.li@intel.com>
drivers/staging/mrst/drv/psb_powermgmt.c