aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-09-24Merge branch 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intelLinus Torvalds20-451/+2692
* 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel: (57 commits) drm/i915: Handle ERESTARTSYS during page fault drm/i915: Warn before mmaping a purgeable buffer. drm/i915: Track purged state. drm/i915: Remove eviction debug spam drm/i915: Immediately discard any backing storage for uneeded objects drm/i915: Do not mis-classify clean objects as purgeable drm/i915: Whitespace correction for madv drm/i915: BUG_ON page refleak during unbind drm/i915: Search harder for a reusable object drm/i915: Clean up evict from list. drm/i915: Add tracepoints drm/i915: framebuffer compression for GM45+ drm/i915: split display functions by chip type drm/i915: Skip the sanity checks if the current relocation is valid drm/i915: Check that the relocation points to within the target drm/i915: correct FBC update when pipe base update occurs drm/i915: blacklist Acer AspireOne lid status ACPI: make ACPI button funcs no-ops if not built in drm/i915: prevent FIFO calculation overflows on 32 bits with high dotclocks drm/i915: intel_display.c handle latency variable efficiently ... Fix up trivial conflicts in drivers/gpu/drm/i915/{i915_dma.c|i915_drv.h}
2009-09-23Merge branch 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6Linus Torvalds5-123/+102
* 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/radeon/r600: set correct pitch for 4 byte copy drm/radeon: consolidate family flags used in pciids.
2009-09-22drm/i915: Handle ERESTARTSYS during page faultChris Wilson1-17/+12
During a page fault and rebinding the buffer there exists a window for a signal to arrive during the i915_wait_request() and trigger a ERESTARTSYS. This used to be handled by returning SIGBUS and thereby killing the application. Try 'cairo-perf-trace & cairo-test-suite' and watch X go boom! The solution as suggested by H. Peter Anvin is to simply return NOPAGE and leave the higher layers to spot we did not fill the page and resubmit the page fault. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org [anholt: Mostly squash it with another commit]
2009-09-23drm/radeon/r600: set correct pitch for 4 byte copyAndre Maasikas2-2/+2
[agd5f: also fix the non-kms path] Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2009-09-23drm/radeon: consolidate family flags used in pciids.Dave Airlie3-121/+100
having these separate was pointless and introduced a bug when one got updated without the other. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-23drm/i915: Warn before mmaping a purgeable buffer.Chris Wilson1-0/+8
Only allow the user to mmap buffers that have not been marked as purgeable. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-23drm/i915: Track purged state.Chris Wilson1-9/+15
In order to correctly prevent the invalid reuse of a purged buffer, we need to track such events and warn the user before something bad happens. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-23drm/i915: Remove eviction debug spamChris Wilson1-33/+7
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-23drm/i915: Immediately discard any backing storage for uneeded objectsChris Wilson1-0/+5
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-23drm/i915: Do not mis-classify clean objects as purgeableChris Wilson1-29/+26
Whilst cleaning up the patches for submission, I mis-classified non-dirty objects as purgeable. This was causing the backing pages for those objects to be evicted under memory-pressure, discarding valid and unreplaceable texture data. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-23drm/i915: Whitespace correction for madvChris Wilson1-2/+2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-23drm/i915: BUG_ON page refleak during unbindChris Wilson1-0/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-23drm/i915: Search harder for a reusable objectChris Wilson1-21/+22
As evict_something() is called by routines that do not repeatedly search again, try harder in the initial search to find an object that matches the request. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-23drm/i915: Clean up evict from list.Chris Wilson1-25/+14
First the routine attempted to unlock a mutex it did not own along the error path. Secondly the routine should never be called on any list but the inactive one, since we attempt to unbind those objects, so fix the calling semantics. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-23drm/i915: Add tracepointsChris Wilson6-16/+447
By adding tracepoint equivalents for WATCH_BUF/EXEC we are able to monitor the lifetimes of objects, requests and significant events. These events can then be probed using the tracing frameworks, such as systemtap and, in particular, perf. For example to record the stack trace for every GPU stall during a run, use $ perf record -e i915:i915_gem_request_wait_begin -c 1 -g And $ perf report to view the results. [Updated to fix compilation issues caused.] Cc: Arjan van de Ven <arjan@linux.intel.com> Cc: Ben Gamari <bgamari@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-22Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivialLinus Torvalds2-3/+3
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits) trivial: fix typo in aic7xxx comment trivial: fix comment typo in drivers/ata/pata_hpt37x.c trivial: typo in kernel-parameters.txt trivial: fix typo in tracing documentation trivial: add __init/__exit macros in drivers/gpio/bt8xxgpio.c trivial: add __init macro/ fix of __exit macro location in ipmi_poweroff.c trivial: remove unnecessary semicolons trivial: Fix duplicated word "options" in comment trivial: kbuild: remove extraneous blank line after declaration of usage() trivial: improve help text for mm debug config options trivial: doc: hpfall: accept disk device to unload as argument trivial: doc: hpfall: reduce risk that hpfall can do harm trivial: SubmittingPatches: Fix reference to renumbered step trivial: fix typos "man[ae]g?ment" -> "management" trivial: media/video/cx88: add __init/__exit macros to cx88 drivers trivial: fix typo in CONFIG_DEBUG_FS in gcov doc trivial: fix missing printk space in amd_k7_smp_check trivial: fix typo s/ketymap/keymap/ in comment trivial: fix typo "to to" in multiple files trivial: fix typos in comments s/DGBU/DBGU/ ...
2009-09-21drm/i915: framebuffer compression for GM45+Jesse Barnes4-26/+132
Add support for framebuffer compression on GM45 and above. Removes some unnecessary I915_HAS_FBC checks as well (this is now part of the FBC display function). Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-09-21drm/i915: split display functions by chip typeJesse Barnes2-98/+231
This patch splits out several of the display functions into a separate display function table to avoid tons of chipset specific if..else if..else if blocks all over. There are more opportunities for this (some noted in the structure defintition); so more cleanup patches will follow. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-09-21Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6Linus Torvalds119-41286/+21760
* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (133 commits) drm/vgaarb: add VGA arbitration support to the drm and kms. drm/radeon: some r420s have a CP race with the DMA engine. drm/radeon/r600/kms: rv670 is not DCE3 drm/radeon/kms: r420 idle after programming GA_ENHANCE drm/radeon/kms: more fixes to rv770 suspend/resume path. drm/radeon/kms: more alignment for rv770.c with r600.c drm/radeon/kms: rv770 blit init called too late. drm/radeon/kms: move around new init path code to avoid posting at init drm/radeon/r600: fix some issues with suspend/resume. drm/radeon/kms: disable VGA rendering engine before taking over VRAM drm/radeon/kms: Move radeon_get_clock_info() call out of radeon_clocks_init(). drm/radeon/kms: add initial connector properties drm/radeon/kms: Use surfaces for scanout / cursor byte swapping on big endian. drm/radeon/kms: don't fail if we fail to init GPU acceleration drm/r600/kms: fixup number of loops per blit calculation. drm/radeon/kms: reprogram format in set base. drm/radeon: avivo chips have no separate int bit for display drm/radeon/r600: don't do interrupts drm: fix _DRM_GEM addmap error message drm: update crtc x/y when only fb changes ... Fixed up trivial conflicts in firmware/Makefile due to network driver (cxgb3) and drm (mga/r128/radeon) firmware being listed next to each other.
2009-09-21trivial: remove unnecessary semicolonsJoe Perches2-3/+3
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-09-21trivial: fix typo "to to" in multiple filesAnand Gadiyar1-2/+2
Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-09-21drm/vgaarb: add VGA arbitration support to the drm and kms.Dave Airlie12-1/+130
VGA arb requires DRM support for non-kms drivers, to turn on/off irqs when disabling the mem/io regions. VGA arb requires KMS support for GPUs where we can turn off VGA decoding. Currently we know how to do this for intel and radeon kms drivers, which allows them to be removed from the arbiter. This patch comes from Fedora rawhide kernel. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-21drm/radeon: some r420s have a CP race with the DMA engine.Alex Deucher2-0/+26
This patch makes sure the CP doesn't DMA do VRAM while 2D is active by inserting a CP resync token. todo: port to kms. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-21drm/radeon/r600/kms: rv670 is not DCE3Alex Deucher1-1/+1
RV670 was using the wrong modesetting code. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-21drm/radeon/kms: r420 idle after programming GA_ENHANCEDave Airlie1-0/+5
https://bugs.freedesktop.org/show_bug.cgi?id=24041 The idle allows rs690 to startup properly. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-21drm/radeon/kms: more fixes to rv770 suspend/resume path.Dave Airlie2-10/+12
This resumes my RV730PRO (4650) RV770 (4850) fine. Still researching the RV4550 (RV710), resumes without X fine. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-19Driver-Core: extend devnode callbacks to provide permissionsKay Sievers1-2/+2
This allows subsytems to provide devtmpfs with non-default permissions for the device node. Instead of the default mode of 0600, null, zero, random, urandom, full, tty, ptmx now have a mode of 0666, which allows non-privileged processes to access standard device nodes in case no other userspace process applies the expected permissions. This also fixes a wrong assignment in pktcdvd and a checkpatch.pl complain. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-18drm/i915: Skip the sanity checks if the current relocation is validChris Wilson1-45/+47
If the presumed_offset as feed to userspace and returned to the kernel from a previous execbuffer is still valid, then we do not need to rewrite the relocation entry and may skip the offset sanity checks. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-09-18drm/i915: Check that the relocation points to within the targetChris Wilson1-0/+10
Eric noted a potential concern with the low bits not being strictly used as part of the absolute offset (instead part of the command stream to the GPU), but in practice that should not be an issue. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Tested-by: Andy Whitcroft <apw@canonical.com> Cc: Eric Anholt <eric@anholt.net> CC: stable@kernel.org Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-09-18drm/radeon/kms: more alignment for rv770.c with r600.cDave Airlie1-0/+5
Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-18drm/radeon/kms: rv770 blit init called too late.Dave Airlie1-5/+14
re-align with r600 code, to init blit earlier. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-18drm/radeon/kms: move around new init path code to avoid posting at initDave Airlie3-27/+101
We really don't want to post the card at init, it takes a relatively long time and isn't required, so split the resume path into a startup path called by both init/resume and separate resume entry point to do posting. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-18drm/radeon/r600: fix some issues with suspend/resume.Dave Airlie2-16/+21
a) don't zero gart table on gart enable b) move pinning shader object into resume path c) unpin shader object on suspend d) set cp ready to false after cp shutdown on suspend. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-18drm/radeon/kms: disable VGA rendering engine before taking over VRAMDave Airlie4-0/+20
Before we use any of VRAM, we need to disable the VGA rendering engine, this render text mode into a graphical framebuffer for scanout, however it does this on vblank, and can end up overwriting the GART table and r600 shader objects. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-18drm/radeon/kms: Move radeon_get_clock_info() call out of radeon_clocks_init().Michel Dänzer3-2/+4
Someone on IRC reported problems after commit 95a8f1bf4f48b434c9f839ab5a0773f66b39d7c6 ('drm/radeon/kms: Move radeon_clocks_init() call back after getting VRAM info.'). And indeed, at least some ASIC vram_info hooks use the clock info obtained by radeon_get_clock_info(). So, move that call out of radeon_clocks_init(), ahead of the radeon_vram_info() call. [airlied - fixup missing r600/rv770 calls] Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com> drm/radeon/kms: fix get clock info calls for r600/rv770 init path. These were missed when it got split out. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-18drm/radeon/kms: add initial connector propertiesDave Airlie7-62/+376
This adds: coherent mode: TMDS coherent mode for atom cards. scaling mode: LVDS scaler mode load detect: DAC load detection, DVI-I, VGA, TV tmds pll: legacy TMDS pll selection tv standard: TV standard selection. for later: other TV ones? dvi subconnector selection using std prop [contains fixes pointed out on dri-devel for atom bios mixups by Michel] Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-18drm/radeon/kms: Use surfaces for scanout / cursor byte swapping on big endian.Michel Dänzer3-103/+25
Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-18drm/radeon/kms: don't fail if we fail to init GPU accelerationJerome Glisse6-56/+60
Userspace can query if acceleration is working or not true get info ioctl and could fallback to software if for some reason kernel failed to initialize KMS. This should allow to give a working KMS setup in all case (even with non functionning accel). Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-18drm/r600/kms: fixup number of loops per blit calculation.Dave Airlie1-7/+14
Some people were seeing *ERROR* radeon: writting more dword to ring than expected after certain blits, the loops calculation didn't take into account that we do a separate blit for the remainder after doing the aligned blits. Acked-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-18drm/radeon/kms: reprogram format in set base.Dave Airlie2-0/+46
This should in theory fix the problem with a mode set being required for adjusting the color depth. This also adds in the necessary bits to the format tables for 8-bit, though it doesn't work yet. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-18drm/radeon: avivo chips have no separate int bit for displayDave Airlie1-2/+0
display interrupts are not enabled via this register, the DISPLAY_INT bit is a status only to show that other regs need to be read. Noticed by Alex Deucher Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-18drm/radeon/r600: don't do interruptsAlex Deucher2-1/+22
Interrupts are not supported yet. This prevents things like mesa from trying to use them. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-18drm: fix _DRM_GEM addmap error messagePekka Paalanen1-2/+2
Fix the error message: this is add, not rm. Move the closing brace to proper spot: _DRM_GEM branch should not be included in the block. Signed-off-by: Pekka Paalanen <pq@iki.fi> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-18drm: update crtc x/y when only fb changesBen Skeggs1-0/+3
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-18drm: fix drm_fb_helper handling of kernel crtcsJesse Barnes1-37/+43
The drm_fb_helper shouldn't mess with CRTCs that aren't enabled or in its initial config. Ideally it shouldn't even include CRTCs in its initial config if they're not in use, but my old fix for that no longer works. At any rate, this fixes a real bug I was seeing where after a console blank, both pipes would come back on, even though only one had been enabled before that. Since the other pipe had a bogus config, this led to some screen corruption. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-17drm/i915: correct FBC update when pipe base update occursJesse Barnes1-3/+3
We usually don't have an SAREA, and we always want to update the FBC status anyway, so move the update up above the various master/sarea checks. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-09-17drm/i915: blacklist Acer AspireOne lid statusJesse Barnes1-1/+13
It reports closed when open, leading to "no outputs found" at startup unless a VGA cable is plugged in. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-09-17drm/i915: prevent FIFO calculation overflows on 32 bits with high dotclocksJesse Barnes1-1/+8
A very high dotclock (e.g. 229500kHz as reported by Anton) can cause the entries_required variable to overflow, potentially leading to a FIFO watermark value that's too low to support the given mode. Split the division across the calculation to avoid this. Cc: stable@kernel.org Reported-by: Anton Khirnov <wyskas@gmail.com> Tested-by: Anton Khirnov <wyskas@gmail.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-09-17drm/i915: intel_display.c handle latency variable efficientlyJaswinder Singh Rajput1-7/+6
By handling latency variable efficiently we also get rid of this warning : CC [M] drivers/gpu/drm/i915/intel_display.o drivers/gpu/drm/i915/intel_display.c: In function ‘igd_enable_cxsr’: drivers/gpu/drm/i915/intel_display.c:1918: warning: ‘latency’ may be used uninitialized in this function Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-09-17drm/i915: remove restore in resumeZhenyu Wang1-2/+0
Don't need extra config restore like for intel_agp, which might cause resume hang issue found by Alan on 845G. Cc: Stable Team <stable@kernel.org> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>