summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
AgeCommit message (Collapse)AuthorFilesLines
2009-09-30Merge branch 'drm-next' of ↵Linus Torvalds33-688/+2076
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (25 commits) drm/radeon/kms: Convert R520 to new init path and associated cleanup drm/radeon/kms: Convert RV515 to new init path and associated cleanup drm: fix radeon DRM warnings when !CONFIG_DEBUG_FS drm: fix drm_fb_helper warning when !CONFIG_MAGIC_SYSRQ drm/r600: fix memory leak introduced with 64k malloc avoidance fix. drm/kms: make fb helper work for all drivers. drm/radeon/r600: fix offset handling in CS parser drm/radeon/kms/r600: fix forcing pci mode on agp cards drm/radeon/kms: fix for the extra pages copying. drm/radeon/kms/r600: add support for vline relocs drm/radeon/kms: fix some bugs in vline reloc drm/radeon/kms/r600: clamp vram to aperture size drm/kms: protect against fb helper not being created. drm/r600: get values from the passed in IB not the copy. drm: create gitignore file for radeon drm/radeon/kms: remove unneeded master create/destroy functions. drm/kms: start adding command line interface using fb. fb: change rules for global rules match. drm/radeon/kms: don't require up to 64k allocations. (v2) drm/radeon/kms: enable dac load detection by default. ... Trivial conflicts in drivers/gpu/drm/radeon/radeon_asic.h due to adding '->vga_set_state' function pointers.
2009-09-29drm/radeon/kms: Convert R520 to new init path and associated cleanupJerome Glisse5-128/+376
Convert the r520 asic support to new init path, change are smaller than previous one as most of the architecture is now in place and more code sharing can happen btw various asics. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-09-29drm/radeon/kms: Convert RV515 to new init path and associated cleanupJerome Glisse11-158/+712
Convert the rv515 asic support to new init path also add an explanation in radeon.h about the new init path. There is also few cleanups associated with this change (others asic calling rv515 helper functions). Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-09-29drm: fix radeon DRM warnings when !CONFIG_DEBUG_FSMikael Pettersson1-4/+3
Compiling the radeon DRM driver with !CONFIG_DEBUG_FS throws the following warnings: drivers/gpu/drm/radeon/radeon_ttm.c: In function 'radeon_ttm_debugfs_init': drivers/gpu/drm/radeon/radeon_ttm.c:714: warning: unused variable 'i' drivers/gpu/drm/radeon/radeon_ttm.c: At top level: drivers/gpu/drm/radeon/radeon_ttm.c:692: warning: 'radeon_mem_types_list' defined but not used drivers/gpu/drm/radeon/radeon_ttm.c:693: warning: 'radeon_mem_types_names' defined but not used Fix: move these variables inside the #if defined(CONFIG_DEBUG_FS) block in radeon_ttm_debugsfs_init(), which is the only place using them. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-09-29drm: fix drm_fb_helper warning when !CONFIG_MAGIC_SYSRQMikael Pettersson1-0/+2
Compiling DRM throws the following warning if MAGIC_SYSRQ is disabled: drivers/gpu/drm/drm_fb_helper.c:101: warning: 'sysrq_drm_fb_helper_restore_op' defined but not used Fix: place sysrq_drm_fb_helper_restore_op and associated definitions inside #ifdef CONFIG_MAGIC_SYSRQ. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-09-28drm/r600: fix memory leak introduced with 64k malloc avoidance fix.Dave Airlie1-0/+2
The legacy r600 path shares code, but doesn't share quite enough to get the freeing correct. Free the pages here also. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-28drm/kms: make fb helper work for all drivers.Dave Airlie2-25/+40
This initialises the fb helper with the connector helper, so that the fb cmdline code works for intel as well. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-27const: mark struct vm_struct_operationsAlexey Dobriyan3-6/+6
* mark struct vm_area_struct::vm_ops as const * mark vm_ops in AGP code But leave TTM code alone, something is fishy there with global vm_ops being used. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-26drm/radeon/r600: fix offset handling in CS parserAlex Deucher1-5/+5
Need add reloc offset to the offset in the actual packet. Fixes use of the DRAW_INDEX packet by the 3D driver. [airlied: modified first one where idx_value == ib[idx+0] Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-09-26drm/radeon/kms/r600: fix forcing pci mode on agp cardsAlex Deucher1-4/+7
All we need to do on r6xx/r7xx is clear the RADEON_IS_AGP flag; the rest is handled in r600.c fixes fdo bug 23990: http://bugs.freedesktop.org/show_bug.cgi?id=23990 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-09-26drm/radeon/kms: fix for the extra pages copying.Dave Airlie1-3/+1
Thanks to Michel for pointing this out to me, this is why I need to get more sleep, over complicate this a bit. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-26drm/radeon/kms/r600: add support for vline relocsAlex Deucher3-1/+128
Provides support for anti-tearing functionality in the ddx. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-09-26drm/radeon/kms: fix some bugs in vline relocAlex Deucher1-6/+5
- fix offset of NOP packet for parsing - fix p->idx increments - fix bad mask when updating crtc vline info Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-09-26drm/radeon/kms/r600: clamp vram to aperture sizeAlex Deucher2-0/+14
r6xx and r7xx was missing this. We don't support non-CPU accessible vram yet. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-09-26drm/kms: protect against fb helper not being created.Dave Airlie2-4/+23
If drivers don't init the fb helper on the connector, the cmdline code won't work, but it shouldn't crash either. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-25drm/r600: get values from the passed in IB not the copy.Dave Airlie1-11/+13
this avoids reading back the IB on AGP, also it avoids the race where since we haven't fetched the page from the main IB and written it to the gpu one, reading back fetches 0. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-25drm: create gitignore file for radeonAmerigo Wang1-0/+3
Got lots of untracked files after compiling. These files are generated, thus should be ignored by git. Signed-off-by: WANG Cong <amwang@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-25drm/radeon/kms: remove unneeded master create/destroy functions.Dave Airlie2-54/+0
We shouldn't need these at all in radeon kms mode. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-25drm/kms: start adding command line interface using fb.Dave Airlie8-20/+349
[note this requires an fb patch posted to linux-fbdev-devel already] This uses the normal video= command line option to control the kms output setup at boot time. It is used to override the autodetection done by kms. video= normally takes a framebuffer as the first parameter, in kms it will take a connector name, DVI-I-1, or LVDS-1 etc. If no output connector is specified the mode string will apply to all connectors. The mode specification used will match down the probed modes, and if no mode is found it will add a CVT mode that matches. video=1024x768 - all connectors match a 1024x768 mode or add a CVT on video=VGA-1:1024x768, VGA-1 connector gets mode only. The same strings as used in current fb modedb.c are used, except I've added three more letters, e, D, d, e = enable, D = enable Digital, d = disable, which allow a connector to be forced into a certain state. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-25drm/radeon/kms: don't require up to 64k allocations. (v2)Dave Airlie7-271/+370
This avoids needing to do a kmalloc > PAGE_SIZE for the main indirect buffer chunk, it adds an accessor for all reads from the chunk and caches a single page at a time for subsequent reads. changes since v1: Use a two page pool which should be the most common case a single packet spanning > PAGE_SIZE will be hit, but I'm having trouble seeing anywhere we currently generate anything like that. hopefully proper short page copying at end added parser_error flag to set deep errors instead of having to test every ib value fetch. fixed bug in patch that went to list. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-25drm/radeon/kms: enable dac load detection by default.Dave Airlie1-0/+8
when I added the property I forgot to enable it. Thanks to soreau on #radeon for tracking it down. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-25drm/radeon/kms: enable r600 tv outputs.Dave Airlie1-6/+3
I never changed this back when I wrote tv-out support. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-24Merge branch 'drm-intel-next' of ↵Linus Torvalds20-451/+2692
git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel * '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-24drm/edid: Fix standard timing parse for EDID <= 1.2Adam Jackson1-5/+12
Aspect ratio code of 0 means 1:1 before EDID 1.3. Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-24drm/edid: Detailed standard timing blocks have six timings, not five.Adam Jackson1-2/+1
Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-24drm/edid: Ignore bad standard timings.Adam Jackson1-0/+16
Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-24drm/edid: const cleanupAdam Jackson1-1/+3
Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-23Merge branch 'drm-next' of ↵Linus Torvalds5-123/+102
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * '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 ↵Linus Torvalds2-3/+3
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * '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 ↵Linus Torvalds119-41286/+21760
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * '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>