Add DVI interoperability support for HDMI.
authorasaggi <asaggi@intel.com>
Tue, 14 Feb 2012 22:06:55 +0000 (14:06 -0800)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:30:14 +0000 (12:30 +0300)
Kernel changes to add interoperability support for DVI. We do not want to send
NULL packets for DVI mode. This change depends on Android frameworks change to
actually make the decision of NOT routing audio to DVI.

ISSUE: ANDROID-1482
ISSUE: ANDROID-1519
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
drivers/staging/mrst/drv/psb_intel_reg.h

index d6f5194..a583117 100644 (file)
@@ -311,8 +311,12 @@ static void mdfld_hdmi_dpms(struct drm_encoder *encoder, int mode)
        }
 
        hdmib = REG_READ(hdmi_priv->hdmib_reg) | HDMIB_PIPE_B_SELECT;
-       /*TODO: need logic for DVI here */
-       hdmib |= (HDMIB_NULL_PACKET | HDMI_AUDIO_ENABLE);
+       if (hdmi_priv->monitor_type == MONITOR_TYPE_DVI) {
+               hdmib &= ~(HDMIB_NULL_PACKET | HDMI_AUDIO_ENABLE);
+               REG_WRITE(VIDEO_DIP_CTL, 0x0);
+               REG_WRITE(AUDIO_DIP_CTL, 0x0);
+       } else
+               hdmib |= (HDMIB_NULL_PACKET | HDMI_AUDIO_ENABLE);
        hdmi_phy_misc = REG_READ(HDMIPHYMISCCTL);
 
        if (mode != DRM_MODE_DPMS_ON) {
index 985da5a..b734f77 100644 (file)
@@ -721,6 +721,8 @@ struct dpst_guardband {
 # define HDMIB_PIPE_B_SELECT           (1 << 30)
 # define HDMIB_NULL_PACKET             (1 << 9)
 #define HDMIB_HDCP_PORT (1 << 5)
+#define AUDIO_DIP_CTL          0x69060
+#define VIDEO_DIP_CTL          0x61170
 
 /* #define LVDS                        0x61180 */
 # define MRST_PANEL_8TO6_DITHER_ENABLE         (1 << 25)