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>
|
|
|
|
The brief descriptions usually had the wrong filename in them.
|
|
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.
|
|
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)
|
|
with IOMMUs and such. There is one usage of the forbidden vtophys()
left in drm_scatter.c which will be fixed up soon. This required a KPI
change for drm_pci_alloc/free() to return/use a drm_dma_handle_t that
keeps track of os-specific bits, rather than just passing around the
vaddr/busaddr/size.
Submitted by: Tonnerre Lombard (partially) Tested on: FreeBSD: Rage128
AGP/PCI Linux: Savage4 AGP/PCI
|
|
CVS.
|
|
using drm_alloc/drm_free in the core and instead use plain malloc/free.
|
|
offset into the driver ioctl array, and don't make the ctx bitmap
conditional.
|
|
doesn't run yet. Moves the ioctl definitions for these two drivers back
to the shared code -- they aren't OS-specific.
|
|
Obtained from: FreeBSD CVS
|
|
used by root (the X Server) which are not locked. However, it should
deal with lost-IRQ issues on -current which I think people have been
experiencing but I am unable to reproduce (though I understand why they
would occur, because of a bug of mine). Note that most of the locking
(DRM_LOCK()/UNLOCK()) is all covered by Giant still, so it doesn't
matter yet.
- Remove locking on FreeBSD-stable and NetBSD. These are covered by the
fact that there is no reentrancy of the kernel except by interrupts,
which are locked using spldrm()/splx() instead.
|
|
M_ZERO.
|
|
from __HAVE_DMA. This will be useful for adding vblank sync support to
sis and tdfx. Rename dma_service to irq_handler, which is more
accurately what it is.
- Fix the #if _HAVE_DMA_IRQ in radeon, r128, mga, i810, i830, gamma to have
the right number of underscores. This may have been a problem in the
case that the server died without doing its DRM_IOCTL_CONTROL to
uninit.
|
|
effects, so make them look like functions (add parenthesis).
|
|
Change some nearby memset()s to bzero()s or to calloc allocations to
take advantage of M_ZERO). Reverse some error tests to reduce high
levels of indentation. Move the sg_cleanup() call out of the maplist
loop in DRM(takedown)-- I can't see any need for it to be inside.
|
|
done through perforce.
- Add copyright headers to drm_os_*bsd.h, still need to research the other
copyright-less files better.
|
|
i830 build fix
|
|
the i830 driver or the BSDs. :)
|
|
|
|
it. To do this we need to save the bus address along with the virtual
address in the seglist. Also fix some error handling and a few bits of
whitespace.
|
|
|
|
from linux, so it could be added back if some driver needed it in the
future.
|
|
|
|
|
|
post-drm-filp-0-1-branch world. The filp is a void * cast from the
current pid. This is a temporary solution which maintains the status
quo until a proper solution is implemented.
What is really needed is a unique pointer per open, hopefully with a device
private area. This can be done in FreeBSD for all entry points except
mmap, but is difficult (sys/dev/streams/streams.c is an example). I
have partially completed code for this but have not had time to debug,
so this is a temporary fix.
|
|
merging. Also includes an update to radeon PCI IDs.
|
|
-current).
|
|
|
|
|
|
interrupted by a signal)
|
|
4.2.0 userland at least.
|
|
returned by alloc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|