aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/intel_lvds.c47
1 files changed, 13 insertions, 34 deletions
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index cf8da644faf2..6d4f91265354 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -27,6 +27,7 @@
27 * Jesse Barnes <jesse.barnes@intel.com> 27 * Jesse Barnes <jesse.barnes@intel.com>
28 */ 28 */
29 29
30#include <linux/dmi.h>
30#include <linux/i2c.h> 31#include <linux/i2c.h>
31#include "drmP.h" 32#include "drmP.h"
32#include "drm.h" 33#include "drm.h"
@@ -403,6 +404,16 @@ void intel_lvds_init(struct drm_device *dev)
403 u32 lvds; 404 u32 lvds;
404 int pipe; 405 int pipe;
405 406
407 /* Blacklist machines that we know falsely report LVDS. */
408 /* FIXME: add a check for the Aopen Mini PC */
409
410 /* Apple Mac Mini Core Duo and Mac Mini Core 2 Duo */
411 if(dmi_match(DMI_PRODUCT_NAME, "Macmini1,1") ||
412 dmi_match(DMI_PRODUCT_NAME, "Macmini2,1")) {
413 DRM_DEBUG("Skipping LVDS initialization for Apple Mac Mini\n");
414 return;
415 }
416
406 intel_output = kzalloc(sizeof(struct intel_output), GFP_KERNEL); 417 intel_output = kzalloc(sizeof(struct intel_output), GFP_KERNEL);
407 if (!intel_output) { 418 if (!intel_output) {
408 return; 419 return;
@@ -456,7 +467,7 @@ void intel_lvds_init(struct drm_device *dev)
456 dev_priv->panel_fixed_mode = 467 dev_priv->panel_fixed_mode =
457 drm_mode_duplicate(dev, scan); 468 drm_mode_duplicate(dev, scan);
458 mutex_unlock(&dev->mode_config.mutex); 469 mutex_unlock(&dev->mode_config.mutex);
459 goto out; /* FIXME: check for quirks */ 470 goto out;
460 } 471 }
461 mutex_unlock(&dev->mode_config.mutex); 472 mutex_unlock(&dev->mode_config.mutex);
462 } 473 }
@@ -490,7 +501,7 @@ void intel_lvds_init(struct drm_device *dev)
490 if (dev_priv->panel_fixed_mode) { 501 if (dev_priv->panel_fixed_mode) {
491 dev_priv->panel_fixed_mode->type |= 502 dev_priv->panel_fixed_mode->type |=
492 DRM_MODE_TYPE_PREFERRED; 503 DRM_MODE_TYPE_PREFERRED;
493 goto out; /* FIXME: check for quirks */ 504 goto out;
494 } 505 }
495 } 506 }
496 507
@@ -498,38 +509,6 @@ void intel_lvds_init(struct drm_device *dev)
498 if (!dev_priv->panel_fixed_mode) 509 if (!dev_priv->panel_fixed_mode)
499 goto failed; 510 goto failed;
500 511
501 /* FIXME: detect aopen & mac mini type stuff automatically? */
502 /*
503 * Blacklist machines with BIOSes that list an LVDS panel without
504 * actually having one.
505 */
506 if (IS_I945GM(dev)) {
507 /* aopen mini pc */
508 if (dev->pdev->subsystem_vendor == 0xa0a0)
509 goto failed;
510
511 if ((dev->pdev->subsystem_vendor == 0x8086) &&
512 (dev->pdev->subsystem_device == 0x7270)) {
513 /* It's a Mac Mini or Macbook Pro.
514 *
515 * Apple hardware is out to get us. The macbook pro
516 * has a real LVDS panel, but the mac mini does not,
517 * and they have the same device IDs. We'll
518 * distinguish by panel size, on the assumption
519 * that Apple isn't about to make any machines with an
520 * 800x600 display.
521 */
522
523 if (dev_priv->panel_fixed_mode != NULL &&
524 dev_priv->panel_fixed_mode->hdisplay == 800 &&
525 dev_priv->panel_fixed_mode->vdisplay == 600) {
526 DRM_DEBUG("Suspected Mac Mini, ignoring the LVDS\n");
527 goto failed;
528 }
529 }
530 }
531
532
533out: 512out:
534 drm_sysfs_connector_add(connector); 513 drm_sysfs_connector_add(connector);
535 return; 514 return;