Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
Signed-off-by: Robert Noland <rnoland@2hip.net>
|
|
|
|
Signed-off-by: Robert Noland <rnoland@2hip.net>
|
|
Signed-off-by: Robert Noland <rnoland@2hip.net>
|
|
Signed-off-by: Robert Noland <rnoland@2hip.net>
|
|
Signed-off-by: Robert Noland <rnoland@2hip.net>
|
|
|
|
Signed-off-by: Robert Noland <rnoland@2hip.net>
|
|
|
|
Thanks to airlied.
|
|
|
|
|
|
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>
|
|
|
|
|
|
|
|
The i915 driver now works again.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
Also, annotate where signs change, to hopefully remind the reader of these
issues in the future.
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
With this, all modules build again.
|
|
|
|
ioctl wrapper
|
|
Tested on r200/r300. i915 updates still remain to be done.
|
|
|
|
This helps us unbreak FreeBSD DRM from the 965 changes.
|
|
|
|
attachment. Make our mga_drv.c use them, while I'm here.
Submitted by: Jonathan Fosburgh <jonathan@fosburgh.org>
|
|
drm_mtrr_{add,del} for handling the MTRR setup. Still has a LOR issue
with DRM_VERIFYAREA_READ/DRM_COPY_FROM_USER_UNCHECKED in savage_bci.c
-- this won't work with the fine-grained locking in use, and just doing
a single copyin to a temporary will probably work fine. Also note that
the module leaks approximately 4 kb on unload.
|
|
up a good bit, I think. Also, remove the agp_uninit() function which
has lain around as a noop for years now. The FreeBSD DRM is now all
compiling, with the exception of via. One known sleeping-with-lock-held
issue remains.
|
|
radeon_cp.c to use a drm_local_map_t-type mapping (drm_core_ioremap
rather than drm_ioremap), which contains private device mapping
information on BSD. I also changed the ati_pcigart interface to use
"void *" for pointers to kva rather than "unsigned long". While PCIGART
support appears to be broken on FreeBSD currently, I think this is not
new, and BusType PCI remains working on my r100 in Linux.
|
|
up is pcigart.
|
|
|
|
allocate the resource RF_ACTIVE, pull out the appropriate value, and
return it. However, allocating large framebuffers RF_ACTIVE would run
the system out of KVA, and this also left open the possibility of the
resource getting moved after getting the offset. Instead, when either
of these are called, allocate the resource if it isn't allocated
already (non-RF_ACTIVE) and store it in the DRM device, to be cleaned
up on lastclose.
|
|
DMA lock in a non-DMA driver, as it will be uninitialized.
Submitted by: [1] jkim (minor changes by me)
|
|
|
|
cares about root on the BSD side, but should be secure.
|
|
understandable: preinit -> load postinit -> (removed) presetup ->
firstopen postsetup -> (removed) open_helper -> open prerelease ->
preclose free_filp_priv -> postclose pretakedown -> lastclose
postcleanup -> unload release -> reclaim_buffers_locked version ->
(removed)
postinit and version were replaced with generic code in the Linux DRM
(drivers now set their version numbers and description in the driver
structure, like on BSD). postsetup wasn't used at all. Fixes the savage
hooks for initializing and tearing down mappings at the right times.
Testing involved at least starting X, running glxgears, killing
glxgears, exiting X, and repeating.
Tested on: FreeBSD (g200, g400, r200, r128) Linux (r200, savage4)
|
|
driver's preinit routine, and by using DRM_COPY_TO_USER_IOCTL when
copying out to an ioctl's data pointer. Pulled from the latest version
of my drm-hook-rename.diff and only compile-tested after that.
|