aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_lvds.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lvds.c')
-rw-r--r--drivers/gpu/drm/i915/intel_lvds.c64
1 files changed, 49 insertions, 15 deletions
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 6619f26e46a5..53cccfa58b95 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -343,11 +343,6 @@ static int intel_lvds_set_property(struct drm_connector *connector,
343 struct drm_property *property, 343 struct drm_property *property,
344 uint64_t value) 344 uint64_t value)
345{ 345{
346 struct drm_device *dev = connector->dev;
347
348 if (property == dev->mode_config.dpms_property && connector->encoder)
349 intel_lvds_dpms(connector->encoder, (uint32_t)(value & 0xf));
350
351 return 0; 346 return 0;
352} 347}
353 348
@@ -366,6 +361,7 @@ static const struct drm_connector_helper_funcs intel_lvds_connector_helper_funcs
366}; 361};
367 362
368static const struct drm_connector_funcs intel_lvds_connector_funcs = { 363static const struct drm_connector_funcs intel_lvds_connector_funcs = {
364 .dpms = drm_helper_connector_dpms,
369 .save = intel_lvds_save, 365 .save = intel_lvds_save,
370 .restore = intel_lvds_restore, 366 .restore = intel_lvds_restore,
371 .detect = intel_lvds_detect, 367 .detect = intel_lvds_detect,
@@ -384,7 +380,51 @@ static const struct drm_encoder_funcs intel_lvds_enc_funcs = {
384 .destroy = intel_lvds_enc_destroy, 380 .destroy = intel_lvds_enc_destroy,
385}; 381};
386 382
383static int __init intel_no_lvds_dmi_callback(const struct dmi_system_id *id)
384{
385 DRM_DEBUG("Skipping LVDS initialization for %s\n", id->ident);
386 return 1;
387}
388
389/* These systems claim to have LVDS, but really don't */
390static const struct dmi_system_id intel_no_lvds[] = {
391 {
392 .callback = intel_no_lvds_dmi_callback,
393 .ident = "Apple Mac Mini (Core series)",
394 .matches = {
395 DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
396 DMI_MATCH(DMI_PRODUCT_NAME, "Macmini1,1"),
397 },
398 },
399 {
400 .callback = intel_no_lvds_dmi_callback,
401 .ident = "Apple Mac Mini (Core 2 series)",
402 .matches = {
403 DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
404 DMI_MATCH(DMI_PRODUCT_NAME, "Macmini2,1"),
405 },
406 },
407 {
408 .callback = intel_no_lvds_dmi_callback,
409 .ident = "MSI IM-945GSE-A",
410 .matches = {
411 DMI_MATCH(DMI_SYS_VENDOR, "MSI"),
412 DMI_MATCH(DMI_PRODUCT_NAME, "A9830IMS"),
413 },
414 },
415 {
416 .callback = intel_no_lvds_dmi_callback,
417 .ident = "Dell Studio Hybrid",
418 .matches = {
419 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
420 DMI_MATCH(DMI_PRODUCT_NAME, "Studio Hybrid 140g"),
421 },
422 },
387 423
424 /* FIXME: add a check for the Aopen Mini PC */
425
426 { } /* terminating entry */
427};
388 428
389/** 429/**
390 * intel_lvds_init - setup LVDS connectors on this device 430 * intel_lvds_init - setup LVDS connectors on this device
@@ -404,15 +444,9 @@ void intel_lvds_init(struct drm_device *dev)
404 u32 lvds; 444 u32 lvds;
405 int pipe; 445 int pipe;
406 446
407 /* Blacklist machines that we know falsely report LVDS. */ 447 /* Skip init on machines we know falsely report LVDS */
408 /* FIXME: add a check for the Aopen Mini PC */ 448 if (dmi_check_system(intel_no_lvds))
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; 449 return;
415 }
416 450
417 intel_output = kzalloc(sizeof(struct intel_output), GFP_KERNEL); 451 intel_output = kzalloc(sizeof(struct intel_output), GFP_KERNEL);
418 if (!intel_output) { 452 if (!intel_output) {
@@ -473,10 +507,10 @@ void intel_lvds_init(struct drm_device *dev)
473 } 507 }
474 508
475 /* Failed to get EDID, what about VBT? */ 509 /* Failed to get EDID, what about VBT? */
476 if (dev_priv->vbt_mode) { 510 if (dev_priv->lfp_lvds_vbt_mode) {
477 mutex_lock(&dev->mode_config.mutex); 511 mutex_lock(&dev->mode_config.mutex);
478 dev_priv->panel_fixed_mode = 512 dev_priv->panel_fixed_mode =
479 drm_mode_duplicate(dev, dev_priv->vbt_mode); 513 drm_mode_duplicate(dev, dev_priv->lfp_lvds_vbt_mode);
480 mutex_unlock(&dev->mode_config.mutex); 514 mutex_unlock(&dev->mode_config.mutex);
481 if (dev_priv->panel_fixed_mode) { 515 if (dev_priv->panel_fixed_mode) {
482 dev_priv->panel_fixed_mode->type |= 516 dev_priv->panel_fixed_mode->type |=