Eric Anholt
3169d9639b
intel: Protect bufmgr objects with a pthread mutex.
...
We want to be able to use the bufmgr from multiple threads for GL, and thus
we need to protect the internal structures.
The pthread-stubs package is used so that programs not linked against
pthreads get weak symbols to stubs and don't eat most of the cost.
2008-10-09 12:57:09 -07:00
Xiang, Haihao
604759d4a7
intel: fix for write_domain and static BOs.
...
http://bugs.freedesktop.org/show_bug.cgi?id=17705
2008-10-09 11:59:29 +08:00
Alex Deucher
728d8e226f
radeon: add comment to clarify bus mastering on PCIE chips
2008-10-06 12:12:49 -04:00
Alex Deucher
6f9dfa098f
radeon: fix duplicate define in my last commit
...
That's what I get for committing at 3 AM.
2008-10-06 12:01:11 -04:00
Dave Airlie
8e5f5ed189
radeon: PCIE cards don't appear to have explicit bus master
2008-10-07 04:47:54 +10:00
Dave Airlie
d0aff12052
drm: add create gpu tree script
2008-10-07 04:07:40 +10:00
Alex Deucher
4b98f6d74f
radeon: fix bus master enabled bits on newer asics
2008-10-06 03:08:27 -04:00
Mihail Zenkov
5a36cce349
radeon: fix missing bit from rs740 patch
...
See bug 17908
2008-10-06 00:49:15 -04:00
Alex Deucher
ce40261012
radeon: Add support for HD2100 IGP (RS740)
2008-10-04 20:43:21 -04:00
Robert Noland
60cf3a4db4
[FreeBSD] Don't explicitly bzero driver softc.
...
This is already handled for us.
Suggested by John Baldwin
2008-10-03 14:11:20 -04:00
Robert Noland
9c0ce38df3
[FreeBSD] Use M_WAITOK when allocating driver memory.
...
We don't explicitly check for error here and M_WAITOK will just put the
process to sleep waiting on resources to become available.
Suggested by John Baldwin
2008-10-03 14:05:45 -04:00
Robert Noland
4c92abfa8d
[FreeBSD] Do a bit of optimization on drm_order()
2008-10-03 13:56:50 -04:00
Robert Noland
81952c7dd1
Use devfs_get_cdevpriv in mmap as well.
...
d_mmap gets called twice and we are only able to associate the file_priv
during the first call. The second call will return EBADF and we need to
assume that the call was succesful. d_mmap will not tolerate having an
error returned for the second call.
2008-10-01 20:49:03 -04:00
Xiang, Haihao
073cb5ee1d
intel: Copy data from card memory back to backing store when mapping.
...
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=17705
2008-09-27 11:01:24 +08:00
Eric Anholt
2db8e0c8ef
intel: Allow up to 15 seconds chewing on one buffer before acknowledging -EBUSY.
...
The gltestperf demo in some cases took over seven seconds to make it through
one batchbuffer on a GM965.
Bug #17004 .
2008-09-23 17:10:04 -07:00
Eric Anholt
0dccf017ab
intel: Replace wraparound test logic in bufmgr_fake. Again.
...
I'd swapped the operands, so if we weren't in lockstep with the hardware we
said the sequence was always passed. Additionally, a race was available that
we might have failed at recovering from. Instead, I've replaced the logic
with new stuff that should be more robust and not rely on all the parties in
userland following the same IRQ_EMIT() == 1 protocol. Also, in a radical
departure from past efforts, include a long comment describing the failure
modes and how we're working around them.
Thanks to haihao for catching the original issue.
2008-09-23 17:10:04 -07:00
Eric Anholt
1b3abe62b5
intel: Do strerror on errno, not on the -1 return value from ioctl.
2008-09-23 17:10:04 -07:00
Xiang, Haihao
3949f3c9ea
intel: Fix driver-supplied argument to exec function (fd.o bug #17653 ).
2008-09-22 10:16:19 +08:00
Robert Noland
8ca06eb492
[FreeBSD] Convert to using cdevpriv for file_priv tracking
2008-09-17 23:15:08 -04:00
Ben Skeggs
ee6bcabc50
nv50: add initial context for chipset 0xaa
...
This just doesn't look right..
2008-09-17 22:18:03 +10:00
Ben Skeggs
d55e8090fa
nv50: add initial context to match ctxprog for chipset 0x50
2008-09-17 22:03:38 +10:00
Ben Skeggs
4d2f1257fa
nv50: add ctxprog for chipset 0x50
2008-09-17 15:13:27 +10:00
Ben Skeggs
301be1dc9b
nv50: add ctxprog for chipset 0xaa
2008-09-17 15:02:54 +10:00
Ben Skeggs
f152482bde
nv50: add support for chipset 0x92
2008-09-17 14:52:22 +10:00
vehemens
973c634eaa
Remove incomplete and obsolete free/net/open code.
...
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-09-10 23:35:10 -04:00
Eric Anholt
b54d15d8fd
Add missing \ to libdrm_la_SOURCES
...
Reported by jcristau.
2008-09-10 20:05:02 -07:00
Eric Anholt
368b392e6d
intel: don't forget to include config.h in bufmgr code.
...
Thanks to airlied for catching this.
2008-09-10 14:07:19 -07:00
Eric Anholt
f9d98beefc
intel: move drm calls to exec buffers to libdrm_intel.
...
This avoids duplicating the effort in 3 places. Also, added emit/wait fence
callbacks back in bufmgr_fake since we need it for non-drm 2d. Sigh.
2008-09-10 14:07:18 -07:00
Eric Anholt
869d8bebed
intel: Move IRQ emit/wait from callbacks into the bufmgr.
...
In the process, work around the glaring bugs of the kernel irq wait function.
2008-09-10 14:07:18 -07:00
Eric Anholt
738e36acbc
Move intel libdrm stuff to libdrm_intel.so
...
dri_bufmgr.h is replaced by intel_bufmgr.h, and several functions are renamed,
though the structures and many functions remain dri_bufmgr_* and dri_bo_*
2008-09-10 14:07:18 -07:00
Eric Anholt
09cf0f0213
drm: Add tests for GEM_FLINK ioctl.
2008-09-10 14:07:18 -07:00
Robert Noland
828ae3f6b8
[FreeBSD] We need to call drm_detach before we free dev->driver.
...
The driver is in control of the show, so when you try and unload a module
the driver detach routine is called first. It is what drives the whole
unload process and so lots of panics occur if dev->driver is already
free.
2008-09-08 16:40:52 -04:00
Robert Noland
2880c86eb2
[FreeBSD] Implement drm_ioremap_wc() to set a range of mem to write-combining
2008-09-07 12:44:02 -04:00
Robert Noland
740f09bffd
[FreeBSD] IGP gart needs to be un-cached.
...
Airlied inadvertently discovered that the IGP gart needs to be un-cached
for radeon rs485 and rs690 to work. Initial tests by placing a wbinvd()
after allocating the gart were successful. This is an attempt at a more
appropriate method of achieving success.
2008-09-06 21:08:33 -04:00
vehemens
be5fad45ee
Free temp_pagelist on error. Free in reverse order. Noticed by open.
...
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-09-06 21:07:46 -04:00
vehemens
9ad5a6d0d7
Pass lock data like linux and open.
...
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-09-06 18:55:03 -04:00
vehemens
b8a9cebddc
Move order to end like linux.
...
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-09-06 18:55:03 -04:00
vehemens
0808cf923d
Style white space cleanup part 2.
...
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-09-06 18:55:03 -04:00
Robert Noland
6f2479c674
[FreeBSD] Ensure that drm_pci_alloc is never called while locks are held.
2008-09-06 18:37:06 -04:00
vehemens
31709aa2be
Reorder lock functions like linux.
...
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-09-05 12:42:41 -04:00
vehemens
76dd74c64e
Style white space cleanup.
...
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-09-05 12:42:41 -04:00
vehemens
ed6dd03818
Need M_NOWAIT for malloc.
...
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-09-05 12:38:41 -04:00
Robert Noland
3f915f68e8
i915: fix i915_ring_validate()
2008-09-05 12:38:41 -04:00
Stephane Marchesin
ce84511f4d
nouveau: 8200 cards are 0xA0 family.
2008-09-05 00:17:52 +02:00
Dave Airlie
99f8cce3ea
drm: fix sysfs error path.
...
Pointed out by Roel Kluin on dri-devel.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-09-02 10:08:26 +10:00
Dave Airlie
cd7d71f19c
radeon: make writeback work after suspend/resume.
...
While re-writing this for modesetting, I find we disable writeback on
resume.
2008-08-31 07:27:26 +10:00
vehemens
2b27804715
[FreeBSD] Use driver features macros and flags
...
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-08-29 15:46:06 -04:00
vehemens
2649103bf9
[FreeBSD] Convert drm_driver to a pointer like linux.
...
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-08-29 15:46:05 -04:00
vehemens
71f0a3e389
[FreeBSD] Replace typedefs on bsd.
...
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-08-29 15:46:05 -04:00
vehemens
b92f557767
[FreeBSD] Catch up to vblank rework for via.
...
(No, we don't build via right now.)
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-08-29 15:46:05 -04:00