From 1063bb46f69337be9321e5e222b2bc139d856921 Mon Sep 17 00:00:00 2001 From: asaggi Date: Tue, 14 Feb 2012 14:06:55 -0800 Subject: [PATCH] Add DVI interoperability support for HDMI. 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 Signed-off-by: Kirill A. Shutemov --- drivers/staging/mrst/drv/psb_intel_hdmi.c | 8 ++++++-- drivers/staging/mrst/drv/psb_intel_reg.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/staging/mrst/drv/psb_intel_hdmi.c b/drivers/staging/mrst/drv/psb_intel_hdmi.c index d6f5194..a583117 100644 --- a/drivers/staging/mrst/drv/psb_intel_hdmi.c +++ b/drivers/staging/mrst/drv/psb_intel_hdmi.c @@ -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) { diff --git a/drivers/staging/mrst/drv/psb_intel_reg.h b/drivers/staging/mrst/drv/psb_intel_reg.h index 985da5a..b734f77 100644 --- a/drivers/staging/mrst/drv/psb_intel_reg.h +++ b/drivers/staging/mrst/drv/psb_intel_reg.h @@ -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) -- 2.7.4