summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'drm-fixes' of ↵Linus Torvalds2009-06-2638-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/+0Star
| | | | | | | | | | | | | | | | | | | | 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-231-2/+1Star
| | | | | | | | | | | | | | | | | | | | | 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-231-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-231-28/+25Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-231-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-232-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-231-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-232-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-231-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-2223-201/+1933
| | |\
| | | * drm/i915: Generate 2MHz clock for display port aux channel I/O. Retry I/O.Keith Packard2009-06-191-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-191-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-191-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-191-57/+51Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-191-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-198-6/+1668
| | | | | | | | | | | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
| | | * drm/i915: add per-output hotplug callback for KMSKeith Packard2009-06-192-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-191-33/+21Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1912-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-221-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>
| * | | drm/radeon: Clear surface registers at initialization time.Michel Dänzer2009-06-241-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some PowerMac firmwares set up a tiling surface at the beginning of VRAM which messes us up otherwise. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
| * | | drm/radeon: Don't initialize acceleration related fields of struct fb_info.Michel Dänzer2009-06-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Might lure userspace into trying silly things otherwise. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
| * | | drm/radeon: fix radeon kms framebuffer deviceJerome Glisse2009-06-243-42/+19Star
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | smem.start is a physical address which kernel can remap to access video memory of the fb buffer. We now pin the fb buffer into vram by doing so we are loosing vram but fbdev need to be reworked to allow change in framebuffer address. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
| | |
| \ \
| \ \
| \ \
*---. \ \ Merge branches 'acerhdf', 'acpi-pci-bind', 'bjorn-pci-root', ↵Len Brown2009-06-241-1/+1
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | 'bugzilla-12904', 'bugzilla-13121', 'bugzilla-13396', 'bugzilla-13533', 'bugzilla-13612', 'c3_lock', 'hid-cleanups', 'misc-2.6.31', 'pdc-leak-fix', 'pnpacpi', 'power_nocheck', 'thinkpad_acpi', 'video' and 'wmi' into release
| | * | | ACPI: Add the reference count to avoid unloading ACPI video bus twiceZhao Yakui2009-06-241-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes both acpi video and i915 driver are compiled as modules. And there exists the strict dependency between the two drivers. The acpi video bus will be unloaded in course of unloading the i915 driver. If we unload the acpi video driver, then the kernel oops will be triggered. Add the reference count to avoid unloading the ACPI video bus twice. The reference count should be checked before unregistering the acpi video bus. If the reference count is already zero, it won't unregister it again. And after the acpi video bus is already unregistered, the reference count will be set to zero. http://bugzilla.kernel.org/show_bug.cgi?id=13396 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | | | drm/i915: enable GEM on PAE.Dave Airlie2009-06-191-5/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In theory now that the AGP subsystem is using struct page, we should have on problems enabling GEM on PAE systems. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | | drm/radeon: fix unused variables warningDave Airlie2009-06-191-2/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | just remove i variable left over from previous code. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | | agp: switch AGP to use page array instead of unsigned long arrayDave Airlie2009-06-194-9/+8Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This switches AGP to use an array of pages for tracking the pages allocated to the GART. This should enable GEM on PAE to work a lot better as we can pass highmem pages to the PAT code and it will do the right thing with them. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | | drm/radeon: command stream checker for r3xx-r5xx hardwareJerome Glisse2009-06-197-65/+611
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For security purpose we want to make sure the userspace process doesn't access memory beyond buffer it owns. To achieve this we need to check states the userspace program. For color buffer and zbuffer we check that the clipping register will discard access beyond buffers set as color or zbuffer. For vertex buffer we check that no vertex fetch will happen beyond buffer end. For texture we check various texture states (number of mipmap level, texture size, texture depth, ...) to compute the amount of memory the texture fetcher might access. The command stream checking impact the performances so far quick benchmark shows an average of 3% decrease in fps of various applications. It can be optimized a bit more by caching result of checking and thus avoid a full recheck if no states changed since last check. Note that this patch is still incomplete on checking side as it doesn't check 2d rendering states. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | | drm/radeon: Fully initialize LVDS info also when we can't get it from the ROM.Michel Dänzer2009-06-191-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | This makes the panel on my PowerBook light up. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | | radeon: Fix CP byte order on big endian architectures with KMS.Michel Dänzer2009-06-192-0/+4
| | | | | | | | | | | | | | | | Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | | drm/ttm: Add some powerpc cache flush code.Michel Dänzer2009-06-191-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | Optimise the powerpc flushing path for TTM. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | | radeon: Enable modesetting on non-x86.Michel Dänzer2009-06-191-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | | drm/radeon: Respect AGP cant_use_aperture flag.Michel Dänzer2009-06-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Some AGP devices can't map the aperture, radeon needs to tell TTM this. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | | drm: EDID endianness fixes.Michel Dänzer2009-06-192-49/+53
| | | | | | | | | | | | | | | | | | | | | | | | Mostly replacing bitfields with explicit masks and shifts. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | | drm/radeon: this VRAM vs aperture test is wrong, just remove it.Dave Airlie2009-06-191-6/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | Its quite valid to have VRAM < aperture size. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | | drm/ttm: fix an error path to exit function correctlyThomas Hellstrom2009-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Just a goto instead of a direct exit. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | | drm: Apply "Memory fragmentation from lost alignment blocks"Thomas Hellstrom2009-06-191-41/+7Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | also for the atomic path by using a common code-path. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | | ttm: Return -ERESTART when a signal interrupts bo eviction.Thomas Hellstrom2009-06-191-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A bug caused the ttm code to just terminate the wait when a signal was received while waiting for the GPU to release a buffer object that was to be evicted. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | | drm: Remove memory debugging infrastructure.Eric Anholt2009-06-1839-523/+324Star
| |_|/ |/| | | | | | | | | | | | | | | | | | | | It hasn't been used in ages, and having the user tell your how much memory is being freed at free time is a recipe for disaster even if it was ever used. Signed-off-by: Eric Anholt <eric@anholt.net>
* | | drm/i915: Clear fence register on tiling stride change.Chris Wilson2009-06-183-17/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fence register value also depends upon the stride of the object, so we need to clear the fence if that is changed as well. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> [anholt: Added 8xx and 965 paths, and renamed the confusing i915_gem_object_tiling_ok function to i915_gem_object_fence_offset_ok] Signed-off-by: Eric Anholt <eric@anholt.net>
* | | drm/i915: Install fence register for tiled scanout on i915Chris Wilson2009-06-183-10/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the work by Jesse Barnes to eliminate allocation of fences during execbuffer, it becomes possible to write to the scan-out buffer with it never acquiring a fence (simply by only ever writing to the object using tiled GPU commands and never writing to it via the GTT). So for pre-i965 chipsets which require fenced access for tiled scan-out buffers, we need to obtain a fence register. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>