Robert Noland
b0acc88606
FreeBSD: Increase MAX_PCI_RESOURCE
...
We can have more than 3 BARs to access.
2009-03-16 00:03:40 -05:00
Robert Noland
f78040266b
FreeBSD: Cast map handles to vm_offset_t
...
This prevents some warnings with nouveau.
2009-03-16 00:01:47 -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
14503dafa7
FreeBSD: Rework DRM_[DEBUG,ERROR,INFO] macros a bit.
2009-03-05 00:47:26 -06:00
Robert Noland
0a227a3361
FreeBSD: Garbage collect entries from pcireg.h since we now include it.
2009-03-05 00:46:32 -06: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
4a27f1c638
FreeBSD: rework drm_scatter.c which allocates scatter / gather pages for use by
...
ati pci gart to use bus_dma to handle the allocations. This fixes
a garbled screen issue on at least some radeons (X1400 tested).
2009-03-05 00:42:52 -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
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
d45bc6667c
i915: This was part of a sync to the intel driver at some point
...
-Remove the old TTM interface
-Move register definitions to i915_reg.h
-Rework the irq handler
2009-02-24 12:24:29 -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
d6c9786836
FreeBSD: Don't set PZERO in mtx_sleep.
2009-02-23 20:16:15 -06: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
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
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
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
bfea578352
[FreeBSD] Add drm_drawable_free_all()
2008-08-24 15:25:20 -04:00
vehemens
3e9541230d
[FreeBSD] Move vblank bits into their own structure.
...
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-08-24 15:25:19 -04:00
Robert Noland
2580a065d8
[FreeBSD] Catch up to linux on vblank-rework
2008-07-24 00:21:00 -04:00
Robert Noland
f57f01f028
[FreeBSD] Improve upper_32_bits define.
...
Thanks to airlied.
2008-07-21 18:06:52 -04:00
Robert Noland
480c317a6a
[FreeBSD] drm_irq.c updates for vblank fixes.
2008-07-17 14:08:06 -04:00
Robert Noland
b0e4619a39
FreeBSD: Fix radeon build
2008-07-16 23:39:25 -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
6d6921719c
[FreeBSD] Incorporate vblank fixes for bsd.
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
Robert Noland
4ce47fd328
[FreeBSD] Get rid of vbl_lock and re-use irq_lock.
2008-06-01 20:33:30 -07:00
Robert Noland
8cd045079e
[FreeBSD] Add vblank-rework support and get drivers building.
...
The i915 driver now works again.
2008-05-27 14:25:20 -07: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
690dd04d1b
bsd: Replace other occurrences of msleep with mtx_sleep
2007-12-02 01:45:09 -05:00
Robert Noland
fbc307274f
bsd: Now make secondary vblank work
...
We needed to specifically check for driver support and test the correct
vbl_received value. Also pulled over support for _DRM_VBLANK_NEXTONMISS
from the linux code.
2007-12-02 01:23:11 -05:00
Robert Noland
787d500c15
bsd: Hook secondary vblank support.
2007-12-01 17:23:09 -05:00
Robert C. Noland III
9be085cbf4
Fix up drm_ati_pcigart_info
2007-11-29 09:38:43 +10:00
Robert Noland
c12a3a3ce0
Bug #13233 : Chase move of agp headers on FreeBSD.
2007-11-18 22:41:41 -08:00
Kristian Høgsberg
68cdcda1ea
Add new shared header file drm_internal.h.
...
This header file is shared across linux and bsd, but is not installed
for user space to access. It's the place to put prototypes and data
types that aren't platform or chipset specific, but still internal to
the drm.
2007-11-14 14:28:34 -05:00
vehemens
4340f49bf7
Bug #11951 : Fix an errno sign inversion on pre-FreeBSD 5.
...
Also, annotate where signs change, to hopefully remind the reader of these
issues in the future.
2007-08-13 11:36:10 -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
f4e1c1d05c
FreeBSD warnings cleanup.
2007-07-19 06:46:13 -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
Eric Anholt
3f04fe7890
Fix FreeBSD build.
2007-07-16 01:53:06 -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
dddacd7a3a
Use the DRM_INIT_WAITQUEUE argument (needed on Linux) to avoid a warning.
2006-09-06 23:26:50 -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