summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
Commit message (Collapse)AuthorAgeFilesLines
* drm/i915: Fix for LVDS VBT change on IGDNGZhenyu Wang2009-07-101-1/+9
| | | | | | | | | IGDNG mobile chip's LVDS data block removes panel fitting register definition. So this fixes offset for LVDS timing block parsing. Thanks for Michael Fu to catch this. Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Zap the GTT mapping when transitioning from untiled to tiled.Eric Anholt2009-07-103-1/+8
| | | | | | | | As of 52dc7d32b88156248167864f77a9026abe27b432, we could leave an old linear GTT mapping in place, so that apps trying to GTT-mapped write in tiled data wouldn't get the fence added, and garbage would get displayed. Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Refactor calls to unmap_mapping_rangeChris Wilson2009-07-101-9/+27
| | | | | | | | As we call unmap_mapping_range() twice in identical fashion, refactor and attempt to explain why we need to call unmap_mapping_range(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Avoid saving/restore the modesetting registers twice in KMS modeZhao Yakui2009-07-101-100/+121
| | | | | | | | | | In KMS mode we now use the normal mode-setting paths to set the modes back to the current configuration, so we don't need to also run the more limited non-KMS implementation of modesetting for resume. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm: Disable the unused connectors explicitly when resuming with KMS.Zhao Yakui2009-07-101-0/+2
| | | | | | | Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Acked-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Restore the KMS modeset for every activated CRTCZhao Yakui2009-07-101-0/+5
| | | | | | | | | | | | | | Restore the modeset for every activated CRTC in course of resume. This is realized by calling the function of drm_helper_resume_force_mode. Note: it is meaningful only for the KMS mode. https://bugs.freedesktop.org/show_bug.cgi?id=21719 https://bugs.freedesktop.org/show_bug.cgi?id=21708 https://bugs.freedesktop.org/show_bug.cgi?id=22285 https://bugs.freedesktop.org/show_bug.cgi?id=22263 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Fix harmless warning from patch merged after i2c rework.Eric Anholt2009-07-101-1/+1
| | | | Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Disable GEM when a broken video BIOS takes up the whole aperture.Eric Anholt2009-07-101-9/+20
| | | | | | | | | | | | | | This is seen on some G41 systems, where the BIOS will consume all but a few KB of the aperture. This should be bad for all operating systems, as it means that the OS can't dynamically manage memory between graphics and the rest of the system, and OSes that did static memory management statically add memory in addition to the BIOS allocation anyway. So, instead of working around it, just fail out verbosely. fd.o bug #21574 Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* drm/i915: Check the LID device to decide whether the LVDS should be initializedZhao Yakui2009-07-091-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some boxes the mobile chipset is used and there is no LVDS device. In such case we had better not initialize the LVDS output device so that one pipe can be used for other output device. For example: E-TOP. But unfortunately the LVDS device is still initialized on the boxes based on mobile chipset in KMS mode. It brings that this pipe occupied by LVDS can't be used for other output device. After checking the acpidump we find that there is no LID device on such boxes. In such case we can use the LID device to decide whether the LVDS device should be initialized. If there is no LID device, we can think that there is no LVDS device. It is unnecessary to initialize the LVDS output device. If there exists the LID device, it will continue the current flowchart. Maybe on some boxes there is no LVDS device but the LID device is found. In such case it should be added to the quirk list. http://bugs.freedesktop.org/show_bug.cgi?id=21496 http://bugs.freedesktop.org/show_bug.cgi?id=21856 http://bugs.freedesktop.org/show_bug.cgi?id=21127 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> [anholt: squashed in style fixups] Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Move lock to more reasonable locationBen Gamari2009-07-071-2/+3
| | | | | | | | Make this consistent with the unlock statement. Also fix a minor typo in debugfs formatting Signed-off-by: Ben Gamari <bgamari.foss@gmail.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Add gtt_offset to gem object list debugfs outputBen Gamari2009-07-071-1/+4
| | | | | | | | This is quite useful for verifying that objects are actually mapped when they need to be. Signed-off-by: Ben Gamari <bgamari.foss@gmail.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Remove gtt_bound from drm_i915_gem_objectBen Gamari2009-07-071-3/+0
| | | | | | | | This wasn't even used as far as I could tell and will only confuse people (like me). Signed-off-by: Ben Gamari <bgamari.foss@gmail.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Disable VGA output when doing DRM_MODE_DPMS_OFF.ling.ma@intel.com2009-07-071-1/+1
| | | | | Signed-off-by: Ma Ling <ling.ma@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: crt fetch EDID by DVI-I converter on G4x platformling.ma@intel.com2009-07-071-1/+27
| | | | | | | | | | | | | Usually crt mainly get modes via GPIOA ports. However on G4X platform we need to probe possible ports for DVI-I, which could be wired to GPIOD, then fetch our desired EDID, i.e on DG45ID platform we successfully fetch EDID by GPIOD port. It fixed freedesktop.org bug #21084 Signed-off-by: Ma Ling <ling.ma@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Don't update display FIFO watermark on IGDNGZhenyu Wang2009-07-071-1/+1
| | | | | Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Adjust DisplayPort clocks to use 96MHz referenceKeith Packard2009-07-021-12/+9
| | | | | | | | | For some reason, the DP clocks were based off a 100MHz reference instead of the standard 96MHz reference. This caused some DP monitors to fail to lock to the signal. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Make driver less chattyKeith Packard2009-07-016-23/+27
| | | | | | | | Convert many printk calls to DRM_DEBUG calls to reduce kernel log noise for normal activities. Switch other printk calls to DRM_ERROR or DRM_INFO. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: fix up a raw 64bit divideAndy Whitcroft2009-07-011-1/+1
| | | | | | | | | | | | | | We are seeing compilation failures on i386 in some environments due to an undefined reference as below: ERROR: "__udivdi3" [drivers/gpu/drm/i915/i915.ko] undefined! This is generated due to a raw 64 bit divide in the i915 driver. Fix up this raw divide. Signed-off-by: Andy Whitcroft <apw@canonical.com> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: enable sdvo lvds scaling function.ling.ma@intel.com2009-07-012-12/+103
| | | | | | | | | | | | | | | Currently we implemented basic sdvo lvds function, But except for sdvo lvds fixed mode, we can not switch to other modes, otherwise display get black. The patch handle three operations to enable sdvo lvds. At first duplicate sdvo fixed mode for adjustment, then according to fixed mode line valid all modes, at last adjust input mode to fit our requirement. Acked by Li Peng <peng.li@linux.intel.com> Signed-off-by: Ma Ling <ling.ma@intel.com> Reviewed-by: Ian Romanick <idr@freedesktop.org> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Set SSC frequency for 8xx chips correctlyling.ma@intel.com2009-07-011-4/+6
| | | | | | | | All 8xx class chips have the 66/48 split, not just 855. Signed-off-by: Ma Ling <ling.ma@intel.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: add FIFO watermark supportShaohua Li2009-07-015-6/+513
| | | | | | | | | | | | | | | This patch from jbarnes and myself adds FIFO watermark control to the driver. This is needed for both power saving features on new platforms with the so-called "big FIFO" and for controlling FIFO allocation between pipes in multi-head configurations. It's also necessary infrastructure to support things like framebuffer compression and configuration supportability checks (i.e. checking a configuration against available bandwidth). Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: enable error detection & state collectionJesse Barnes2009-07-015-3/+204
| | | | | | | | | | | | This patch enables error detection by enabling several types of error interrupts. When an error interrupt is received, the interrupt handler captures the error state; hopefully resulting in an accurate set of error data (error type, active head pointer, etc.). The new record is then available from sysfs. The current code will also dump the error state to the system log. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
* Merge branch 'drm-fixes' of ↵Linus Torvalds2009-06-2538-316/+2376
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (28 commits) drm: remove unused #include <linux/version.h>'s drm/radeon: fix driver initialization order so radeon kms can be builtin drm: Fix shifts which were miscalculated when converting from bitfields. drm/radeon: Clear surface registers at initialization time. drm/radeon: Don't initialize acceleration related fields of struct fb_info. drm/radeon: fix radeon kms framebuffer device drm/i915: initialize fence registers to zero when loading GEM drm/i915: Fix HDMI regression introduced in new chipset support drm/i915: fix LFP data fetch drm/i915: set TV detection mode when tv is already connected drm/i915: Catch up to obj_priv->page_list rename in disabled debug code. drm/i915: Fix size_t handling in off-by-default debug printfs drm/i915: Don't change the blank/sync width when calculating scaled modes drm/i915: Add support for changing LVDS panel fitting using an output property. drm/i915: correct suspend/resume ordering drm/i915: Add missing dependency on Intel AGP support. drm/i915: Generate 2MHz clock for display port aux channel I/O. Retry I/O. drm/i915: Clarify error returns from display port aux channel I/O drm/i915: Add CLKCFG register definition drm/i915: Split array of DAC limits into separate structures. ...
| * drm: remove unused #include <linux/version.h>'sHuang Weiyi2009-06-243-3/+0
| | | | | | | | | | | | | | | | | | | | Remove unused #include <linux/version.h>('s) in drivers/gpu/drm/ttm/ttm_bo_util.c drivers/gpu/drm/ttm/ttm_bo_vm.c drivers/gpu/drm/ttm/ttm_tt.c Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * Merge remote branch 'origin/drm-intel-next' of ../drm-intel into drm-fixesDave Airlie2009-06-2429-261/+2327
| |\
| | * drm/i915: initialize fence registers to zero when loading GEMGrégoire Henry2009-06-231-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unitialized fence register could leads to corrupted display. Problem encountered on MacBooks (revision 1 and 2), directly booting from EFI or through BIOS emulation. (bug #21710 at freedestop.org) Signed-off-by: Grégoire Henry <henry@pps.jussieu.fr> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: Fix HDMI regression introduced in new chipset supportZhenyu Wang2009-06-221-2/+1
| | | | | | | | | | | | | | | | | | | | | Remove wrongly added NULL_PACKETS_DURING_VSYNC setting for HDMI. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: fix LFP data fetchJesse Barnes2009-06-221-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently the proper way to do this is to use the LFP data pointer block to figure out the LFP data block entry size, then use that plus the panel index to calculate an offset into the LFP data block array. Similar fix has already been pushed to the 2D driver to fix fdo bug applied to the VBIOS reader, and things look sane). Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: set TV detection mode when tv is already connectedling.ma@intel.com2009-06-221-28/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used load_detect_temp flag to determine whether to set tv to the test mode. However if the TV already has a mode set, we still need to set the test mode to determine connection. This results in blinking, but there is no other reliable way to determine TV connection. freedesktop.org bug #22035 Signed-off-by: Ma Ling <ling.ma@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: Catch up to obj_priv->page_list rename in disabled debug code.Krzysztof Halasa2009-06-221-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: Fix size_t handling in off-by-default debug printfsKrzysztof Halasa2009-06-222-4/+4
| | | | | | | | | | | | | | | Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: Don't change the blank/sync width when calculating scaled modesZhao Yakui2009-06-221-18/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, use the border instead of border minus one. At the same time, make sure the horizontal border and hsync are even for the LVDS that works in dual-channel mode. So both horizontal border and hsync start are also changed to be even, even for the LVDS in single-channel mode. https://bugs.freedesktop.org/show_bug.cgi?id=20951 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: Add support for changing LVDS panel fitting using an output property.Zhao Yakui2009-06-222-21/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the driver would always scale the chosen video mode to fill the panel. This adds 1:1 and maintain-aspect-ratio scaling modes. v2: the drm_calloc/drm_free is replaced by kzalloc/kfree based on Eric's suggestion. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: correct suspend/resume orderingJesse Barnes2009-06-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to save register state *after* idling GEM, clearing the ring, and uninstalling the IRQ handler, or we might end up saving bogus fence regs, for one. Our restore ordering should already be correct, since we do GEM, ring and IRQ init after restoring the last register state, which prevents us from clobbering things. I put this together to potentially address a bug, but I haven't heard back if it fixes it yet. However I think it stands on its own, so I'm sending it in. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * Merge commit 'keithp/drm-intel-next' into drm-intel-nextEric Anholt2009-06-2123-201/+1933
| | |\
| | | * drm/i915: Generate 2MHz clock for display port aux channel I/O. Retry I/O.Keith Packard2009-06-181-32/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The display port aux channel clock is taken from the hrawclk value, which is provided to the chip as the FSB frequency (as far as I can determine). The strapping values for that are available in the CLKCFG register, now used to select an appropriate divider to generate a 2MHz clock. In addition, the DisplayPort spec requires that each aux channel I/O be retried 'at least 3 times' in case the sink is idle when the first request comes in. Signed-off-by: Keith Packard <keithp@keithp.com>
| | | * drm/i915: Clarify error returns from display port aux channel I/OKeith Packard2009-06-181-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | Use distinct error return values for each kind of aux channel I/O failure. Signed-off-by: Keith Packard <keithp@keithp.com>
| | | * drm/i915: Add CLKCFG register definitionKeith Packard2009-06-181-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The CLKCFG register holds information about the GMCH plls and input clock values. Signed-off-by: Keith Packard <keithp@keithp.com>
| | | * drm/i915: Split array of DAC limits into separate structures.Keith Packard2009-06-181-57/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The array of DAC limits was only ever referenced with #defined constant offsets, and keeping those #define values in sync with the array itself was a nuisance. This will make future changes to the set of DAC limits less error-prone. Signed-off-by: Keith Packard <keithp@keithp.com>
| | | * drm/i915: Use hotplug callback to retrain DP linkKeith Packard2009-06-181-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a DP monitor is plugged back in, it needs to be retrained if it was active before. Signed-off-by: Keith Packard <keithp@keithp.com>
| | | * drm/i915: Add Display Port supportKeith Packard2009-06-188-6/+1668
| | | | | | | | | | | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
| | | * drm/i915: add per-output hotplug callback for KMSKeith Packard2009-06-182-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | This allows each output to deal with plug/unplug events as needed. Signed-off-by: Keith Packard <keithp@keithp.com>
| | | * drm/i915: Clean up SDVO i2c handlingKeith Packard2009-06-181-33/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminate the copy of i2c_bus in sdvo_priv. Eliminate local copies of i2c_bus and ddcbus. Eliminate unused settings of slave_addr. Signed-off-by: Keith Packard <keithp@keithp.com>
| | | * drm/i915: Change I2C api to pass around i2c_adaptersKeith Packard2009-06-1812-113/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing API passed around intel_i2c_chan pointers, which are dependent on the i2c bit-banging algo. This precluded the driver from using outputs which use a different algo. Switching to the more general i2c_adpater allows the driver to support non bit-banging DDC. This also required moving the slave address into the output private structures. Signed-off-by: Keith Packard <keithp@keithp.com>
| | | * drm/i915: check for CONFIG_PNP before using pnp functionKeith Packard2009-06-181-0/+2
| | | | | | | | | | | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
| | | * drm/i915: Apple DMI info has inconsistent SYS_VENDOR informationKeith Packard2009-06-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some machines say 'Apple Inc.' while others say 'Apple Computer, Inc'. Switch the test to just look for 'Apple' instead. Signed-off-by: Keith Packard <keithp@keithp.com>
| | | * drm/i915: Require digital monitor on HDMI ports for detectKeith Packard2009-06-181-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HDMI and DVI both require DDC/EDID on monitors, so use that to know when a monitor is connected as the hot-plug pins are shared with SDVO and DisplayPort Signed-off-by: Keith Packard <keithp@keithp.com>
| | * | drm/i915: Add missing dependency on Intel AGP support.Eric Anholt2009-06-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users could accidentally enable AGP but not the Intel AGP support, and get a DRM that doesn't probe as a result. Bug #22358. Signed-off-by: Eric Anholt <eric@anholt.net>
| * | | drm/radeon: fix driver initialization order so radeon kms can be builtinJerome Glisse2009-06-242-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TTM need to be initialized before radeon if KMS is enabled otherwise the kernel will crash hard. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
| * | | drm: Fix shifts which were miscalculated when converting from bitfields.Michel Dänzer2009-06-241-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like I managed to mess up most shifts when converting from bitfields. :( The patch below works on my Thinkpad T500 (as well as on my PowerBook, where the previous change worked as well, maybe out of luck...). I'd appreciate more testing and eyes looking over it though. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Tested-by: Michael Pyne <mpyne@kde.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
OpenPOWER on IntegriCloud