aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/ttm
AgeCommit message (Collapse)AuthorFilesLines
2009-10-06drm/ttm: fix refcounting in ttm global code.Dave Airlie1-1/+1
the global refcount wasn't being increased after the first reference. this caused an oops on unload on a multi-gpu card. Signed-off-by: Dave Airlie <[email protected]>
2009-09-27const: mark struct vm_struct_operationsAlexey Dobriyan1-1/+1
* 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 <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-08-27drm/ttm: consolidate cache flushing code in one place.Dave Airlie1-65/+2
This merges the TTM and drm cache flushing into one file in the drm core. Signed-off-by: Dave Airlie <[email protected]>
2009-08-20drm/ttm: Fixes for "Memory accounting rework."Thomas Hellstrom1-8/+28
ttm: Fix error paths when kobject_add returns an error. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-08-20drm/ttm: Fixes for "Make parts of a struct ttm_bo_device global"Thomas Hellstrom1-3/+0
ttm: Remove a stray debug printout. Remove a re-init of the lru spinlock at device init. radeon: Fix the size of the bo_global allocation. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-08-20Merge Linus master to drm-nextDave Airlie4-36/+135
linux-next conflict reported needed resolution. Conflicts: drivers/gpu/drm/drm_crtc.c drivers/gpu/drm/drm_edid.c drivers/gpu/drm/i915/intel_sdvo.c drivers/gpu/drm/radeon/radeon_ttm.c drivers/gpu/drm/ttm/ttm_bo.c
2009-08-19ttm: Make parts of a struct ttm_bo_device global.Thomas Hellstrom3-109/+199
Common resources, like memory accounting and swap lists should be global and not per device. Introduce a struct ttm_bo_global to accomodate this, and register it with sysfs. Add a small sysfs interface to return the number of active buffer objects. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-08-19drm/ttm: Memory accounting rework.Thomas Hellstrom4-100/+427
Use inclusive zones to simplify accounting and its sysfs representation. Use DMA32 accounting where applicable. Add a sysfs interface to make the heuristically determined limits readable and configurable. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-08-19drm/ttm: Add a virtual ttm sysfs device.Thomas Hellstrom1-1/+57
The device directory will be the base directory of the sysfs representation of other ttm subsystems. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-08-04drm/ttm: Read buffer overflowRoel Kluin1-1/+2
Check whether index is within bounds before grabbing the element. Signed-off-by: Roel Kluin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-08-04drm/ttm: Fix a sync object leak.Thomas Hellstrom1-0/+4
If there are multiple simultaneous waiters for the same buffer object, a temporary reference to its sync object may be leaked. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-08-04drm/ttm: Fix a potential comparison of structs.Thomas Hellstrom1-4/+4
On some architectures the comparison may cause a compilation failure. Original partial fix Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Pekka Paalanen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-07-29Merge branch 'drm-radeon-kms' of ↵Linus Torvalds4-33/+127
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-radeon-kms' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (35 commits) drm/radeon: set fb aperture sizes for framebuffer handoff. drm/ttm: fix highuser vs dma32 confusion. drm/radeon: Fix size used for benchmarking BO copies. drm/radeon: Add radeon.test parameter for running BO GPU copy tests. drm/radeon/kms: allow interruptible waits for objects. drm/ttm: powerpc: Fix Highmem cache flushing. x86: Export kmap_atomic_prot() needed for TTM. drm/ttm: Fix ttm in-kernel copying of pages with non-standard caching attributes. drm/ttm: Fix an oops and sync object leak. drm/radeon/kms: vram sizing on certain r100 chips needs workaround. drm/radeon: Pay more attention to object placement requested by userspace. drm/radeon: Fall back to evicting BOs with memcpy if necessary. drm/radeon: Don't unreserve twice on failure to validate. drm/radeon/kms: fix bandwidth computation on avivo hardware drm/radeon/kms: add initial colortiling support. drm/radeon/kms: fix hotspot handling on pre-avivo chips drm/radeon/kms: enable frac fb divs on rs600/rs690/rs740 drm/radeon/kms: add PLL flag to prefer frequencies <= the target freq drm/radeon/kms: block RN50 from using 3D engine. drm/radeon/kms: fix VRAM sizing like DDX does it. ...
2009-07-29drm/ttm: fix highuser vs dma32 confusion.Dave Airlie1-1/+3
DMA32 and highmem are sort of exclusive. Noticed by AndrewR on #radeon. Signed-off-by: Dave Airlie <[email protected]>
2009-07-29drm/ttm: powerpc: Fix Highmem cache flushing.Thomas Hellstrom1-4/+10
Temporarily maps highmem pages while flushing to get a valid virtual address to flush. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-07-29drm/ttm: Fix ttm in-kernel copying of pages with non-standard caching ↵Thomas Hellstrom1-11/+52
attributes. For x86 this affected highmem pages only, since they were always kmapped cache-coherent, and this is fixed using kmap_atomic_prot(). For other architectures that may not modify the linear kernel map we resort to vmap() for now, since kmap_atomic_prot() generally uses the linear kernel map for lowmem pages. This of course comes with a performance impact and should be optimized when possible. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-07-29drm/ttm: Fix an oops and sync object leak.Thomas Hellstrom1-2/+4
The code was potentially dereferencig a NULL sync object pointer. At the same time a sync object reference was potentially leaked. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-07-29drm/radeon/kms: add initial colortiling support.Dave Airlie2-1/+7
This adds new set/get tiling interfaces where the pitch and macro/micro tiling enables can be set. Along with a flag to decide if this object should have a surface when mapped. The only thing we need to allocate with a mapped surface should be the frontbuffer. Note rotate scanout shouldn't require one, and back/depth shouldn't either, though mesa needs some fixes. It fixes the TTM interfaces along Thomas's suggestions, and I've tested the surface stealing code with two X servers and not seen any lockdep issues. I've stopped tiling the fbcon frontbuffer, as I don't see there being any advantage other than testing, I've left the testing commands in there, just flip the fb_tiled to true in radeon_fb.c Open: Can we integrate endian swapping in with this? Future features: texture tiling - need to relocate texture registers TXOFFSET* with tiling info. This also merges Michel's cleanup surfaces regs at init time patch even though it makes sense on its own, this patch really relies on it. Some PowerMac firmwares set up a tiling surface at the beginning of VRAM which messes us up otherwise. that patch is: Signed-off-by: Michel Dänzer <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-07-15drm/ttm/radeon: add dma32 support.Dave Airlie2-3/+13
This add support for using dma32 memory on gpus that really need it. Currently IGPs are left without DMA32 but we might need to change that unless we can fix rs690. Signed-off-by: Dave Airlie <[email protected]>
2009-07-15ttm: Fix caching mode selection.Thomas Hellstrom1-12/+39
A bug caused a new caching state to be selected on each buffer object validation regardless of the current caching state. Moreover, a caching state could be selected that wasn't supported by the memory type. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-07-15drm/ttm: fix misplaced parenthesesRoel Kluin1-2/+2
Signed-off-by: Roel Kluin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-06-24drm: remove unused #include <linux/version.h>'sHuang Weiyi3-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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-06-19agp: switch AGP to use page array instead of unsigned long arrayDave Airlie1-2/+1
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 <[email protected]>
2009-06-19drm/ttm: Add some powerpc cache flush code.Michel Dänzer1-1/+10
Optimise the powerpc flushing path for TTM. Signed-off-by: Dave Airlie <[email protected]>
2009-06-19drm/ttm: fix an error path to exit function correctlyThomas Hellstrom1-1/+1
Just a goto instead of a direct exit. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-06-19ttm: Return -ERESTART when a signal interrupts bo eviction.Thomas Hellstrom1-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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-06-15drm: Add the TTM GPU memory manager subsystem.Thomas Hellstrom9-0/+3904
TTM is a GPU memory manager subsystem designed for use with GPU devices with various memory types (On-card VRAM, AGP, PCI apertures etc.). It's essentially a helper library that assists the DRM driver in creating and managing persistent buffer objects. TTM manages placement of data and CPU map setup and teardown on data movement. It can also optionally manage synchronization of data on a per-buffer-object level. TTM takes care to provide an always valid virtual user-space address to a buffer object which makes user-space sub-allocation of big buffer objects feasible. TTM uses a fine-grained per buffer-object locking scheme, taking care to release all relevant locks when waiting for the GPU. Although this implies some locking overhead, it's probably a big win for devices with multiple command submission mechanisms, since the lock contention will be minimal. TTM can be used with whatever user-space interface the driver chooses, including GEM. It's used by the upcoming Radeon KMS DRM driver and is also the GPU memory management core of various new experimental DRM drivers. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Jerome Glisse <[email protected]> Signed-off-by: Dave Airlie <[email protected]>