From: Seema Pandit Date: Mon, 6 Feb 2012 17:45:30 +0000 (-0800) Subject: panel type read from gct table for CTP. X-Git-Tag: 2.1b_release~1480 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eec713cbc47774d5051a45c38c9fdf4ddb2d2c06;p=kernel%2Fkernel-mfld-blackbay.git panel type read from gct table for CTP. 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 Reviewed-on: http://android.intel.com:8080/34166 Reviewed-by: Xu, Randy Reviewed-by: Ai, Ke Reviewed-by: Liu, Jim Reviewed-by: Tong, BoX Tested-by: Tong, BoX Reviewed-by: buildbot Tested-by: buildbot --- diff --git a/drivers/staging/mrst/drv/h8c7_vid.c b/drivers/staging/mrst/drv/h8c7_vid.c index 2450a73..1f2a81b 100644 --- a/drivers/staging/mrst/drv/h8c7_vid.c +++ b/drivers/staging/mrst/drv/h8c7_vid.c @@ -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"); diff --git a/drivers/staging/mrst/drv/mdfld_dsi_output.c b/drivers/staging/mrst/drv/mdfld_dsi_output.c index 1c53465..a680252 100755 --- a/drivers/staging/mrst/drv/mdfld_dsi_output.c +++ b/drivers/staging/mrst/drv/mdfld_dsi_output.c @@ -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"); diff --git a/drivers/staging/mrst/drv/psb_drv.c b/drivers/staging/mrst/drv/psb_drv.c index 48e2efe..0a1fe04 100644 --- a/drivers/staging/mrst/drv/psb_drv.c +++ b/drivers/staging/mrst/drv/psb_drv.c @@ -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; } diff --git a/drivers/staging/mrst/drv/tmd_6x10_vid.c b/drivers/staging/mrst/drv/tmd_6x10_vid.c index dc492e8..a67bfd2 100755 --- a/drivers/staging/mrst/drv/tmd_6x10_vid.c +++ b/drivers/staging/mrst/drv/tmd_6x10_vid.c @@ -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");