diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-02-09 04:35:53 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-02-15 10:41:34 -0500 |
commit | f3cfcba60fcfdce89f9332dc6c31137309d33c8a (patch) | |
tree | cbf52b14b009ef352761fdd38c22f14c2d577a7d | |
parent | ee4f42b10bbc404579c2e6f446b24d898592753c (diff) |
drm/i915/lvds: Always use the presence pin for LVDS on PCH
With the introduction of the PCH, we gained an LVDS presence pin but we
continued to use the existing logic that asserted that LVDS was only
supported on certain mobile chipsets. However, there are desktop
IronLake systems with LVDS attached which we fail to detect. So for PCH,
trust the LVDS presence pin and quirk all the lying manufacturers.
Tested-by: Daniel Woff <wolff.daniel@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43171
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_lvds.c | 15 |
2 files changed, 17 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index a12159e53aef..cdcf99bf9de8 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -7755,10 +7755,9 @@ static void intel_setup_outputs(struct drm_device *dev) | |||
7755 | struct drm_i915_private *dev_priv = dev->dev_private; | 7755 | struct drm_i915_private *dev_priv = dev->dev_private; |
7756 | struct intel_encoder *encoder; | 7756 | struct intel_encoder *encoder; |
7757 | bool dpd_is_edp = false; | 7757 | bool dpd_is_edp = false; |
7758 | bool has_lvds = false; | 7758 | bool has_lvds; |
7759 | 7759 | ||
7760 | if (IS_MOBILE(dev) && !IS_I830(dev)) | 7760 | has_lvds = intel_lvds_init(dev); |
7761 | has_lvds = intel_lvds_init(dev); | ||
7762 | if (!has_lvds && !HAS_PCH_SPLIT(dev)) { | 7761 | if (!has_lvds && !HAS_PCH_SPLIT(dev)) { |
7763 | /* disable the panel fitter on everything but LVDS */ | 7762 | /* disable the panel fitter on everything but LVDS */ |
7764 | I915_WRITE(PFIT_CONTROL, 0); | 7763 | I915_WRITE(PFIT_CONTROL, 0); |
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index aa84832b0e1a..b103c3b2bfee 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
@@ -844,6 +844,18 @@ static bool lvds_is_present_in_vbt(struct drm_device *dev, | |||
844 | return false; | 844 | return false; |
845 | } | 845 | } |
846 | 846 | ||
847 | static bool intel_lvds_supported(struct drm_device *dev) | ||
848 | { | ||
849 | /* With the introduction of the PCH we gained a dedicated | ||
850 | * LVDS presence pin, use it. */ | ||
851 | if (HAS_PCH_SPLIT(dev)) | ||
852 | return true; | ||
853 | |||
854 | /* Otherwise LVDS was only attached to mobile products, | ||
855 | * except for the inglorious 830gm */ | ||
856 | return IS_MOBILE(dev) && !IS_I830(dev); | ||
857 | } | ||
858 | |||
847 | /** | 859 | /** |
848 | * intel_lvds_init - setup LVDS connectors on this device | 860 | * intel_lvds_init - setup LVDS connectors on this device |
849 | * @dev: drm device | 861 | * @dev: drm device |
@@ -865,6 +877,9 @@ bool intel_lvds_init(struct drm_device *dev) | |||
865 | int pipe; | 877 | int pipe; |
866 | u8 pin; | 878 | u8 pin; |
867 | 879 | ||
880 | if (!intel_lvds_supported(dev)) | ||
881 | return false; | ||
882 | |||
868 | /* Skip init on machines we know falsely report LVDS */ | 883 | /* Skip init on machines we know falsely report LVDS */ |
869 | if (dmi_check_system(intel_no_lvds)) | 884 | if (dmi_check_system(intel_no_lvds)) |
870 | return false; | 885 | return false; |