Commit graph

203 commits

Author SHA1 Message Date
Robert Noland
d6295cc9ff drm: Add _DRM_DRIVER map flag.
This flag indicates that the driver is responsible for the map.
2007-12-01 02:40:13 -05:00
Dave Airlie
5dc5c36e62 drm: major whitespace/coding style realignment with kernel 2007-11-22 16:10:36 +10:00
Dave Airlie
7f6bf84c23 drm: remove lots of spurious whitespace.
Kernel "cleanfile" script run.
2007-11-05 12:42:22 +10:00
Jesse Barnes
6707ab8626 update DRM sysfs support
Make DRM devices use real Linux devices instead of class devices, which are
going away.  While we're at it, clean up some of the interfaces to take
struct drm_device * or struct device * and use the global drm_class where
needed instead of passing it around.
2007-10-26 16:08:54 -07:00
Thomas Hellstrom
b9d9c30474 Tighten permissions on some buffer manager ioctls.
Set bo init minor to 0.
Add the version function to header.
2007-10-25 10:29:15 +02:00
Thomas Hellstrom
11f3e5e53f Buffer manager:
Implement a version check IOCTL for drivers that don't use
drmMMInit from user-space.
Remove the minor check from the kernel code. That's really up
to the driver.
Bump major.
2007-10-25 10:12:21 +02:00
Thomas Hellstrom
086c058a41 Remove the op ioctl, and replace it with a setuser ioctl.
Remove need for lock for now.
May create races when we clean memory areas or on takedown.
Needs to be fixed.
Really do a validate on buffer creation in order to avoid problems with
fixed memory buffers.
2007-10-17 10:59:48 +02:00
Thomas Hellstrom
0d1926d36e Revert "Replace NO_MOVE/NO_EVICT flags to buffer objects with an ioctl to set pinning."
This reverts cf2d569dac commit.
2007-10-17 10:59:48 +02:00
Kristian Høgsberg
a69c85fec8 Drop destroy ioctls for fences and buffer objects.
We now always create a drm_ref_object for user objects and this is then the only
things that holds a reference to the user object.  This way unreference on will
destroy the user object when the last drm_ref_object goes way.
2007-10-16 22:03:05 +11:00
Maarten Maathuis
5ca12104f8 linux-drm: Obey device class requirements when detecting devices. 2007-10-04 09:24:48 +02:00
Alan Hourihane
b44925b2a5 Add brackets 2007-09-26 16:18:19 +01:00
Alan Hourihane
6671ad1917 don't copy back if an error was returned. 2007-09-26 15:38:54 +01:00
Eric Anholt
0055fd5c35 Merge branch 'master' into bo-set-pin 2007-08-16 09:23:09 -07:00
Dave Airlie
7602e4f8a6 drm: add unlocked ioctl code path - not used yet 2007-08-02 19:13:58 +10:00
Eric Anholt
3c8ebd94e4 debug print ioctl return value as -integer rather than fffffwhatever. 2007-07-26 11:26:12 -07:00
Eric Anholt
cf2d569dac Replace NO_MOVE/NO_EVICT flags to buffer objects with an ioctl to set pinning.
This cleans up the create/validate interfaces for this very uncommon path, and
makes pinned object creation much easier to use for the X Server.
2007-07-26 10:15:11 -07:00
Pekka Paalanen
0844c46759 Fix misc ioctl issues, makes Nouveau run.
Debug print fix in drm_release().
Forgotten local variable init in drm_setversion().
Unnecessary put_user() in drm_addmap_ioctl().
ioctl->cmd check broken in drm_ioctl(); workaround.
2007-07-21 23:13:25 +03:00
Dave Airlie
b43b0b2b32 fix missing brace placement for IOC_IN 2007-07-21 22:11:41 +10:00
Dave Airlie
f68ad6d1ab fix drm no-compile due to BSD :-) 2007-07-21 21:50:25 +10:00
Eric Anholt
5b38e13416 Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE.
The data is now in kernel space, copied in/out as appropriate according to the
This results in DRM_COPY_{TO,FROM}_USER going away, and error paths to deal
with those failures.  This also means that XFree86 4.2.0 support for i810 DRM
is lost.
2007-07-20 18:16:42 -07: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
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
Dave Airlie
2c9e05cf4c Merge branch 'master' into cleanup
Conflicts:

	libdrm/xf86drm.c
	linux-core/drm_bo.c
	linux-core/drm_fence.c
2007-07-11 11:23:41 +10:00
Arthur Huillet
04e4922c0c Made drm_sg_alloc accessible from inside the DRM - drm_sg_alloc_ioctl is the ioctl wrapper 2007-07-11 02:34:00 +02:00
Kristian Høgsberg
c9d752ff4f Fix must-check warnings and implement a few error paths. 2007-07-02 17:52:07 -04:00
Dave Airlie
280083d4a2 use krh's idr mods to remove lists from idr code 2007-06-10 15:40:21 +10:00
root
a4cddc6596 Revert "drm: add new drm_wait_on function to replace macro"
This reverts commit 6e860d08d0.

As I said not a good plan - this macro will have to stay for now,
trying to do the vbl code with the inline was a bit messy - may need specialised
drm wait on functions
2007-06-03 18:12:28 +10:00
Dave Airlie
f64674743a drm: convert drawable handling to use Linux idr
This cleans this code up a lot and uses the generic Linux idr which is
designed for this.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-05-27 07:26:52 +10:00
Dave Airlie
58b2ed7832 Revert "drm/ttm: cleanup mm_ioctl ioctls to be separate ioctls."
This reverts commit 3fdef0dc20.

ditto not on master yet
2007-05-26 03:48:08 +10:00
Dave Airlie
375f3f2884 Revert "drm/ttm: cleanup most of fence ioctl split out"
This reverts commit 3dfc1400e9.

this shouldn't have gone on master yet
2007-05-26 03:47:48 +10:00
Dave Airlie
ce58e53a01 whitespace fixups from kernel 2007-05-26 03:32:34 +10:00
Dave Airlie
3dfc1400e9 drm/ttm: cleanup most of fence ioctl split out 2007-05-26 03:32:34 +10:00
Dave Airlie
3fdef0dc20 drm/ttm: cleanup mm_ioctl ioctls to be separate ioctls.
This is the first bunch of ioctls
2007-05-26 03:32:34 +10: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
Dave Airlie
b2a875ba89 ttm: complete drm buffer object ioctl split
retain the op operation for validate/fence operations
2007-05-08 18:25:15 +10:00
Dave Airlie
6a62941eca drm/ttm: cleanup most of fence ioctl split out 2007-05-06 11:35:11 +10:00
Dave Airlie
ee8954cb53 drm/ttm: cleanup mm_ioctl ioctls to be separate ioctls.
This is the first bunch of ioctls
2007-05-06 11:17:30 +10:00
Dave Airlie
6e860d08d0 drm: add new drm_wait_on function to replace macro 2007-04-28 15:07:43 +10:00
Dave Airlie
9f9c19065c remove DRM_GETSAREA and replace with drm_getsarea function 2007-04-28 15:07:43 +10:00
Dave Airlie
209870a882 rename badly named define 2007-03-20 10:13:58 +11:00
Dave Airlie
c991f8e049 cleanup ioctl expansion code 2007-03-19 08:46:39 +11:00
Dave Airlie
bbb6fc9307 make drm fops const from kernel 2007-03-19 08:36:01 +11:00
Thomas Hellstrom
582637641a Remove a scary error printed when we were leaking memory caches.
We don't use memory caches anymore...

Fix memory accounting initialization to only use low or DMA32 memory.
2007-01-25 14:27:29 +01:00
Thomas Hellstrom
38ed67196f Remove the memory caches for fence objects and memory manager nodes,
since the support for memory caches has gone from 2.6.20.
2006-12-15 12:37:24 +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
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
5881ce1b91 Extend generality for more memory types.
Fix up init and destruction code.
2006-10-17 11:05:37 +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