0N/A * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. 0N/A * Copyright (c) 2006-2007, 2013, Intel Corporation 0N/A * Copyright (c) 2006 Dave Airlie <airlied@linux.ie> 0N/A * Permission is hereby granted, free of charge, to any person obtaining a 0N/A * copy of this software and associated documentation files (the "Software"), 0N/A * to deal in the Software without restriction, including without limitation 0N/A * the rights to use, copy, modify, merge, publish, distribute, sublicense, 0N/A * and/or sell copies of the Software, and to permit persons to whom the 0N/A * Software is furnished to do so, subject to the following conditions: 0N/A * The above copyright notice and this permission notice (including the next 0N/A * paragraph) shall be included in all copies or substantial portions of the 0N/A * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 0N/A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 0N/A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 0N/A * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 0N/A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 0N/A * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 0N/A * DEALINGS IN THE SOFTWARE. 0N/A * Eric Anholt <eric@anholt.net> 0N/A * Dave Airlie <airlied@linux.ie> 0N/A * Jesse Barnes <jesse.barnes@intel.com> 173N/A/* Private structure for the integrated LVDS support */ /* gen2/3 store dither state in pfit control, needs to match */ /* The LVDS pin pair needs to be on before the DPLLs are enabled. * This is an exception to the general rule that mode_set doesn't turn /* set the corresponsding LVDS_BORDER bit */ /* Set the B0-B3 data pairs corresponding to whether we're going to * set the DPLLs for dual-channel mode or not. /* It would be nice to set 24 vs 18-bit mode (LVDS_A3_POWER_UP) * appropriately here, but we need to look more thoroughly into how * panels behave in the two modes. /* Set the dithering flag on LVDS as needed, note that there is no * special lvds dither control bit on pch-split platforms, dithering is * only controlled through the PIPECONF reg. */ /* Bspec wording suggests that LVDS port dithering only exists * Sets the power state for the panel. DRM_ERROR(
"timed out waiting for panel to power on\n");
DRM_ERROR(
"timed out waiting for panel to power off\n");
/* Should never happen!! */ * We have timings from the BIOS for the panel, put them in * to the adjusted mode. The CRTC will be set up for this mode, * with the panel scaling set up to source from the H/VDisplay * XXX: It would be nice to support lower refresh rates on the * panels to reduce power consumption, and perhaps match the * user's requested refresh rate. * The LVDS pin pair will already have been turned on in the * intel_crtc_mode_set since it has a large impact on the DPLL * Detect the LVDS connection. * Since LVDS doesn't have hotlug, we use the lid as a proxy. Open means * connected and closed means disconnected. We also send hotplug events as * needed, using lid status notification from the input layer. * Return the list of DDC modes if available, or the BIOS fixed mode otherwise. /* use cached edid if we have one */ /* The GPU hangs up on these systems if modeset is performed on LID open */ .
ident =
"Toshiba Tecra A11",
{ }
/* terminating entry */ * Lid events. Note the use of 'modeset_on_lid': * - we set it on lid close, and reset it on open * - we use it as a "only once" bit (ie we ignore * duplicate events where it was already properly * zero, since they restore the mode ("lid open"). * check and update the status of LVDS connector after receiving * the LID nofication event. /* Don't force modeset on machines where it causes a GPU lockup */ /* do modeset on next lid open event */ * intel_lvds_destroy - unregister and free LVDS structures * @connector: connector to free * Unregister the DDC bus for this connector then free the driver private /* OSOL_i915: drm_sysfs_connector_remove(connector); */ /* the LVDS scaling property is not changed */ * If the CRTC is enabled, the display will be changed * according to the new panel fitting mode. DRM_INFO(
"Skipping LVDS initialization for %s\n",
id->
ident);
/* These systems claim to have LVDS, but really don't */ .
ident =
"Apple Mac Mini (Core series)",
.
ident =
"Apple Mac Mini (Core 2 series)",
.
ident =
"MSI IM-945GSE-A",
.
ident =
"Dell Studio Hybrid",
.
ident =
"Dell OptiPlex FX170",
.
ident =
"AOpen Mini PC",
.
ident =
"AOpen Mini PC MP915",
.
ident =
"AOpen i915GMm-HFS",
.
ident =
"AOpen i45GMx-I",
.
ident =
"Aopen i945GTt-VFA",
.
ident =
"Clientron U800",
.
ident =
"Clientron E830",
.
ident =
"Asus EeeBox PC EB1007",
.
ident =
"Asus AT5NM10T-I",
.
ident =
"Hewlett-Packard HP t5740",
.
ident =
"Hewlett-Packard t5745",
.
ident =
"Hewlett-Packard st5747",
.
ident =
"MSI Wind Box DC500",
.
ident =
"Gigabyte GA-D525TUD",
.
ident =
"Supermicro X7SPA-H",
.
ident =
"Fujitsu Esprimo Q900",
{ }
/* terminating entry */ * intel_find_lvds_downclock - find the reduced downclock for LVDS in EDID * @connector: LVDS connector * Find the reduced downclock for LVDS in EDID. * If one mode has the same resolution with the fixed_panel * mode while they have the different refresh rate, it means * that the reduced downclock is found for the LVDS. In such * case we can set the different FPx0/1 to dynamically select * between low and high frequency. * The downclock is already found. But we * expect to find the lower downclock. /* We found the downclock for LVDS. */ "Normal clock %dKhz, downclock %dKhz\n",
* Enumerate the child dev array parsed from VBT to check whether * If it is present, return 1. * If it is not present, return false. * If no child dev is parsed from VBT, it assumes that the LVDS is present. * If the device type is not LFP, continue. * If the device type is 0x22, it is also regarded as LFP. * old for compatibility with some BIOSes. /* However, we cannot trust the BIOS writers to populate * the VBT correctly. Since LVDS requires additional * information from AIM blocks, a non-zero addin offset is * a good indicator that the LVDS is actually present. /* But even then some BIOS writers perform some black magic * and instantiate the device without reference to any * additional data. Trust that if the VBT was written into * the OpRegion then they have validated the LVDS's existence. /* use the module option value if specified */ /* BIOS should set the proper LVDS register value at boot, but * in reality, it doesn't set the value when the lid is closed; * we need to check "the value to be set" in VBT when LVDS * register is uninitialized. /* With the introduction of the PCH we gained a dedicated * LVDS presence pin, use it. */ /* Otherwise LVDS was only attached to mobile products, * except for the inglorious 830gm */ * intel_lvds_init - setup LVDS connectors on this device * Create the connector, register the LVDS DDC bus, and try to figure out what * modes we can display on the LVDS panel (if present). /* Skip init on machines we know falsely report LVDS */ //XXX if (dmi_check_system(intel_no_lvds)) /* create the scaling mode property */ * 1) check for EDID on DDC * 3) check to see if LVDS is already on * if none of the above, no panel * 4) make sure lid is open * if closed, act like it's not there for now * Attempt to get the fixed panel mode from DDC. Assume that the * preferred mode is the right one. /* Didn't get an EDID, so * Set wide sync ranges so we get all modes * handed to valid_mode for checking /* Failed to get EDID, what about VBT? */ * If we didn't get EDID, try checking if the panel is already turned * on. If so, assume that whatever is currently programmed is the /* Ironlake: FIXME if still fail, not try pipe mode now */ /* If we still don't have a mode after all that, give up. */ * Unlock registers and just // XXX dev_priv->lid_notifier.notifier_call = intel_lid_notify; /* XXX lack of acpi support if (acpi_lid_notifier_register(&dev_priv->lid_notifier)) { DRM_DEBUG("lid notifier registration failed\n"); dev_priv->lid_notifier.notifier_call = NULL; /* OSOL_i915: drm_sysfs_connector_add(connector); */