Robert Noland
51d6346f9f
Move drm_vblank_cleanup() after lastclose.
...
This may prevent a possible panic on shutdown.
2009-03-31 13:36:04 -05:00
Robert Noland
dec955d728
FreeBSD: Add support for matching solely on vedor id.
...
This also adds that ability to set device name from VPD, but that
doesn't seem to be working...
2009-03-16 00:41:23 -05:00
Robert Noland
6777c6bb8b
FreeBSD: Don't set the PZERO flag to mtx_sleep.
...
We also don't support anything old enough to need tsleep.
2009-03-16 00:17:54 -05:00
vehemens
2221e16703
FreeBSD use kdev for kernel device name
...
Signed-off-by: Robert Noland <rnoland@2hip.net>
2009-03-08 22:18:43 -05:00
Robert Noland
222dc6582e
FreeBSD: We only want drm to ever attach to the primary pci device.
...
Intel 855 chips present the same pci id for both heads. This prevents
us from attaching to the dummy second head. All other chips that I
am aware of either only present a single pci id, or different ids
for each head so that we only match on the correct head.
2009-03-05 00:44:56 -06:00
Robert Noland
ad64ff30d0
FreeBSD: Introduce a kernel tuneable to disable msi at boot time.
2009-02-27 18:16:18 -06:00
Robert Noland
957b10695b
Move vblank_init to driver load time.
2009-02-27 18:16:17 -06:00
Robert Noland
ab582f64fd
FreeBSD: Fix up some ioctl permissions issues missed many times over.
...
This was somehow hit with r600 demo.
Submitted by: Jung-uk Kim <jkim@FreeBSD.org>
2009-02-26 23:51:57 -06:00
Robert Noland
e96fc62e53
FreeBSD: Drop the Giant lock.
2009-02-24 15:49:45 -06:00
Robert Noland
b9b8e8f3cc
FreeBSD: Turn on msi
...
There is a blacklist for devices that advertise the capability, but
don't work properly.
2009-02-24 15:47:35 -06:00
Robert Noland
1c381092a3
FreeBSD: Rip out the locked task support now that i915 no longer uses it.
2009-02-24 00:22:56 -06:00
Robert Noland
9d402905c0
FreeBSD: There is no compelling reason to hold the lock here.
...
When I was lock profiling, this was high up on the list and I
see no reason to do it.
2009-02-23 20:22:44 -06:00
Robert Noland
8256c347cc
[FreeBSD] We should use dev2unit() rather than minor()
2008-10-23 15:46:32 -04:00
Robert Noland
cdd3e9fc56
[FreeBSD] Rework all of the memory allocations
...
Allocate memory from different pools. This allows the OS to track memory
allocations for us, much like the linux memory debugging. This will ease
tracking down memory leaks since the OS can track the number of allocations
from each pool and help to point us in the right direction. Also replace
drm_alloc and friends with static __inline__ versions while we are here.
2008-10-10 13:06:22 -04:00
Robert Noland
8ca06eb492
[FreeBSD] Convert to using cdevpriv for file_priv tracking
2008-09-17 23:15:08 -04: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
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
0808cf923d
Style white space cleanup part 2.
...
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-09-06 18:55:03 -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
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
Robert Noland
c7f7b6d7e2
[FreeBSD] Fix a couple of locking problems.
2008-08-29 15:46:05 -04:00
Robert Noland
bfea578352
[FreeBSD] Add drm_drawable_free_all()
2008-08-24 15:25:20 -04:00
vehemens
e6010778a8
[FreeBSD] Fix lock leak.
...
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-08-24 15:25:19 -04:00
Robert Noland
7a3d6624c4
[FreeBSD] Duh, we need to actually define the drm_modeset_ctl...
2008-07-25 13:46:28 -04:00
Owain Gordon Ainsworth
74cf1f91be
BSD: change drm_locked_task*() to use the same scheme as linux.
...
The current code can sleep in an interrupt handler, that is bad. So
instead if we can't grab the lock, flag it and run the tasklet on
unlock.
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-07-16 21:37:39 -04:00
Robert Noland
96141bd33c
[FreeBSD] We need to request busmastering support.
...
This seems to be the key to getting at least some radeon
cards working. Most, if not all drivers need it enabled,
so just request it once the driver has attached.
2008-06-08 02:00:48 -04:00
Robert Noland
ec3d996021
[FreeBSD] Forgot to call mtx_destroy on all the locks at unload.
2008-06-08 01:53:45 -04:00
Robert Noland
fc74c2e9d6
[FreeBSD] Go back to using vbl_lock and move init/destroy to load/unload.
2008-06-08 01:53:45 -04:00
Eric Anholt
ad8eb0ed01
[FreeBSD] Convert from drm_device_t to struct drm_device for consistency.
2008-05-27 14:25:08 -07:00
Robert Noland
0c3e5261b6
mtx_sleep is preferred to msleep
...
Calling semantics are the same and both were introduced in 5.0
2007-12-01 14:44:30 -05:00
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
Robert Noland
83e62be6f4
bsd: Move counter initialization to load time.
2007-12-01 02:32:23 -05:00
Jung-uk Kim
36120264ca
Bug #11870 : FreeBSD hardware lock cleanup fix with multiple opens by a process.
...
Previously, the lock would get released on the first close by the X Server
(during AIGLX setup), and the Radeon driver would then hang in initialization
due to unexpected failure in DRM calls that required the lock to be held.
Based on a patch by Kostik Belousov.
2007-10-17 12:52:12 -07:00
Eric Anholt
f0fd53f86b
FreeBSD: Fill in domain field when supported.
2007-10-10 15:32:05 -07:00
vehemens
a9ee144eab
BSD: simplify drm_ioctl() after other refactoring.
2007-08-15 11:12:46 -07:00
Eric Anholt
5346fc5f36
BSD: Replace brief description in each file's first line with doxygen later on.
...
The brief descriptions usually had the wrong filename in them.
2007-08-15 11:06:49 -07: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
Eric Anholt
e39286eb5e
Remove DRM_ERR OS macro.
...
This was used to make all ioctl handlers return -errno on linux and errno on
*BSD. Instead, just return -errno in shared code, and flip sign on return from
shared code to *BSD code.
2007-07-20 12:53:52 -07:00
Eric Anholt
e544286eae
FreeBSD: Fix the recently added drawable add/remove/update code.
2007-07-19 06:17:58 -07:00
Eric Anholt
33a50412c2
Add dry-coded DRM drawable private information storage for FreeBSD.
...
With this, all modules build again.
2007-07-18 14:22:49 -07: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
Jung-uk Kim
b0c8d885ce
Update a bunch of FreeBSD port code.
...
Tested on r200/r300. i915 updates still remain to be done.
2007-05-29 15:02:44 -07:00
Eric Anholt
55057660f0
Put the PCI device/vendor id in the drm_device_t.
...
This helps us unbreak FreeBSD DRM from the 965 changes.
2006-09-06 23:25:14 -07:00
Eric Anholt
7f2c7f9977
Merge patch from jhb to catch up with FreeBSD-current vgapci master device
...
changes.
2005-12-30 02:17:05 +00:00
Eric Anholt
20fcbae5ac
Finish the last bits necessary to get the i915 DRM port working on FreeBSD
...
Submitted by: Alexey Popov <llp@iteranet.com>
2005-12-02 23:41:47 +00:00
Eric Anholt
422002dc84
FreeBSD PR kern/85479: Restore the enabling of debugging by default by the
...
DRM_DEBUG kernel option. It remains controlled by hw.dri.*.debug no
matter what.
2005-12-02 08:47:04 +00:00
Eric Anholt
c7af46cf7d
Correct another LOR issue with resource allocation. This leaves the
...
drm_get_resource_* resource allocation a little racy, but they're
getting called at either X Server startup or driver load, so it's
serialized anyway.
2005-11-08 21:36:54 +00:00