panel type read from gct table for CTP.
authorSeema Pandit <seema.pandit@intel.com>
Mon, 6 Feb 2012 17:45:30 +0000 (09:45 -0800)
committerbuildbot <buildbot@intel.com>
Wed, 8 Feb 2012 09:55:36 +0000 (01:55 -0800)
BZ: 20804

This patch adds the support to read the panel type and timing info
from gct table for clovertrail platform. Depends on corresponding FW
changes in IFWI.

Change-Id: Ib47427bf0f43576c5a90b40eb0f5709816917ced
Signed-off-by: Seema Pandit <seema.pandit@intel.com>
Reviewed-on: http://android.intel.com:8080/34166
Reviewed-by: Xu, Randy <randy.xu@intel.com>
Reviewed-by: Ai, Ke <ke.ai@intel.com>
Reviewed-by: Liu, Jim <jim.liu@intel.com>
Reviewed-by: Tong, BoX <box.tong@intel.com>
Tested-by: Tong, BoX <box.tong@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/staging/mrst/drv/h8c7_vid.c
drivers/staging/mrst/drv/mdfld_dsi_output.c
drivers/staging/mrst/drv/psb_drv.c
drivers/staging/mrst/drv/tmd_6x10_vid.c

index 2450a73..1f2a81b 100644 (file)
@@ -548,6 +548,8 @@ struct drm_display_mode *h8c7_get_config_mode(struct drm_device *dev)
                (struct drm_psb_private *) dev->dev_private;
        struct mrst_timing_info *ti = &dev_priv->gct_data.DTD;
        bool use_gct = false; /*Disable GCT for now*/
+       if (IS_CTP(dev))
+               use_gct = true;
 
        PSB_DEBUG_ENTRY("\n");
 
index 1c53465..a680252 100755 (executable)
@@ -848,6 +848,8 @@ mdfld_dsi_get_configuration_mode(struct mdfld_dsi_config * dsi_config, int pipe)
                (struct drm_psb_private *) dev->dev_private;
        struct mrst_timing_info *ti = &dev_priv->gct_data.DTD;
        bool use_gct = false;
+       if (IS_CTP(dev))
+               use_gct = true;
 
        PSB_DEBUG_ENTRY("\n");
 
index 48e2efe..0a1fe04 100644 (file)
@@ -1049,18 +1049,40 @@ bool mrst_get_vbt_data(struct drm_psb_private *dev_priv)
 
        if (IS_MDFLD(dev_priv->dev)) {
                if (PanelID == GCT_DETECT) {
-                       if (dev_priv->gct_data.bpi == 2) {
-                               PSB_DEBUG_ENTRY("[GFX] PYR Panel Detected\n");
-                               dev_priv->panel_id = PYR_CMD;
-                               PanelID = PYR_CMD;
-                       } else if (dev_priv->gct_data.bpi == 0) {
-                               PSB_DEBUG_ENTRY("[GFX] TMD Panel Detected.\n");
-                               dev_priv->panel_id = TMD_VID;
-                               PanelID = TMD_VID;
+                       if (IS_CTP(dev_priv->dev)) {
+                               if (dev_priv->gct_data.bpi == 2) {
+                                       PSB_DEBUG_ENTRY(
+                                               "[GFX] TMD_6X10 panel Detected\n");
+                                       dev_priv->panel_id = TMD_6X10_VID;
+                                       PanelID = TMD_6X10_VID;
+                               } else if (dev_priv->gct_data.bpi == 1) {
+                                       PSB_DEBUG_ENTRY(
+                                               "[GFX] H8C7 panel Detected.\n");
+                                       dev_priv->panel_id = H8C7_VID;
+                                       PanelID = H8C7_VID;
+                               } else {
+                                       PSB_DEBUG_ENTRY(
+                                               "[GFX] Default panel H8C7.\n");
+                                       dev_priv->panel_id = H8C7_VID;
+                                       PanelID = H8C7_VID;
+                               }
                        } else {
-                               PSB_DEBUG_ENTRY("[GFX] Default Panel (TPO)\n");
-                               dev_priv->panel_id = TPO_CMD;
-                               PanelID = TPO_CMD;
+                               if (dev_priv->gct_data.bpi == 2) {
+                                       PSB_DEBUG_ENTRY(
+                                               "[GFX] PYR panel Detected\n");
+                                       dev_priv->panel_id = PYR_CMD;
+                                       PanelID = PYR_CMD;
+                               } else if (dev_priv->gct_data.bpi == 0) {
+                                       PSB_DEBUG_ENTRY(
+                                               "[GFX] TMD panel Detected.\n");
+                                       dev_priv->panel_id = TMD_VID;
+                                       PanelID = TMD_VID;
+                               } else {
+                                       PSB_DEBUG_ENTRY(
+                                               "[GFX] Default panel TPO.\n");
+                                       dev_priv->panel_id = TPO_CMD;
+                                       PanelID = TPO_CMD;
+                               }
                        }
                } else {
                        PSB_DEBUG_ENTRY("[GFX] Panel Parameter Passed in through cmd line\n");
@@ -1073,17 +1095,13 @@ bool mrst_get_vbt_data(struct drm_psb_private *dev_priv)
        PSB_DEBUG_ENTRY("[DISPLAY] %s: TMD_VID Panel\n", __func__);  /*DIV5-MM-DISPLAY-NC-LCM_INIT-01*/
 #endif
 
-#ifdef CONFIG_SUPPORT_TMD_MIPI_600X1024_DISPLAY
-               dev_priv->panel_id = TMD_6X10_VID;
-               PanelID = TMD_6X10_VID;
-               printk(KERN_ALERT"%s: TMD_6X10_VID Panel\n", __func__);
-#endif
-
-#ifdef CONFIG_SUPPORT_MIPI_H8C7_DISPLAY
-               dev_priv->panel_id = H8C7_VID;
-               PanelID = H8C7_VID;
-               printk(KERN_ALERT"%s: H8C7_VID Panel\n", __func__);
-#endif
+       if (IS_MDFLD_OLD(dev_priv->dev)) {
+               #ifdef CONFIG_SUPPORT_TMD_MIPI_600X1024_DISPLAY
+                       dev_priv->panel_id = TMD_6X10_VID;
+                       PanelID = TMD_6X10_VID;
+                       printk(KERN_ALERT"%s: TMD_6X10_VID Panel\n", __func__);
+               #endif
+       }
 
        return true;
 }
index dc492e8..a67bfd2 100755 (executable)
@@ -490,6 +490,8 @@ struct drm_display_mode *pr2_vid_get_config_mode(struct drm_device *dev)
                (struct drm_psb_private *) dev->dev_private;
        struct mrst_timing_info *ti = &dev_priv->gct_data.DTD;
        bool use_gct = false; /*Disable GCT for now*/
+       if (IS_CTP(dev))
+               use_gct = true;
 
        PSB_DEBUG_ENTRY("\n");