Commit Graph

116 Commits (f07942f74a08e4c65e3b5e5c46f543686ae30c2b)

Author SHA1 Message Date
Dave Airlie 10937cf20b drm: move drm_head to drm_minor and fix up users 2008-01-04 16:12:24 +11:00
Dave Airlie 5dc5c36e62 drm: major whitespace/coding style realignment with kernel 2007-11-22 16:10:36 +10:00
Dave Airlie 82ffcbbd62 drm: more kernel coding style cleanups 2007-11-05 19:14:23 +10:00
Thomas Hellstrom 3b19b50cb5 Remove the need for the hardware lock in the buffer manager.
Add interface entry cleaning a memory type without touching NO_EVICT buffers.
2007-10-21 12:20:56 +02:00
Eric Anholt c1119b1b09 Replace filp in ioctl arguments with drm_file *file_priv.
As a fallout, replace filp storage with file_priv storage for "unique
identifier of a client" all over the DRM.  There is a 1:1 mapping, so this
should be a noop.  This could be a minor performance improvement, as everything
on Linux dereferenced filp to get file_priv anyway, while only the mmap ioctls
went the other direction.
2007-07-20 13:39:45 -07:00
Dave Airlie be85ad0333 drm: detypedef ttm/bo/fence code 2007-07-16 13:37:02 +10:00
Dave Airlie 21ee6fbfb8 drm: remove drmP.h internal typedefs 2007-07-16 12:32:51 +10:00
Dave Airlie b95ac8b7b3 drm: detypedef drm.h and fixup all problems 2007-07-16 11:22:15 +10:00
Thomas Hellstrom 00f1a66f22 Fence object reference / dereference cleanup.
Buffer object dereference cleanup.
Add a struct drm_device member to fence objects:
This can simplify code, particularly in drivers.
2007-06-29 12:58:45 +02:00
Dave Airlie 7b48f0022a drm: cleanup use of Linux list handling macros
This makes the drms use of the list handling macros a lot cleaner
and more along the lines of how they should be used.
2007-05-26 04:26:24 +10:00
George Sapountzis 3a2c9f4621 linux: minor indent. 2007-04-26 14:16:28 +03:00
Dave Airlie 4b72759b30 drm: nopfn warning on 64-bit 2007-04-26 16:22:11 +10:00
Thomas Hellstrom 72d457fc19 Make sure CMA (Can't map aperture) pages are mapped uncached.
(Should really make this write-combined using PATs, at some point).
2007-04-03 10:29:14 +02:00
Dave Airlie 5ad43f4675 vm: cleanup drm_vm.c along lines of cleanups queued for kernel 2007-03-24 17:58:27 +11:00
Dave Airlie 8d918b0b63 cleanup more whitespace from ttm merge 2007-03-23 14:56:39 +11:00
Thomas Hellstrom 80468e7532 Fix build for 2.6.21-rc1.
The vm subsystem of 2.6.21 is fully compatible with the buffer object
vm code.
2007-02-26 18:17:54 +01:00
Thomas Hellstrom 04760563b8 Set the drm bus map type for each buffer object memory type. 2007-02-14 12:39:02 +01:00
Thomas Hellstrom 7bcb62b45d Rework buffer object vm code to use nopfn() for kernels >= 2.6.19. 2007-02-14 10:49:37 +01:00
Thomas Hellstrom 85ee2a8d04 Various bugfixes. 2007-02-10 12:06:36 +01:00
Thomas Hellstrom 6a49d9a8ab Fix evict_mutex locking range.
Implement unmappable buffers. (fault moves them to mappable when needed).
Various bugfixes.
2007-02-09 00:02:02 +01:00
Thomas Hellstrom bf8f46d4c6 Fix mm_block leak.
Some other minor fixes.
2007-02-08 18:59:02 +01:00
Thomas Hellstrom 1257907fa9 Simplify external ttm page allocation.
Implement a memcpy fallback for copying between buffers.
2007-02-08 13:29:08 +01:00
Thomas Hellstrom af24465b2e Fix a stray unlock_kernel() in drm_vm.c
Add a file for memory move helpers, drm_bo_move.c
Implement generic memory move.
Cached, no_move and unmapped memory temporarily broken.
2007-02-07 12:52:23 +01:00
Thomas Hellstrom 71b9e876f9 Simplify pci map vs no pci map choice. 2007-02-06 16:59:45 +01:00
Thomas Hellstrom 63f2abd721 Make also later kernels work with buffer object vm
and clean up some function names.
2007-02-02 19:49:11 +01:00
Thomas Hellstrom c269d560e4 Make vm handle buffer objects instead of ttm objects.
Remove ttm objects.
Make vm aware of PCI memory type buffer objects.
(Only works for pre 2.6.16 kernels for now).
2007-02-02 14:47:44 +01:00
Thomas Hellstrom dd733dea38 Fix missing ttm_open_vma call from previous commit.
Honour the ttm backend cant-use-aperture flag.
2007-02-01 13:19:05 +01:00
Thomas Hellstrom 333c6af47a Protect drm_mmap against disappearing maps.
The map lists and hash tables are protected using dev->struct_mutex,
but drm_mmap strangely never locked this mutex.
2007-02-01 00:38:57 +01:00
Christoph Hellwig b147c39263 drm: remove drm_follow_page, and drm_ioremap and ioremapfree
This comes from the Re: [patch] paravirt: isolate module ops on lkml
It needs some testing, please report any regressions caused.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-01-08 11:47:15 +11:00
Dave Airlie 2dcbf6a599 make build against 2.6.20 hopefully 2007-01-01 11:30:38 +11:00
Thomas Hellstrom 975136d6e5 Proper allocation of AGP pages for ttms. 2006-12-27 15:32:09 +01:00
Thomas Hellstrom 3b8e6ccd25 Security fix. Zero pages before they are handed to user space.
TTM pages were not cleared when allocated and handed to user space.
Sensitive information may leak.
2006-12-19 23:45:59 +01:00
Dave Airlie 86ff2aeb9b drm: remove all 2.4 support for drm development tree.
Bye bye 2.4 you served us well..
2006-12-19 20:29:03 +11:00
Dave Airlie 656c3a3737 [SPARC]: Respect vm_page_prot in io_remap_page_range().
Make sure the callers do a pgprot_noncached() on
    vma->vm_page_prot.

    Pointed out by Hugh Dickens.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-19 18:27:20 +11:00
Dave Airlie 0ab48b0841 [PATCH] mm: incorrect VM_FAULT_OOM returns from drivers
Some drivers are returning OOM when it is not in response to a memory
    shortage.

Signed-off-by: Nick Piggin <npiggin@suse.de>
2006-12-19 18:24:44 +11:00
Thomas Hellstrom 4b04c0cc45 Bugzilla Bug #8819
Build fixes for powerpc.
Reported by Katerina Barone-Adesi
2006-10-30 11:18:44 +01:00
Thomas Hellstrom 3624e43282 Bug #8707, 2.6.19-rc compatibility for memory manager code. 2006-10-20 15:06:31 +02:00
Thomas Hellstrom e22b04f807 Merging drm-ttm-0-2-branch
Conflicts:

	linux-core/drmP.h
	linux-core/drm_drv.c
	linux-core/drm_irq.c
	linux-core/drm_stub.c
	shared-core/drm.h
	shared-core/i915_drv.h
	shared-core/i915_irq.c
2006-10-18 17:33:19 +02:00
Thomas Hellstrom f22f89e6b3 Add vma list memory usage to memory accounting.
Use byte unit for /proc printout of memory usage for small sizes to be
able to detect memory allocation bugs more easily.
2006-10-17 19:52:34 +02:00
Thomas Hellstrom d515936ea7 Add memory usage accounting to avoid DOS problems. 2006-10-17 19:40:57 +02:00
Thomas Hellstrom 3070389367 Compatibility code for 2.6.15-2.6.18. It is ugly but a little comfort is that
it will go away in the mainstream kernel.
Some bugfixes, mainly in error paths.
2006-10-11 22:21:01 +02:00
Thomas Hellstrom f2db76e2f2 Big update:
Adapt for new functions in the 2.6.19 kernel.
Remove the ability to have multiple regions in one TTM.
   This simplifies a lot of code.
Remove the ability to access TTMs from user space.
   We don't need it anymore without ttm regions.
Don't change caching policy for evicted buffers. Instead change it only
   when the buffer is accessed by the CPU (on the first page fault).
   This tremendously speeds up eviction rates.
Current code is safe for kernels <= 2.6.14.
Should also be OK with 2.6.19 and above.
2006-10-11 13:40:35 +02:00
Thomas Hellstrom c58574c605 Use a nopage-based approach to fault in pfns. 2006-10-10 10:37:26 +02:00
George Sapountzis f3deef730d Bug 6242: [mach64] Use private DMA buffers, part #3.
Add DRM_PCI_BUFFER_RO flag for mapping PCI DMA buffer read-only. An additional
flag is needed, since PCI DMA buffers do not have an associated map.
2006-10-02 22:47:23 +03:00
Thomas Hellstrom d85b99435f Allow for 44 bit user-tokens (or drm_file offsets) 2006-10-02 13:49:43 +02:00
Thomas Hellstrom 235f6fc650 Adapt to architecture-specific hooks for gatt pages. 2006-09-27 09:27:31 +02:00
Thomas Hellstrom 682c6ed029 Remove the use of reserved pages, and use locked pages instead.
Update compatibility for latest linux versions.
2006-09-14 12:17:38 +02:00
Thomas Hellstrom 191e284709 More bugfixes.
Disable the i915 IRQ turnoff for now since it seems to be causing problems.
2006-09-12 12:01:00 +02:00
Thomas Hellstrom 14a835be61 Buffer object mapping and mapping synchronization for multiple clients. 2006-08-30 15:08:40 +02:00
Thomas Hellstrom 4ddabd1562 Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into drm-ttm-0-2-branch
Conflicts:

	linux-core/drmP.h
2006-08-28 09:28:10 +02:00