Gfx-Display: fixed the issue that HDMI can't display in ICS.
authorSophia Gong <sophia.gong@intel.com>
Thu, 1 Dec 2011 13:12:33 +0000 (21:12 +0800)
committerbuildbot <buildbot@intel.com>
Mon, 12 Dec 2011 07:04:59 +0000 (23:04 -0800)
BZ: 16029

HDMI encoder's detect callback doesn't go through the correct process
which checks HDMI connection status via MSIC and un-gates Display B
island, because the CONFIG_X86_MRST switch is turned off in ICS kernel
config.

Fixed the issue by using CONFIG_X86_MDFLD.

Note: as the HDMIObserver middleware hasn't been integrated into ICS,
we have to turn on HDMI by connecting it with PR2/3 during booting
system, or by using some libdrm based tools.

Change-Id: I031e3b6a108c36d0ba70ffcc8742fb5e31f1066a
Signed-off-by: Sophia Gong <sophia.gong@intel.com>
Reviewed-on: http://android.intel.com:8080/26682
Reviewed-by: Agarwal, Vaibhav <vaibhav.agarwal@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/staging/mrst/drv/psb_drv.c
drivers/staging/mrst/drv/psb_intel_display.c
drivers/staging/mrst/drv/psb_intel_display2.c
drivers/staging/mrst/drv/psb_intel_drv.h
drivers/staging/mrst/drv/psb_intel_hdmi.c
drivers/staging/mrst/drv/psb_powermgmt.c

index 6195895..e893df2 100755 (executable)
@@ -1100,7 +1100,7 @@ void hdmi_do_hotplug_wq(struct work_struct *work)
        atomic_inc(&dev_priv->hotplug_wq_done);
        /* notify user space of hotplug event via a uevent message */
 
-#ifdef CONFIG_X86_MRST
+#ifdef CONFIG_X86_MDFLD
        intel_scu_ipc_iowrite8(MSIC_VCC330CNT, VCC330_ON);
 
        intel_scu_ipc_ioread8(MSIC_HDMI_STATUS, &data);
@@ -1134,7 +1134,7 @@ void hdmi_do_audio_wq(struct work_struct *work)
                                           struct drm_psb_private,
                                           hdmi_audio_wq);
 
-#ifdef CONFIG_X86_MRST
+#ifdef CONFIG_X86_MDFLD
        intel_scu_ipc_iowrite8(MSIC_VCC330CNT, VCC330_ON);
        intel_scu_ipc_ioread8(MSIC_HDMI_STATUS, &data);
        DRM_INFO("hdmi_do_audio_wq: Checking for HDMI connection at boot\n");
index 868e608..27a3615 100644 (file)
@@ -948,7 +948,7 @@ void psb_intel_crtc_load_lut(struct drm_crtc *crtc)
        }
 }
 
-#ifndef CONFIG_X86_MRST
+#ifndef CONFIG_X86_MDFLD
 /**
  * Save HW states of giving crtc
  */
@@ -1430,7 +1430,7 @@ static void psb_intel_crtc_destroy(struct drm_crtc *crtc)
 {
        struct psb_intel_crtc *psb_intel_crtc = to_psb_intel_crtc(crtc);
 
-#ifndef CONFIG_X86_MRST
+#ifndef CONFIG_X86_MDFLD
        kfree(psb_intel_crtc->crtc_state);
 #endif
        drm_crtc_cleanup(crtc);
@@ -1451,7 +1451,7 @@ static const struct drm_crtc_helper_funcs mdfld_helper_funcs;
 const struct drm_crtc_funcs mdfld_intel_crtc_funcs;
 
 const struct drm_crtc_funcs psb_intel_crtc_funcs = {
-#ifndef CONFIG_X86_MRST
+#ifndef CONFIG_X86_MDFLD
        .save = psb_intel_crtc_save,
        .restore = psb_intel_crtc_restore,
 #endif
@@ -1481,7 +1481,7 @@ void psb_intel_crtc_init(struct drm_device *dev, int pipe,
        if (psb_intel_crtc == NULL)
                return;
 
-#ifndef CONFIG_X86_MRST
+#ifndef CONFIG_X86_MDFLD
        psb_intel_crtc->crtc_state =
                kzalloc(sizeof(struct psb_intel_crtc_state), GFP_KERNEL);
        if (!psb_intel_crtc->crtc_state) {
index 591d1f7..51d29ef 100755 (executable)
@@ -303,7 +303,7 @@ static int mdfld_intel_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)
 }
 
 const struct drm_crtc_funcs mdfld_intel_crtc_funcs = {
-#ifndef CONFIG_X86_MRST
+#ifndef CONFIG_X86_MDFLD
        .save = psb_intel_crtc_save,
        .restore = psb_intel_crtc_restore,
 #endif
index 262d990..91d587a 100644 (file)
@@ -187,7 +187,7 @@ struct psb_intel_crtc {
        u32 mode_flags;
 
 /*FIXME: Workaround to avoid MRST block.*/
-#ifndef CONFIG_X86_MRST
+#ifndef CONFIG_X86_MDFLD
        /* Saved Crtc HW states */
        struct psb_intel_crtc_state *crtc_state;
 #endif
index 86fd3f7..21a1227 100644 (file)
@@ -938,7 +938,7 @@ mdfld_hdmi_edid_detect(struct drm_connector *connector)
 static enum drm_connector_status mdfld_hdmi_detect(struct drm_connector
                                                   *connector)
 {
-#ifdef CONFIG_X86_MRST
+#ifdef CONFIG_X86_MDFLD
        struct drm_device *dev = connector->dev;
        struct drm_psb_private *dev_priv =
                (struct drm_psb_private *)dev->dev_private;
index 2e46ccc..661fb9b 100755 (executable)
@@ -1460,7 +1460,7 @@ void ospm_suspend_display(struct drm_device *dev)
 
                        /* turn off panel power */
                        ret = 0;
-#ifdef CONFIG_X86_MRST
+#ifdef CONFIG_X86_MDFLD
                        ret = intel_scu_ipc_simple_command(IPC_MSG_PANEL_ON_OFF, IPC_CMD_PANEL_OFF);
                        if (ret)
                                printk(KERN_WARNING "IPC 0xE9 failed to turn off pnl pwr. Error is: %x\n", ret);
@@ -1538,7 +1538,7 @@ void ospm_resume_display(struct pci_dev *pdev)
 
        }else{
                if (!dev_priv->iLVDS_enable) {
-#ifdef CONFIG_X86_MRST
+#ifdef CONFIG_X86_MDFLD
                        int ret=0;
                        ret = intel_scu_ipc_simple_command(IPC_MSG_PANEL_ON_OFF, IPC_CMD_PANEL_ON);
                        if (ret)