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>