In encoder dpms power on display island before accessing HDMI registers
authorSanjay Rama Reddy <sanjay.rama.reddy@intel.com>
Tue, 14 Feb 2012 22:06:48 +0000 (14:06 -0800)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:30:12 +0000 (12:30 +0300)
In mdfld encoder dpms function, before accessing the registers notify
Power Management module not to power down the display island and once done notify
the module about that access to registers is no longer needed.

Signed-off-by: Mohan Kandra <mohan.b.kandra@intel.com>
Signed-off-by: Arun Kannan <arun.kannan@intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
drivers/staging/mrst/drv/psb_intel_hdmi.c

index 9eebdef..f31cfea 100644 (file)
@@ -303,6 +303,12 @@ static void mdfld_hdmi_dpms(struct drm_encoder *encoder, int mode)
 
        PSB_DEBUG_ENTRY("%s\n", mode == DRM_MODE_DPMS_ON ? "on" : "off");
 
+       if (!ospm_power_using_hw_begin(OSPM_DISPLAY_ISLAND,
+                                      true)) {
+               PSB_DEBUG_ENTRY("%s failed to power on\n", __func__);
+               return;
+       }
+
        hdmib = REG_READ(hdmi_priv->hdmib_reg) | HDMIB_PIPE_B_SELECT | HDMIB_NULL_PACKET;
        hdmi_phy_misc = REG_READ(HDMIPHYMISCCTL);
 
@@ -314,6 +320,8 @@ static void mdfld_hdmi_dpms(struct drm_encoder *encoder, int mode)
                REG_WRITE(hdmi_priv->hdmib_reg, hdmib | HDMIB_PORT_EN);
        }
        REG_READ(hdmi_priv->hdmib_reg);
+
+       ospm_power_using_hw_end(OSPM_DISPLAY_ISLAND);
 }
 
 static void mdfld_hdmi_save(struct drm_connector *connector)