HDMI/PM: Port two HDMI hotplug patches from R2
authorGeng Xiujun <xiujun.geng@intel.com>
Thu, 29 Mar 2012 05:52:51 +0000 (13:52 +0800)
committerbuildbot <buildbot@intel.com>
Sat, 31 Mar 2012 05:59:37 +0000 (22:59 -0700)
commitf3ba3c7f36b5f6a886a930b01852e610d1478e7d
treec5abc752a9b61a37c3ee67f5fe3325b3ef0bf39b
parentaae7a1c0b5ab5fc3fe972b6ae7ad94a041bf2fd6
HDMI/PM: Port two HDMI hotplug patches from R2

BZ: 29595

The issue is tracked by BZ 19079, HDMI cable plug/unplugged not detected when
device is in S0 with Screen OFF. Jouni's two patches are ported to R3.

0001-hdmi-Fixes-for-hdmi-hotplug-detection.patch

Remove random control of HDMI rails around gfx driver. Power on is now
done in psb_intel_hdmi.c:mdfld_hdmi_init during boot up.

Global variable hdmi_state is not updated properly when display is
blanked. Fix this by updating hdmi_state in hdmi_do_hotplug_wq.

Also msic_irq should be type IRQF_NO_SUSPEND to ensure hpd interrupts
are not lost.

0002-hdmi-Implement-hdmi-cable-detection.patch

According to MSIC HDMI Integration Guide both, VCC330 and VHDMI, must
be enabled hotplug detection to work. This would cause unacceptable
power leak in S3 state -> Take approach to have hotplug detection
working only when device is not in S3. HDMI cable Plug in/out during
S3 is detected when waking up from S3. This allows powering off VCC330
and VHDMI during S3.

To implement this following changes are done in this patch:

Create dedicated freezeable workqueue for hotplug detection to ensure
ongoing detection is stopped before powering off HDMI rails on
suspend and resumed only when rails are powered on again.

Add mechanism to detect cable plug out during S3 when waking up.

Change-Id: I161928534a3c6b197c0d2ac450e5587ff196a74b
Signed-off-by: Geng Xiujun <xiujun.geng@intel.com>
Reviewed-on: http://android.intel.com:8080/41579
Reviewed-by: Xu, Randy <randy.xu@intel.com>
Reviewed-by: Tong, BoX <box.tong@intel.com>
Tested-by: Tong, BoX <box.tong@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/staging/mrst/drv/mdfld_msic.c
drivers/staging/mrst/drv/psb_drv.c
drivers/staging/mrst/drv/psb_powermgmt.c