aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_lvds.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-12-02 18:36:21 -0500
committerChris Wilson <chris@chris-wilson.co.uk>2010-12-02 18:50:36 -0500
commitb9e68670cc3a13166b389ce847af19b0d0d33c67 (patch)
treebb79d91266490fa5bfe77cfef53ead8a1f7a62f6 /drivers/gpu/drm/i915/intel_lvds.c
parent60de2ba51eaba9eefcc355cb20c8582b1481e755 (diff)
parent5bddd17fec58f253cddd0bc9eab2cd9eb1bbab4a (diff)
Merge branch 'drm-intel-fixes' into drm-intel-next
Conflicts: drivers/gpu/drm/i915/intel_drv.h
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lvds.c')
-rw-r--r--drivers/gpu/drm/i915/intel_lvds.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 5b88e145ee79..23247b235e68 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -840,7 +840,7 @@ static bool intel_lvds_ddc_probe(struct drm_device *dev, u8 pin)
840 * Create the connector, register the LVDS DDC bus, and try to figure out what 840 * Create the connector, register the LVDS DDC bus, and try to figure out what
841 * modes we can display on the LVDS panel (if present). 841 * modes we can display on the LVDS panel (if present).
842 */ 842 */
843void intel_lvds_init(struct drm_device *dev) 843bool intel_lvds_init(struct drm_device *dev)
844{ 844{
845 struct drm_i915_private *dev_priv = dev->dev_private; 845 struct drm_i915_private *dev_priv = dev->dev_private;
846 struct intel_lvds *intel_lvds; 846 struct intel_lvds *intel_lvds;
@@ -856,37 +856,37 @@ void intel_lvds_init(struct drm_device *dev)
856 856
857 /* Skip init on machines we know falsely report LVDS */ 857 /* Skip init on machines we know falsely report LVDS */
858 if (dmi_check_system(intel_no_lvds)) 858 if (dmi_check_system(intel_no_lvds))
859 return; 859 return false;
860 860
861 pin = GMBUS_PORT_PANEL; 861 pin = GMBUS_PORT_PANEL;
862 if (!lvds_is_present_in_vbt(dev, &pin)) { 862 if (!lvds_is_present_in_vbt(dev, &pin)) {
863 DRM_DEBUG_KMS("LVDS is not present in VBT\n"); 863 DRM_DEBUG_KMS("LVDS is not present in VBT\n");
864 return; 864 return false;
865 } 865 }
866 866
867 if (HAS_PCH_SPLIT(dev)) { 867 if (HAS_PCH_SPLIT(dev)) {
868 if ((I915_READ(PCH_LVDS) & LVDS_DETECTED) == 0) 868 if ((I915_READ(PCH_LVDS) & LVDS_DETECTED) == 0)
869 return; 869 return false;
870 if (dev_priv->edp.support) { 870 if (dev_priv->edp.support) {
871 DRM_DEBUG_KMS("disable LVDS for eDP support\n"); 871 DRM_DEBUG_KMS("disable LVDS for eDP support\n");
872 return; 872 return false;
873 } 873 }
874 } 874 }
875 875
876 if (!intel_lvds_ddc_probe(dev, pin)) { 876 if (!intel_lvds_ddc_probe(dev, pin)) {
877 DRM_DEBUG_KMS("LVDS did not respond to DDC probe\n"); 877 DRM_DEBUG_KMS("LVDS did not respond to DDC probe\n");
878 return; 878 return false;
879 } 879 }
880 880
881 intel_lvds = kzalloc(sizeof(struct intel_lvds), GFP_KERNEL); 881 intel_lvds = kzalloc(sizeof(struct intel_lvds), GFP_KERNEL);
882 if (!intel_lvds) { 882 if (!intel_lvds) {
883 return; 883 return false;
884 } 884 }
885 885
886 intel_connector = kzalloc(sizeof(struct intel_connector), GFP_KERNEL); 886 intel_connector = kzalloc(sizeof(struct intel_connector), GFP_KERNEL);
887 if (!intel_connector) { 887 if (!intel_connector) {
888 kfree(intel_lvds); 888 kfree(intel_lvds);
889 return; 889 return false;
890 } 890 }
891 891
892 if (!HAS_PCH_SPLIT(dev)) { 892 if (!HAS_PCH_SPLIT(dev)) {
@@ -1029,7 +1029,7 @@ out:
1029 /* keep the LVDS connector */ 1029 /* keep the LVDS connector */
1030 dev_priv->int_lvds_connector = connector; 1030 dev_priv->int_lvds_connector = connector;
1031 drm_sysfs_connector_add(connector); 1031 drm_sysfs_connector_add(connector);
1032 return; 1032 return true;
1033 1033
1034failed: 1034failed:
1035 DRM_DEBUG_KMS("No LVDS modes found, disabling.\n"); 1035 DRM_DEBUG_KMS("No LVDS modes found, disabling.\n");
@@ -1037,4 +1037,5 @@ failed:
1037 drm_encoder_cleanup(encoder); 1037 drm_encoder_cleanup(encoder);
1038 kfree(intel_lvds); 1038 kfree(intel_lvds);
1039 kfree(intel_connector); 1039 kfree(intel_connector);
1040 return false;
1040} 1041}