summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_lvds.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/i915/lvds: Always use 0 to disable the pfit controllerChris Wilson2011-01-111-0/+4
| | | | | | | | ... and just any combination of bits & ~PFIT_ENABLE. This way we do not attempt disable to the panel fitter controller uselessly upon intel_lvds_disable(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915/panel: Only record the backlight level when it is enabledChris Wilson2011-01-111-8/+2
| | | | | | | | | | | | | By tracking the current status of the backlight we can prevent recording the value of the current backlight when we have disabled it. And so prevent restoring it to 'off' after an unbalanced sequence of intel_lvds_disable/enable. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=22672 Tested-by: Alex Riesen <raa.lkml@gmail.com> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org
* Merge branch 'drm-intel-fixes' into drm-intel-nextChris Wilson2010-12-071-44/+54
|\ | | | | | | | | | | Conflicts: drivers/gpu/drm/i915/i915_gem.c drivers/gpu/drm/i915/intel_dp.c
| * drm/i915/lvds: Always restore panel-fitter when enabling the LVDSChris Wilson2010-12-051-44/+54
| | | | | | | | | | | | | | | | | | | | | | | | Linus Torvalds pointed out that our code was unbalanced when powering on the panel with respect to the power off sequence in that we were failing to restore the panel-fitter. The consequence of this would be that across a simple DPMS off/on for a non-native mode, without an intervening modeset, the panel fitter would remain disabled and the output would shift on the panel. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | drm/i915: Allow LVDS to be on pipe A for Ironlake+Chris Wilson2010-12-051-0/+2
| | | | | | | | | | | | | | | | Previously we enabled this for gen4, only to have to revert it due to it causing a large number of spurious wakeups. Try again hoping that the hardware has become more sane in the mean time... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | drm/i915/lvds: Connect the PWM to the LVDS pipeChris Wilson2010-12-051-3/+11
| | | | | | | | | | | | ... and do not just assume to always use pipe B. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | Merge branch 'drm-intel-fixes' into drm-intel-nextChris Wilson2010-12-021-9/+10
|\ \ | |/ | | | | | | Conflicts: drivers/gpu/drm/i915/intel_drv.h
| * drm/i915: Clear pfit registers when not used by any outputsChris Wilson2010-11-291-9/+10
| | | | | | | | | | | | | | | | | | | | | | ... otherwise the panel-fitter may be left enabled with random settings and cause unintended filtering (i.e. blurring of native modes on external panels). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31942 Reported-and-tested-by: Ben Kohler <bkohler@gmail.com> Tested-by: Ciprian Docan <docan@eden.rutgers.edu> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | drm/i915/lvds: Disable panel-fitter on gen4 for 1:1 scale factorsChris Wilson2010-12-011-12/+15
|/ | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: Fix LVDS fixed-mode regression from 219adae1Chris Wilson2010-11-091-5/+11
| | | | | | | | | | Commit 219adae1 cached the EDID found during LVDS init, but in the process prevented the init routine from discovering the preferred fixed-mode for the panel. This was causing us to guess the correct mode, which sometimes is wide of the mark. Reported-and-tested-by: Jon Masters <jonathan@jonmasters.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: Disable LVDS i2c probing when using GPIO bit bangingChris Wilson2010-09-281-0/+3
| | | | | | | This check only appears to succeed when using GMBUS, so we need to skip it if we have fallen back to using GPIO bit banging. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: Parse the eDP link configuration from the vBIOSChris Wilson2010-09-241-1/+1
| | | | | | | First step, lets have a look at the values for troublesome panels and see if they may be used to improve our link training. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915/lvds: Use the GMBUS pin if specified in VBTChris Wilson2010-09-241-8/+13
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: Remove unused dev_priv->panel_wants_ditherChris Wilson2010-09-241-1/+1
| | | | | | | This is now private to the DVO connector, remove it from the main device private. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915/lvds: Probe DDC on creationChris Wilson2010-09-241-0/+21
| | | | | | | Try to validate the panel's connection by writing to address 0xA0. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=18072 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915/lvds: Unlock the PP register when panel-fittingChris Wilson2010-09-211-2/+6
| | | | | | | | As we do not wait for the panel to turn off when we need to adjust the panel-fitting registers we also need to unlock the PLLs as with the non-pfit update path. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: INTEL_INFO->gen supercedes i8xx, i9xx, i965gChris Wilson2010-09-211-5/+5
| | | | | | | Avoid confusion between i965g meaning broadwater and the gen4+ chipset families. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: Cache LVDS EDIDChris Wilson2010-09-211-11/+8
| | | | | | | We assume that the panel is permenantly connected and that the EDID data is consistent from boot, so simply cache the whole EDID for the panel. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* Merge branch 'drm-intel-fixes' into HEADChris Wilson2010-09-211-2/+5
|\ | | | | | | | | | | Conflicts: drivers/char/agp/intel-agp.c drivers/gpu/drm/i915/intel_crt.c
| * drm: Use a nondestructive mode for output detect when polling (v2)Chris Wilson2010-09-141-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | v2: Julien Cristau pointed out that @nondestructive results in double-negatives and confusion when trying to interpret the parameter, so use @force instead. Much easier to type as well. ;-) And fix the miscompilation of vmgfx reported by Sedat Dilek. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm: Use a nondestructive mode for output detect when pollingChris Wilson2010-09-131-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Destructive load-detection is very expensive and due to failings elsewhere can trigger system wide stalls of up to 600ms. A simple first step to correcting this is not to invoke such an expensive and destructive load-detection operation automatically. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=29536 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16265 Reported-by: Bruno Prémont <bonbons@linux-vserver.org> Tested-by: Sitsofe Wheeler <sitsofe@yahoo.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/i915: use GMBUS to manage i2c linksChris Wilson2010-09-181-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the GMBUS interface rather than direct bit banging to grab the EDID over DDC (and for other forms of auxiliary communication with external display controllers). The hope is that this method will be much faster and more reliable than bit banging for fetching EDIDs from buggy monitors or through switches, though we still preserve the bit banging as a fallback in case GMBUS fails. Based on an original patch by Jesse Barnes. Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | drm/i915/i2c: Track the parent encoder rather than just the devChris Wilson2010-09-141-1/+2
| | | | | | | | | | | | | | | | The SDVO proxy i2c adapter wants to be able to use information stored in the encoder, so pass that through intel_i2c rather than iterate over all known encoders every time. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | drm/i915/lvds: Move private data to the connector from the device.Chris Wilson2010-09-131-77/+78
| | | | | | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | drm/i915/lvds: Remove incorrect mode lockingChris Wilson2010-09-131-7/+0
| | | | | | | | | | | | One doesn't need to hold the mode lock in order to duplicate a mode. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | drm/i915/lvds: Ensure panel is unlocked for Ironlake or the panel fitterChris Wilson2010-09-131-28/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 77d07fd9d73ef28689737c0952dbd5d6a5017743 introduced a regression where by not waiting for the panel to be turned off, left the panel and PLL registers locked across the modeset. Thus the panel remaining blank. As pointed out by Daniel Vetter, when testing LVDS it helps to open the laptop and look at the actual panel you are purporting to test. A second issue with the patch was that in order to modify the panel fitter before gen5, the pipe and the panel must have be completely powered down. So we wait. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | drm/i915/lvds: Remove busy wait for powering up the panel.Chris Wilson2010-09-121-5/+1
| | | | | | | | | | | | | | We just assume that it will happen in a timely manner. A variant of this patch was first written and tested by Arjan van de Van. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | drm/i915/lvds: Remove busy wait for powering down the panelChris Wilson2010-09-121-9/+2
| | | | | | | | | | | | | | Just assume that it will turn off... Reported-by: Sitsofe Wheeler <sitsofe@yahoo.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | drm/i915: Make the connector->encoder relationship explicitChris Wilson2010-09-091-7/+4
| | | | | | | | | | | | | | | | | | Currently we have a exact mapping of a connector onto an encoder for its whole lifetime. Make this an explicit property of the structure and so simplify the code. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
* | drm/i915: Use the direct mapping of pipe->crtcChris Wilson2010-09-091-1/+1
| | | | | | | | | | | | | | | | Why iterate all the crtcs to find the pipe, when we already know which crtc is attached to which pipe? Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
* | drm/i915: Rename intel_encoder->enc to base for consistencyChris Wilson2010-09-091-5/+5
| | | | | | | | | | | | | | | | [Patch is slightly larger than is strictly necessary to fixup surrounding checkpatch.pl errors.] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
* | drm/i915: Don't disable panel for modesetting if pfit hasn't changedMatthew Garrett2010-09-081-2/+19
| | | | | | | | | | | | | | | | | | It seems to be possible to program a new mode without disabling the panel if the panel fitter setup doesn't change. Add support for that. Signed-off-by: Matthew Garrett <mjg@redhat.com> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | drm/i915: Refactor panel backlight controlsChris Wilson2010-09-081-51/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two instances of code to control the panel backlight and neither handled the complete set of device variations. Fixes: Bug 29716 - [GM965] Regression: Backlight resets to minimum when changing resolution https://bugs.freedesktop.org/show_bug.cgi?id=29716 And a bug on one of my PineView boxes which overflowed the backlight value. Incorporates part of a similar patch by Matthew Garrett that exposes a native Intel backlight controller. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | drm/i915: Addin-offset is an unreliable indicator of LVDS presence (v2)Chris Wilson2010-09-081-20/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | My Samsung N210 has a VBT with DEVICE_TYPE_INT_LFP with a zero addin-offset. With the check in place, the panel was declared absent. v2: Only trust BIOS writers that have graduated to writing OpRegions. (We are all doomed.) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Zhao Yakui <yakui.zhao@intel.com> Cc: Adam Jackson <ajax@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
* | drm/i915: Drop the msleep parameter to wait_for()Chris Wilson2010-09-081-2/+2
|/ | | | | | | | | | | | Jesse's feedback from using the wait_for() macro was that the msleep argument was that it was superfluous and made the macro more difficult to use and to read. As the actually amount of time to sleep is not critical, the crucial part is to sleep and let the processor schedule something else whilst we wait for the event, replace the argument with a hardcoded value. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
* Revert "drm/i915: Allow LVDS on pipe A on gen4+"Chris Wilson2010-09-081-2/+0
| | | | | | | | | | | | | | | This reverts commit 0f3ee801b332d6ff22285386675fe5aaedf035c3. Enabling LVDS on pipe A was causing excessive wakeups on otherwise idle systems due to i915 interrupts. So restrict the LVDS to pipe B once more, whilst the issue is properly diagnosed. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16307 Reported-and-tested-by: Enrico Bandiello <enban@postal.uv.es> Poked-by: Florian Mickler <florian@mickler.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Adam Jackson <ajax@redhat.com> Cc: stable@kernel.org
* drm/i915: Ensure that while(INREG()) are bounded (v2)Chris Wilson2010-08-091-7/+5
| | | | | | | | | | | | | | Add a new macro, wait_for, to simplify the act of waiting on a register to change state. wait_for() takes three arguments, the condition to inspect on every loop, the maximum amount of time to wait and whether to yield the cpu for a length of time after each check. v2: Upgrade failure messages to DRM_ERROR on the suggestion of Eric Anholt. We do not expect to hit these conditions as they reflect programming errors, so if we do we want to be notified. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Enable aspect/centering panel fitting for Ironlake.Chris Wilson2010-08-091-22/+10
| | | | | | | | v2: Hook in DP paths to keep FULLSCREEN panel fitting on eDP. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Subclass intel_encoder.Chris Wilson2010-08-091-36/+26
| | | | | | | | | | Subclass intel_encoder to reduce the pointer dance through intel_encoder->dev_priv. 10 files changed, 896 insertions(+), 997 deletions(-) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Refactor panel fitting on the LVDS. (v2)Chris Wilson2010-08-011-194/+105
| | | | | | | | | | | | | | | | | Move the common routines into separate functions to not only increase readability, but also throwaway surplus code. In doing so, we review the calculation of the aspect preserving scaling and avoid the use of fixed-point until we need to calculate the accurate scale factor. v2: Improve comments as suggested by Jesse. 1 files changed, 105 insertions(+), 194 deletions(-) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Remove the redundant check for a fixed_panel_modeChris Wilson2010-08-011-17/+15
| | | | | | | | We already checked just a couple of lines above that we have found a fixed_panel_mode for the LVDS, so remove the surplus check. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
* gpu/drm/i915: Add a blacklist to omit modeset on LID openThomas Bächler2010-08-011-0/+23
| | | | | | | | | | | | On some machines (currently only the Toshiba Tecra A11 is known), the GPU locks up when modeset is forced on LID open. This patch adds a new DMI blacklist and omits modesetting for all matches. Fixes https://bugzilla.kernel.org/show_bug.cgi?id=15550 Signed-off-by: Thomas Bächler <thomas@archlinux.org> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: change default panel fitting mode to preserve aspect ratioJesse Barnes2010-07-011-2/+2
| | | | | | | | | | | | | We did this a long time ago in the DDX driver, but now this fix belongs in the kernel. Preserving the aspect ratio is a nicer default. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=18033. Tested-by: Josh Triplett <josh@freedesktop.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
* Merge remote branch 'anholt/drm-intel-next' of /home/airlied/kernel/drm-next ↵Dave Airlie2010-04-201-84/+27
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into drm-core-next * 'anholt/drm-intel-next' of /home/airlied/kernel/drm-next: (48 commits) agp/intel-gtt: kill previous_size assignments agp/intel-gtt: kill intel_i830_tlbflush agp/intel: split out gmch/gtt probe, part 1 agp/intel: kill mutli_gmch_chip agp/intel: uncoditionally reconfigure driver on resume agp/intel: split out the GTT support agp/intel: introduce intel-agp.h header file drm/i915: Don't touch PORT_HOTPLUG_EN in intel_dp_detect() drm/i915/pch: Use minimal number of FDI lanes (v2) drm/i915: Add the support of memory self-refresh on Ironlake drm/i915: Move Pineview CxSR and watermark code into update_wm hook. drm/i915: Only save/restore FBC on the platform that supports FBC drm/i915: Fix the incorrect argument for SDVO SET_TV_format command drm/i915: Add support of SDVO on Ibexpeak PCH drm/i915: Don't enable pipe/plane/VCO early (wait for DPMS on). drm/i915: do not read uninitialized ->dev_private Revert "drm/i915: Use a dmi quirk to skip a broken SDVO TV output." drm/i915: implement multifunction SDVO device support drm/i915: remove unused intel_pipe_get_connector() drm/i915: remove connector object in old output structure ...
| * drm/i915: convert LVDS driver to new encoder/connector structureZhenyu Wang2010-04-121-11/+23
| | | | | | | | | | Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: Allow LVDS on pipe A on gen4+Adam Jackson2010-04-121-0/+2
| | | | | | | | | | | | | | The gen4 docs say it works, so why not. Tested on Ironlake. Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: Remove dead KMS encoder save/restore code.Eric Anholt2010-04-121-71/+0
| | | | | | | | | | | | | | This was brought over from UMS, and used for a while until we decided that drm_helper_resume_force_mode was easier and more reliable, since it didn't require duplicating all the code deleted here. We just forgot to delete all that junk for a while.
| * drm/i915: change intel_ddc_get_modes() function parametersZhenyu Wang2010-04-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This one replaces original param for intel_ddc_get_modes() with DRM connector and i2c bus adapter instead. With explicit params, we won't require that a single driver structure must hold connector and DDC bus reference, which ease the conversion to splitted encoder/ connector model. It also clears up for some cases that we would steal other DDC bus for mode probe, like VGA analog DDC probe for DVI-I. Also it fixed a bug in old DVI-I probe handling, that failed to restore origin analog GPIO port. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* | Merge branch 'for-linus' of ↵Linus Torvalds2010-04-171-34/+47
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel: drm/i915: Ignore LVDS EDID when it is unavailabe or invalid drm/i915: Add no_lvds entry for the Clientron U800 drm/i915: Rename many remaining uses of "output" to encoder or connector. drm/i915: Rename intel_output to intel_encoder. agp/intel: intel_845_driver is an agp driver! drm/i915: introduce to_intel_bo helper drm/i915: Disable FBC on 915GM and 945GM.
| * drm/i915: Ignore LVDS EDID when it is unavailabe or invalidZhao Yakui2010-04-091-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This trys to shut up complains about invalid LVDS EDID during mode probe, but uses fixed panel mode directly for panels with broken EDID. https://bugs.freedesktop.org/show_bug.cgi?id=23099 https://bugs.freedesktop.org/show_bug.cgi?id=26395 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Tested-by: Sitsofe Wheeler <sitsofe@yahoo.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
OpenPOWER on IntegriCloud