From: Jim Liu <[email protected]>

Added the supports to control the HDMI power rails in display driver.

Signed-off-by: Jim Liu <[email protected]>
Signed-off-by: Hitesh K. Patel <[email protected]>
---
 drivers/staging/mrst/drv/psb_intel_hdmi.c |   31 +++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/mrst/drv/psb_intel_hdmi.c 
b/drivers/staging/mrst/drv/psb_intel_hdmi.c
index d005733..3e7a77c 100644
--- a/drivers/staging/mrst/drv/psb_intel_hdmi.c
+++ b/drivers/staging/mrst/drv/psb_intel_hdmi.c
@@ -39,6 +39,16 @@
 #include "mdfld_hdmi_audio_if.h"
 #endif /* MDFLD_HDCP */
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+#include <asm/intel_scu_ipc.h>
+#define MSIC_VCC330CNT 0xd3
+  #define VCC330_OFF 0x24
+  #define VCC330_ON 0x37
+#define MSIC_VHDMICNT 0xde
+  #define VHDMI_OFF 0x25
+  #define VHDMI_ON 0xa5
+#endif
+
 /* FIXME_MDFLD HDMI EDID supports */
 
 struct mid_intel_hdmi_priv {
@@ -75,6 +85,13 @@ static void mdfld_hdmi_mode_set(struct drm_encoder *encoder,
 
        PSB_DEBUG_ENTRY("\n");
 
+#ifdef CONFIG_X86_MRST
+       /* turn on VCC330 */
+       intel_scu_ipc_iowrite8(MSIC_VCC330CNT, VCC330_ON);
+       /* turn on HDMI power rails */
+       intel_scu_ipc_iowrite8(MSIC_VHDMICNT, VHDMI_ON);
+#endif
+
        hdmib = REG_READ(hdmi_priv->hdmib_reg) | HDMIB_PORT_EN | 
HDMIB_PIPE_B_SELECT | HDMIB_NULL_PACKET;
        hdmi_phy_misc = REG_READ(HDMIPHYMISCCTL) & ~HDMI_PHY_POWER_DOWN; 
 
@@ -232,7 +249,21 @@ static void mdfld_hdmi_dpms(struct drm_encoder *encoder, 
int mode)
        if (mode != DRM_MODE_DPMS_ON) {
                REG_WRITE(hdmi_priv->hdmib_reg, hdmib & ~HDMIB_PORT_EN);
                REG_WRITE(HDMIPHYMISCCTL, hdmi_phy_misc | HDMI_PHY_POWER_DOWN);
+
+#ifdef CONFIG_X86_MRST
+               /* turn off HDMI power rails */
+               intel_scu_ipc_iowrite8(MSIC_VHDMICNT, VHDMI_OFF);
+               /* turn off VCC330 */
+               intel_scu_ipc_iowrite8(MSIC_VCC330CNT, VCC330_OFF);
+#endif
        } else {
+#ifdef CONFIG_X86_MRST
+               /* turn on VCC330 */
+               intel_scu_ipc_iowrite8(MSIC_VCC330CNT, VCC330_ON);
+               /* turn on HDMI power rails */
+               intel_scu_ipc_iowrite8(MSIC_VHDMICNT, VHDMI_ON);
+#endif
+
                REG_WRITE(HDMIPHYMISCCTL, hdmi_phy_misc & ~HDMI_PHY_POWER_DOWN);
                REG_WRITE(hdmi_priv->hdmib_reg, hdmib | HDMIB_PORT_EN);
        }
-- 
1.7.1

_______________________________________________
MeeGo-kernel mailing list
[email protected]
http://lists.meego.com/listinfo/meego-kernel

Reply via email to