diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-04-01 07:38:50 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-04-09 12:04:10 -0400 |
commit | 618563e3945b9d0864154bab3c607865b557cecc (patch) | |
tree | 97c44d52272db4cb07c7a9bfa64e65678e65d4f7 /drivers/gpu/drm/i915/intel_display.c | |
parent | bc0daf488fc4a255733ad19fe0de995f4a4d745f (diff) |
drm/i915: Add a dual link lvds quirk for MacBook Pro 8,2
When booting with EFI, Apple botched this one up.
v2: Switch the quirk dmesg output to DRM_INFO.
v3: Actually git add the new things ...
Tested-by: Austin Lund <austin.lund@gmail.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42842
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 2bd08ef056d9..6ec81b43ffc0 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -24,6 +24,7 @@ | |||
24 | * Eric Anholt <eric@anholt.net> | 24 | * Eric Anholt <eric@anholt.net> |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/dmi.h> | ||
27 | #include <linux/cpufreq.h> | 28 | #include <linux/cpufreq.h> |
28 | #include <linux/module.h> | 29 | #include <linux/module.h> |
29 | #include <linux/input.h> | 30 | #include <linux/input.h> |
@@ -418,6 +419,24 @@ static void vlv_init_dpio(struct drm_device *dev) | |||
418 | POSTING_READ(DPIO_CTL); | 419 | POSTING_READ(DPIO_CTL); |
419 | } | 420 | } |
420 | 421 | ||
422 | static int intel_dual_link_lvds_callback(const struct dmi_system_id *id) | ||
423 | { | ||
424 | DRM_INFO("Forcing lvds to dual link mode on %s\n", id->ident); | ||
425 | return 1; | ||
426 | } | ||
427 | |||
428 | static const struct dmi_system_id intel_dual_link_lvds[] = { | ||
429 | { | ||
430 | .callback = intel_dual_link_lvds_callback, | ||
431 | .ident = "Apple MacBook Pro (Core i5/i7 Series)", | ||
432 | .matches = { | ||
433 | DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."), | ||
434 | DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro8,2"), | ||
435 | }, | ||
436 | }, | ||
437 | { } /* terminating entry */ | ||
438 | }; | ||
439 | |||
421 | static bool is_dual_link_lvds(struct drm_i915_private *dev_priv, | 440 | static bool is_dual_link_lvds(struct drm_i915_private *dev_priv, |
422 | unsigned int reg) | 441 | unsigned int reg) |
423 | { | 442 | { |
@@ -427,6 +446,9 @@ static bool is_dual_link_lvds(struct drm_i915_private *dev_priv, | |||
427 | if (i915_lvds_channel_mode > 0) | 446 | if (i915_lvds_channel_mode > 0) |
428 | return i915_lvds_channel_mode == 2; | 447 | return i915_lvds_channel_mode == 2; |
429 | 448 | ||
449 | if (dmi_check_system(intel_dual_link_lvds)) | ||
450 | return true; | ||
451 | |||
430 | if (dev_priv->lvds_val) | 452 | if (dev_priv->lvds_val) |
431 | val = dev_priv->lvds_val; | 453 | val = dev_priv->lvds_val; |
432 | else { | 454 | else { |