Commit graph

1998 commits

Author SHA1 Message Date
Brian
c453135789 Added idr_replace() function which was apparently added in Linux 2.6.18
Someone should probably double-check my work here since this is the
first time I've touched drm_compat.[ch]
2007-09-12 11:49:51 -06:00
Ian Romanick
c597bd57ee Bump version to 1.0.0. 2007-09-06 15:20:52 -07:00
Ian Romanick
fee49e2071 Merge branch 'master' of ssh+git://git.freedesktop.org/git/mesa/drm into xgi-0-0-2 2007-08-31 10:54:55 -07:00
Ian Romanick
bb3da88601 Acutally emit the IRQ (duh) when setting the fence post. 2007-08-31 10:48:13 -07:00
Ian Romanick
9c5b9d458b Use ati_pcigart for PCI-e GART table handling. 2007-08-29 14:41:49 -07:00
Ian Romanick
c46ffd6b29 Fix late night dumb-dumb mistake. 2007-08-29 00:23:30 -07:00
Ian Romanick
2bcd5b5e33 Use DRM_SPINLOCK / DRM_UNSPINLOCK macros. 2007-08-29 00:04:18 -07:00
Dave Airlie
589707b765 drm: remove XFREE86_VERSION macros 2007-08-28 15:17:36 +10:00
Ian Romanick
3383e8bd6b Remove unnecessary include. 2007-08-17 10:53:18 -07:00
Ian Romanick
0d3c741df1 Forgot to add this file on the last commit. 2007-08-16 13:43:04 -07:00
Eric Anholt
0055fd5c35 Merge branch 'master' into bo-set-pin 2007-08-16 09:23:09 -07:00
Ian Romanick
d8a800b63d Implement fence support. 2007-08-15 21:05:26 -07:00
Eric Anholt
b668d6d905 Fix dev->agp->base initialization on BSD, and fix addmap range check on Linux.
With the previous linux commit, an AGP aperture at the end of the address space
would have wrapped to 0 and the test would have failed.
2007-08-15 14:29:31 -07:00
Ben Skeggs
c3faa589b0 nouveau: Allow GART notifiers when using sgdma code. 2007-08-15 13:36:54 +10:00
Ian Romanick
f563a50d14 Eliminate unused / useless ioctls. 2007-08-14 13:44:51 -07:00
Ian Romanick
7b12174aac Clean up remaining C++ style comments. 2007-08-14 13:24:02 -07:00
Ian Romanick
d3c8e98dd9 Move dwWriteReg to xgi_cmdlist.c, the only file where it is used. 2007-08-14 13:20:37 -07:00
Ian Romanick
be76f0eea9 Remove unused interrupt related functions. 2007-08-14 13:19:48 -07:00
Ian Romanick
891714d8d7 Clean up xgi_(en|dis)able_(mmio|ge) and move to xgi_misc.c. 2007-08-14 13:18:44 -07:00
Eric Anholt
3ee211f4f7 Bug #11895: Only add the AGP base to map offset if the caller didn't.
The i830 and newer intel 2D code adds the AGP base to map offsets already,
because it wasn't doing the AGP enable which used to set dev->agp->base.

Credit goes to Zhenyu for finding the issue.
2007-08-13 16:32:32 -07:00
Ian Romanick
15f841bd52 Strobe magic 0xB03F register to flush PCI-e GART table.
The original XGI kernel driver strobed 0xB03F each time a page was
allocated to back a GART page.  When the driver was converted to use
the DRM SG interface, this code was lost.  Returning it fixes a long
standing issue where the X-server would work fine the first time, but
acceleration commands would be ignored on the second X-server
invocation.
2007-08-13 16:21:20 -07:00
Ian Romanick
20a0e5e429 After calling drm_sman_cleanup, mark both heaps as uninitialized.
Since the heaps weren't marked as uninitialized, SG memory was never
re-allocated.  This prevented the X-server from being able to restart
without re-loading the kernel module.
2007-08-09 18:57:15 -07:00
Ian Romanick
06e09842df Use DRM_MEMORYBARRIER() macro instead of mb(). 2007-08-09 18:28:16 -07:00
Ian Romanick
371f0a4d41 Mask off correct bits in M2REG_AUTO_LINK_STATUS for interrupt handling. 2007-08-09 18:15:42 -07:00
Ian Romanick
6dd97099ea Minor clean up of IRQ code. Much, much more to come. 2007-08-09 16:20:44 -07:00
Ian Romanick
dbd4d0597f Use sman memory manager instead of internal version. 2007-08-09 16:01:14 -07:00
Ian Romanick
aea6b4dea9 Unify alloc and free ioctls.
The DRM_XGI_PCIE_ALLOC and DRM_XGI_FB_ALLOC ioctls (and the matching
free ioctls) are unified to DRM_XGI_ALLOC.  The desired memory region
is selected by xgi_mem_alloc::location.  The region is magically
encoded in xgi_mem_alloc::index, which is used to release the memory.

Bump to version 0.11.0.  This update requires a new DDX.
2007-08-09 15:30:36 -07:00
Ian Romanick
25cb876f85 Associate master file pointer with command list buffer.
Pass the master's file pointer, as supplied to xgi_bootstrap, to
xgi_cmdlist_initialize.  Associate that pointer with the memory
allocated for the command list buffer.  By doing this the memory will
be automatically cleaned up when the master closes the device.  This
allows the removal of some clean up code.
2007-08-09 15:23:13 -07:00
Ian Romanick
f7ba02b745 Unify infrastructure for freeing on-card / GART memory. 2007-08-06 17:27:15 -07:00
Ian Romanick
6718198897 Release client memory in reclaim_buffers_idlelocked instead of preclose. 2007-08-06 16:56:20 -07:00
Ian Romanick
f3072becda Refactor xgi_(fb|pcie)_free_all into xgi_free_all. 2007-08-06 16:35:07 -07:00
Ian Romanick
90907c5915 Replace per-heap semaphores with drm_device::struct_mutex. 2007-08-06 16:17:23 -07:00
Ian Romanick
f96bff9e21 Unify infrastructure for allocating (not yet freeing) on-card / GART memory. 2007-08-06 16:09:05 -07:00
Ian Romanick
5362cc723e Eliminate unnecessary function xgi_pcie_free_locked. 2007-08-06 15:52:06 -07:00
Eric Anholt
d749cc9ae8 Initialize the AGP structure's base address at init rather than enable.
Not all drivers call enable (intel), but they would still like to use this
member in driver code.
2007-08-06 15:45:37 -07:00
Ian Romanick
a6fb93a150 Finish removing allocation "owner" infrastructure. 2007-08-06 15:43:51 -07:00
Ian Romanick
78e9c1a93d Eliminate special-case handling of framebuffer (fake) allocation. 2007-08-06 15:37:56 -07:00
Ian Romanick
997a9a738e Eliminate allocation "owner" usage. 2007-08-06 15:31:34 -07:00
Ben Skeggs
8d5a8ebc31 nouveau: ouch, add nouveau_dma.[ch] files.. 2007-08-06 22:32:36 +10:00
Ben Skeggs
92084c6e05 Export some useful ttm functions to drivers. 2007-08-06 22:11:18 +10:00
Ben Skeggs
cf04641bc6 nouveau: Give DRM its own gpu channel
If your card doesn't have working context switching, it is now broken.
2007-08-06 22:05:31 +10:00
Ben Skeggs
97770db720 nouveau: Various internal and external API changes
1. DRM_NOUVEAU_GPUOBJ_FREE
	Used to free GPU objects.  The obvious usage case is for Gr objects,
	but notifiers can also be destroyed in the same way.

	GPU objects gain a destructor method and private data fields with
	this change, so other specialised cases (like notifiers) can be
	implemented on top of gpuobjs.

2. DRM_NOUVEAU_CHANNEL_FREE

3. DRM_NOUVEAU_CARD_INIT
	Ideally we'd do init during module load, but this isn't currently
	possible.  Doing init during firstopen() is bad as X has a love of
	opening/closing the DRM many times during startup.  Once the
	modesetting-101 branch is merged this can go away.

	IRQs are enabled in nouveau_card_init() now, rather than having the
	X server call drmCtlInstHandler().  We'll need this for when we give
	the kernel module its own channel.

4. DRM_NOUVEAU_GETPARAM
	Add CHIPSET_ID value, which will return the chipset id derived
	from NV_PMC_BOOT_0.

4. Use list_* in a few places, rather than home-brewed stuff.
2007-08-06 21:45:18 +10:00
Ben Skeggs
beaa0c9a28 nouveau: Pass channel struct around instead of channel id. 2007-08-06 03:40:43 +10:00
Eric Anholt
3a0bc518e3 Remove the pinned buffer from the LRU when pinning.
Also, be a little safer with setting the pinned flag within the struct lock.
I'm not 100% sure if this is required, but it seems like it might be.
2007-08-02 14:08:04 -07:00
Eric Anholt
cf4f1a85af Add a couple of doxygen comments from reading the code. 2007-08-02 13:51:55 -07:00
Dave Airlie
7602e4f8a6 drm: add unlocked ioctl code path - not used yet 2007-08-02 19:13:58 +10:00
Ian Romanick
f83000c8b3 Refactor register dumping code. 2007-07-31 17:27:00 -07:00
Dave Airlie
c395d27a72 drm/fence: shut up lockdep 2007-08-01 10:12:36 +10:00
Dave Airlie
283eaa2559 drm: fix fencing refcount error
This extra increase was causing fence leaks on my system, due to create/user add already increasing it twice no need for a 3rd go.
2007-07-31 09:25:51 +10:00
Ian Romanick
08919d8a70 Move additional GE initialization into the kernel.
This code comes directly from the X server.
2007-07-30 12:01:52 -07:00