aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2009-05-05 10:00:25 -0400
committerEric Anholt <eric@anholt.net>2009-05-14 19:00:28 -0400
commit425d244c86700bdbc68d096c812336b6a5b9b4e9 (patch)
tree6214cdc6a5a6f6e771504db85c8f4d9e9e4a70d7 /drivers
parent802c7eb646848d769a07704c16f7a3bbec9e5829 (diff)
drm/i915: ignore LVDS on intel graphics systems that lie about having it
There are a number of small form factor desktop systems with Intel mobile graphics chips that lie and say they have an LVDS. With kernel mode-setting, this becomes a problem, and makes native resolution boot go haywire -- for example, my Dell Studio Hybrid, hooked to a 1920x1080 display claims to have a 1024x768 LVDS, and the resulting graphical boot on the 1920x1080 display uses only the top left 1024x768, and auto-configured X will end up only 1024x768 as well. With this change, graphical boot and X both do 1920x1080 as expected. Note that we're simply embracing and extending the early bail-out code in place for the Mac Mini here. The xorg intel driver uses pci subsystem device and vendor id for matching, while we're using dmi lookups here. The MSI addition is courtesy of and tested by Bill Nottingham. Signed-off-by: Jarod Wilson <jarod@redhat.com> Tested-by: Bill Nottingham <notting@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/intel_lvds.c54
1 files changed, 46 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 6619f26e46a5..439a86514993 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -384,7 +384,51 @@ static const struct drm_encoder_funcs intel_lvds_enc_funcs = {
384 .destroy = intel_lvds_enc_destroy, 384 .destroy = intel_lvds_enc_destroy,
385}; 385};
386 386
387static int __init intel_no_lvds_dmi_callback(const struct dmi_system_id *id)
388{
389 DRM_DEBUG("Skipping LVDS initialization for %s\n", id->ident);
390 return 1;
391}
387 392
393/* These systems claim to have LVDS, but really don't */
394static const struct dmi_system_id __initdata intel_no_lvds[] = {
395 {
396 .callback = intel_no_lvds_dmi_callback,
397 .ident = "Apple Mac Mini (Core series)",
398 .matches = {
399 DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
400 DMI_MATCH(DMI_PRODUCT_NAME, "Macmini1,1"),
401 },
402 },
403 {
404 .callback = intel_no_lvds_dmi_callback,
405 .ident = "Apple Mac Mini (Core 2 series)",
406 .matches = {
407 DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
408 DMI_MATCH(DMI_PRODUCT_NAME, "Macmini2,1"),
409 },
410 },
411 {
412 .callback = intel_no_lvds_dmi_callback,
413 .ident = "MSI IM-945GSE-A",
414 .matches = {
415 DMI_MATCH(DMI_SYS_VENDOR, "MSI"),
416 DMI_MATCH(DMI_PRODUCT_NAME, "A9830IMS"),
417 },
418 },
419 {
420 .callback = intel_no_lvds_dmi_callback,
421 .ident = "Dell Studio Hybrid",
422 .matches = {
423 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
424 DMI_MATCH(DMI_PRODUCT_NAME, "Studio Hybrid 140g"),
425 },
426 },
427
428 /* FIXME: add a check for the Aopen Mini PC */
429
430 { } /* terminating entry */
431};
388 432
389/** 433/**
390 * intel_lvds_init - setup LVDS connectors on this device 434 * intel_lvds_init - setup LVDS connectors on this device
@@ -404,15 +448,9 @@ void intel_lvds_init(struct drm_device *dev)
404 u32 lvds; 448 u32 lvds;
405 int pipe; 449 int pipe;
406 450
407 /* Blacklist machines that we know falsely report LVDS. */ 451 /* Skip init on machines we know falsely report LVDS */
408 /* FIXME: add a check for the Aopen Mini PC */ 452 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; 453 return;
415 }
416 454
417 intel_output = kzalloc(sizeof(struct intel_output), GFP_KERNEL); 455 intel_output = kzalloc(sizeof(struct intel_output), GFP_KERNEL);
418 if (!intel_output) { 456 if (!intel_output) {