Michel Dänzer [Wed, 30 Aug 2006 17:24:04 +0000 (19:24 +0200)]
Change first valid DRM drawable ID to be 1 instead of 0.
This makes it easier for userspace to know when it needs to allocate an ID.
Also free drawable information memory when it's no longer needed.
(cherry picked from
df7551ef7334d728ec0371423661bb403d3e270a commit)
Michel Dänzer [Mon, 28 Aug 2006 16:19:58 +0000 (18:19 +0200)]
Add copyright notice.
(cherry picked from
d04751facea36cb888c7510b126658fdbc4277d5 commit)
Michel Dänzer [Fri, 25 Aug 2006 17:01:05 +0000 (19:01 +0200)]
i915: Add ioctl for scheduling buffer swaps at vertical blanks.
This uses the core facility to schedule a driver callback that will be called
ASAP after the given vertical blank interrupt with the HW lock held.
(cherry picked from
257771fa290b62d4d2ad896843cf3a207978d0bb commit)
Michel Dänzer [Fri, 25 Aug 2006 16:55:55 +0000 (18:55 +0200)]
Locking and memory management fixes.
(cherry picked from
23d2833aaa37a33b9ddcf06cc796f59befc0d360 commit)
Michel Dänzer [Fri, 25 Aug 2006 16:55:06 +0000 (18:55 +0200)]
Drop tasklet locked driver callback when uninstalling IRQ.
(cherry picked from
b9f3009160d8bd1a26a77d6f1616f1679c7b969d commit)
Michel Dänzer [Wed, 23 Aug 2006 17:00:26 +0000 (19:00 +0200)]
Export drm_get_drawable_info symbol from core.
(cherry picked from
43f8675534c7e95efbc92eaf2c8cc43aef95f125 commit)
Michel Dänzer [Wed, 23 Aug 2006 14:05:47 +0000 (16:05 +0200)]
Hook up DRM_IOCTL_UPDATE_DRAW ioctl.
(cherry picked from
98a89504589427a76c3f5cfa2266962a1a212672 commit)
Michel Dänzer [Wed, 23 Aug 2006 14:04:41 +0000 (16:04 +0200)]
Only reallocate cliprect memory if the number of cliprects changes.
Also improve diagnostic output.
(cherry picked from
af48be1096221d551319c67a9e782b50ef58fefd commit)
Michel Dänzer [Tue, 22 Aug 2006 14:40:07 +0000 (16:40 +0200)]
Add support for tracking drawable information to core
Actually make the existing ioctls for adding and removing drawables do
something useful, and add another ioctl for the X server to update drawable
information. The only kind of drawable information tracked so far is cliprects.
(cherry picked from
29598e5253ff5c085ccf63580fd24b84db848424 commit)
Michel Dänzer [Wed, 16 Aug 2006 13:47:22 +0000 (15:47 +0200)]
Add support for interrupt triggered driver callback with lock held to DRM core.
(cherry picked from
d817cc1f30060fcc4a85a05b2de8a2a1687421b5 commit)
Michel Dänzer [Fri, 11 Aug 2006 16:06:46 +0000 (18:06 +0200)]
Add support for secondary vertical blank interrupt to i915 driver.
When the vertical blank interrupt is enabled for both pipes, pipe A is
considered primary and pipe B secondary. When it's only enabled for one pipe,
it's always considered primary for backwards compatibility.
(cherry picked from
0c7d7f43610f705e8536a949cf2407efaa5ec217 commit)
Michel Dänzer [Fri, 11 Aug 2006 15:57:59 +0000 (17:57 +0200)]
Add support for secondary vertical blank interrupt to DRM core.
(cherry picked from
ab351505f36a6c66405ea7604378268848340a42 commit)
Thomas Hellstrom [Fri, 29 Sep 2006 09:46:45 +0000 (11:46 +0200)]
Add a new buffer flag.
Fix up some comments.
Thomas Hellstrom [Fri, 29 Sep 2006 09:15:59 +0000 (11:15 +0200)]
Fix buffer manager takedown error.
Prepare for the possibility to evict all buffers from vram / agp.
This will be used by the X server when, for example, switching vts.
Thomas Hellstrom [Thu, 28 Sep 2006 10:19:54 +0000 (12:19 +0200)]
Libdrm version bump and naming.
Thomas Hellstrom [Thu, 28 Sep 2006 09:33:03 +0000 (11:33 +0200)]
Don't enable fence / buffer objects on non-linux systems.
Bump driver minor and date.
Thomas Hellstrom [Wed, 27 Sep 2006 17:11:27 +0000 (19:11 +0200)]
Activate error message that was never hit since it was masked
by drm_lock_transfer.
Ifdef out drm_lock_transfer. I see no use for it currently. Should be removed.
Thomas Hellstrom [Wed, 27 Sep 2006 17:07:55 +0000 (19:07 +0200)]
Fix racy buffer object destruction.
Thomas Hellstrom [Wed, 27 Sep 2006 07:31:39 +0000 (09:31 +0200)]
Fix tt fixed size that slipped through in previous commit.
Thomas Hellstrom [Wed, 27 Sep 2006 07:27:31 +0000 (09:27 +0200)]
Adapt to architecture-specific hooks for gatt pages.
Thomas Hellstrom [Tue, 26 Sep 2006 14:00:22 +0000 (16:00 +0200)]
Silence valgrind.
Thomas Hellstrom [Tue, 26 Sep 2006 12:40:11 +0000 (14:40 +0200)]
Remove the call to drm_lock_transfer, since it is not used anymore.
Fix up drm_lock_free to retain the last locking context information.
Thomas Hellstrom [Tue, 26 Sep 2006 12:36:53 +0000 (14:36 +0200)]
Allow for a driver to overload the ttm backend object methods.
Thomas Hellstrom [Mon, 25 Sep 2006 09:51:08 +0000 (11:51 +0200)]
Add /proc filesystem buffer / fence object accounting.
Check for NULL pointer in the i915 flush handler.
Remove i915_sync_flush declaration.
Thomas Hellstrom [Fri, 22 Sep 2006 07:25:36 +0000 (09:25 +0200)]
Fix proc formatting broken by last commit.
GPU lockup error reporting.
Thomas Hellstrom [Wed, 20 Sep 2006 14:31:15 +0000 (16:31 +0200)]
Allow for 64-bit map handles of ttms and buffer objects.
Thomas Hellstrom [Mon, 18 Sep 2006 19:50:00 +0000 (21:50 +0200)]
Fence handler fix
Thomas Hellstrom [Mon, 18 Sep 2006 18:43:31 +0000 (20:43 +0200)]
Alternative implementation of page table zeroing using zap page_range.
(Disabled for now)
Fix bo_wait_idle bug.
Remove stray debug message.
Thomas Hellstrom [Mon, 18 Sep 2006 14:02:33 +0000 (16:02 +0200)]
More verbose error reporting in some cases.
Add a buffer object waitIdle user-space function.
Fix some names and minor glitches.
Thomas Hellstrom [Fri, 15 Sep 2006 14:47:09 +0000 (16:47 +0200)]
Allow a "native type" to be associated with a fence sequence.
In the intel case, we can associate a flush with a sequence.
Thomas Hellstrom [Fri, 15 Sep 2006 09:18:35 +0000 (11:18 +0200)]
Some bugfixes.
Change the fence object interface somewhat to allow some more flexibility.
Make list IOCTLS really restartable.
Try to avoid busy-waits in the kernel using immediate return to user-space with an -EAGAIN.
Thomas Hellstrom [Thu, 14 Sep 2006 14:42:00 +0000 (16:42 +0200)]
Simplify ttm alloc and free.
Thomas Hellstrom [Thu, 14 Sep 2006 10:17:38 +0000 (12:17 +0200)]
Remove the use of reserved pages, and use locked pages instead.
Update compatibility for latest linux versions.
Thomas Hellstrom [Tue, 12 Sep 2006 15:39:44 +0000 (17:39 +0200)]
Fix some debug messages.
Thomas Hellstrom [Tue, 12 Sep 2006 14:28:34 +0000 (16:28 +0200)]
Use lazy fence wait when possible even for RW fences. Saves some CPU.
Lindent.
Thomas Hellstrom [Tue, 12 Sep 2006 10:01:00 +0000 (12:01 +0200)]
More bugfixes.
Disable the i915 IRQ turnoff for now since it seems to be causing problems.
Thomas Hellstrom [Fri, 8 Sep 2006 15:24:38 +0000 (17:24 +0200)]
Various bugfixes.
Thomas Hellstrom [Tue, 5 Sep 2006 17:36:45 +0000 (19:36 +0200)]
Multithreaded application note.
Thomas Hellstrom [Tue, 5 Sep 2006 16:00:25 +0000 (18:00 +0200)]
Fence all unfenced buffers function.
Thomas Hellstrom [Tue, 5 Sep 2006 12:23:18 +0000 (14:23 +0200)]
i915: Only turn on user IRQs when they are needed.
Thomas Hellstrom [Tue, 5 Sep 2006 09:00:52 +0000 (11:00 +0200)]
Fix memory cache initialization.
Thomas Hellstrom [Mon, 4 Sep 2006 20:05:21 +0000 (22:05 +0200)]
Libdrm function headers. Some renaming.
Thomas Hellstrom [Mon, 4 Sep 2006 19:50:12 +0000 (21:50 +0200)]
Buffer object wait IOCTL operation.
Remove option to wait for fence / buffers and block signals.
Thomas Hellstrom [Mon, 4 Sep 2006 14:57:20 +0000 (16:57 +0200)]
Make memory caches global so that they can be used with
multiple heads.
Thomas Hellstrom [Fri, 1 Sep 2006 16:11:34 +0000 (18:11 +0200)]
Lindent drm_bo.c
Thomas Hellstrom [Fri, 1 Sep 2006 16:11:05 +0000 (18:11 +0200)]
Flag bit pattern bugfixes. Remove some error messages.
Thomas Hellstrom [Fri, 1 Sep 2006 14:38:06 +0000 (16:38 +0200)]
Export buffer info on map and validate ioctls.
Add an info ioctl operation.
Thomas Hellstrom [Fri, 1 Sep 2006 13:41:55 +0000 (15:41 +0200)]
Bugfixes,
Memory allocation optimizations.
Buffer manager takedown.
Thomas Hellstrom [Fri, 1 Sep 2006 09:23:21 +0000 (11:23 +0200)]
Various bugfixes.
Thomas Hellstrom [Thu, 31 Aug 2006 19:42:29 +0000 (21:42 +0200)]
Validation and fencing.
Thomas Hellstrom [Thu, 31 Aug 2006 13:36:40 +0000 (15:36 +0200)]
Remove the buffer manager mutex. Use dev->struct_mutex instead.
Add a function to free buffers on hold for destruction if their
fence object has expired.
Add a timer to periodically call that function when there are
buffers pending deletion.
Thomas Hellstrom [Thu, 31 Aug 2006 12:10:13 +0000 (14:10 +0200)]
More mapping synchronization.
libdrm validate and fencing functions.
Thomas Hellstrom [Wed, 30 Aug 2006 19:31:38 +0000 (21:31 +0200)]
Lindenting drm_bo.c and drm_ttm.c
Thomas Hellstrom [Wed, 30 Aug 2006 19:30:47 +0000 (21:30 +0200)]
Buffer object binding.
Some code reordering.
Thomas Hellstrom [Wed, 30 Aug 2006 18:23:40 +0000 (20:23 +0200)]
Buffer eviction.
Reworked map refcounting so that any process waiting on buffer object unmap
will allow in other processes to unmap the buffer object.
Thomas Hellstrom [Wed, 30 Aug 2006 15:40:07 +0000 (17:40 +0200)]
Remove the buffer object hint field and use it only
as an argument.
Validate stub.
Thomas Hellstrom [Wed, 30 Aug 2006 13:11:50 +0000 (15:11 +0200)]
Add missing map flags.
Thomas Hellstrom [Wed, 30 Aug 2006 13:08:40 +0000 (15:08 +0200)]
Buffer object mapping and mapping synchronization for multiple clients.
Thomas Hellstrom [Wed, 30 Aug 2006 11:04:08 +0000 (13:04 +0200)]
Memory manager init and takedown.
Thomas Hellstrom [Wed, 30 Aug 2006 07:57:35 +0000 (09:57 +0200)]
Buffer object reply fill in.
Lindent of drm_bo.c drm_ttm.c
Thomas Hellstrom [Tue, 29 Aug 2006 19:57:37 +0000 (21:57 +0200)]
Part of buffer object libdrm interface.
Thomas Hellstrom [Tue, 29 Aug 2006 16:40:08 +0000 (18:40 +0200)]
Checkpoint commit. Buffer object flags and IOCTL argument list.
Thomas Hellstrom [Tue, 29 Aug 2006 12:52:02 +0000 (14:52 +0200)]
Checkpoint ttm addition to buffer objects.
Thomas Hellstrom [Tue, 29 Aug 2006 08:45:34 +0000 (10:45 +0200)]
64-bit IOCTL integer (Michel Dänzer & Brian Paul)
Thomas Hellstrom [Mon, 28 Aug 2006 15:51:53 +0000 (17:51 +0200)]
Buffer object creation.
Thomas Hellstrom [Mon, 28 Aug 2006 14:36:37 +0000 (16:36 +0200)]
Proper TTM dereferencing
Initial buffer object creation.
Thomas Hellstrom [Mon, 28 Aug 2006 11:51:39 +0000 (13:51 +0200)]
Buffer object idle and mapping synchronization.
Thomas Hellstrom [Mon, 28 Aug 2006 08:58:21 +0000 (10:58 +0200)]
Checkpoint buffer object IOCTL stub.
Thomas Hellstrom [Mon, 28 Aug 2006 07:49:09 +0000 (09:49 +0200)]
Add a 64-bit drm unsigned type for 64-bit clean IOCTLS.
Conversion functions in drmP.h and xf86drm.c.
Thomas Hellstrom [Mon, 28 Aug 2006 07:28:10 +0000 (09:28 +0200)]
Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into drm-ttm-0-2-branch
Conflicts:
linux-core/drmP.h
Dave Airlie [Sat, 19 Aug 2006 07:59:18 +0000 (17:59 +1000)]
drm: lots of small cleanups and whitespace issues fixed up
remove a mach64 warning, align a lot of things from linux kernel
Dave Airlie [Sat, 19 Aug 2006 06:56:03 +0000 (16:56 +1000)]
add static function, and remove bad attributions
Dave Airlie [Sat, 19 Aug 2006 06:55:30 +0000 (16:55 +1000)]
fix const pointer warnings with file_operations
Dave Airlie [Sat, 19 Aug 2006 06:55:00 +0000 (16:55 +1000)]
remove local copies of pci domain/bus/slot/num
Dave Airlie [Sat, 19 Aug 2006 06:43:16 +0000 (16:43 +1000)]
remove some DRM_ARRAY_SIZE from linux core code
Dave Airlie [Sat, 19 Aug 2006 06:36:26 +0000 (16:36 +1000)]
fixup some of the comments in drm_context.c
Dave Airlie [Sat, 19 Aug 2006 06:31:34 +0000 (16:31 +1000)]
drm: i810_dma.c: fix pointer arithmetic for 64-bit target
First warning result from open-coded PTR_ERR,
the rest is caused by code like this:
*(u32 *) ((u32) buf_priv->kernel_virtual + used)
I've also fixed a missing PTR_ERR in i830_dma.c
From: Denis Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Thomas Hellstrom [Sun, 27 Aug 2006 20:01:33 +0000 (22:01 +0200)]
Bugfixes.
Thomas Hellstrom [Sun, 27 Aug 2006 19:21:06 +0000 (21:21 +0200)]
Initialize i915 saved flush flags.
Thomas Hellstrom [Sun, 27 Aug 2006 19:16:13 +0000 (21:16 +0200)]
Remove the ioctl multiplexing, and instead allow for generic
drm ioctls 0x80 - 0xFF.
Thomas Hellstrom [Sun, 27 Aug 2006 17:45:38 +0000 (19:45 +0200)]
Have TTM create and reference ioctl call return the actual TTM size.
Thomas Hellstrom [Sun, 27 Aug 2006 17:07:38 +0000 (19:07 +0200)]
Add TTM map handle on reference.
Thomas Hellstrom [Sun, 27 Aug 2006 17:03:20 +0000 (19:03 +0200)]
ttm create / destroy / ref / unref ioctl.
Michel Dänzer [Sat, 26 Aug 2006 10:21:11 +0000 (12:21 +0200)]
Bug #7595: Avoid u32 overflows in radeon_check_and_fixup_offset().
The overflows could cause valid offsets to get rejected under some
circumstances, e.g. when the framebuffer resides at the very end of the card's
address space.
Thomas Hellstrom [Fri, 25 Aug 2006 18:03:39 +0000 (20:03 +0200)]
More ioctl stubs.
Buffer object locking order documentation.
Thomas Hellstrom [Fri, 25 Aug 2006 17:03:42 +0000 (19:03 +0200)]
ttm and buffer objects ioctl stubs.
Thomas Hellstrom [Fri, 25 Aug 2006 16:14:22 +0000 (18:14 +0200)]
Module protection map access is moving into mainline kernels.
Update drm_compat accordingly.
(Reported by Dave Airlie)
Thomas Hellstrom [Fri, 25 Aug 2006 16:05:35 +0000 (18:05 +0200)]
Checkpoint commit
Buffer object code.
Thomas Hellstrom [Wed, 23 Aug 2006 11:49:13 +0000 (13:49 +0200)]
Fix previous commit: Only fall back to hashed handles
when there is a duplicate handle error. Not for other errors.
Thomas Hellstrom [Wed, 23 Aug 2006 11:31:45 +0000 (13:31 +0200)]
Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into drm-ttm-0-2-branch
Thomas Hellstrom [Wed, 23 Aug 2006 09:31:10 +0000 (11:31 +0200)]
Allow multiple addMaps with the same 32-bit map offset.
(Reported by Dave Airlie)
Thomas Hellstrom [Wed, 23 Aug 2006 09:21:33 +0000 (11:21 +0200)]
Fix hashtab implementation leaking illegal error codes to user space.
(Reported by Dave Airlie)
Thomas Hellstrom [Tue, 22 Aug 2006 09:57:08 +0000 (11:57 +0200)]
More ttm cleanups.
Thomas Hellstrom [Tue, 22 Aug 2006 09:19:53 +0000 (11:19 +0200)]
ttm code cleanup.
Fix the sleep-in-page-table-spinlock bug discovered by Dave Airlie
Thomas Hellstrom [Tue, 22 Aug 2006 08:44:09 +0000 (10:44 +0200)]
Add a fence object class field for future use (For example VSYNC fence objects)
Thomas Hellstrom [Tue, 22 Aug 2006 08:24:48 +0000 (10:24 +0200)]
Initial i915 buffer object driver
Thomas Hellstrom [Tue, 22 Aug 2006 08:09:57 +0000 (10:09 +0200)]
AGP backends for TTM.
Thomas Hellstrom [Tue, 22 Aug 2006 07:47:33 +0000 (09:47 +0200)]
Bring in stripped TTM functionality.
Thomas Hellstrom [Mon, 21 Aug 2006 19:37:43 +0000 (21:37 +0200)]
Allow longer sequence lifetimes.
Thomas Hellstrom [Mon, 21 Aug 2006 19:36:00 +0000 (21:36 +0200)]
i915 fence object driver implementing 2 fence object types:
0x00 EXE fence. Signals when command stream interpreter has reached the point
where the fence was emitted.
0x01 FLUSH fence. Signals when command stream interpreter has reached the point
where the fence was emitted, and all previous drawing operations have been
completed and flushed.
Implements busy wait (for fastest response time / high CPU) and
lazy wait (User interrupt or timer driven).