summaryrefslogtreecommitdiff
path: root/bsd-core/drm_dma.c
AgeCommit message (Collapse)AuthorFilesLines
2009-11-17Drop shared-core, bsd-core, linux-core and scripts subdirsKristian Høgsberg1-136/+0
2008-10-10[FreeBSD] Rework all of the memory allocationsRobert Noland1-7/+7
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-09-05Style white space cleanup.vehemens1-7/+8
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-08-29[FreeBSD] Convert drm_driver to a pointer like linux.vehemens1-2/+2
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-05-27[FreeBSD] Convert from drm_device_t to struct drm_device for consistency.Eric Anholt1-5/+5
2007-08-15BSD: Replace brief description in each file's first line with doxygen later on.Eric Anholt1-3/+8
The brief descriptions usually had the wrong filename in them.
2007-08-13Bug #11951: Fix an errno sign inversion on pre-FreeBSD 5.vehemens1-0/+1
Also, annotate where signs change, to hopefully remind the reader of these issues in the future.
2007-07-20Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE.Eric Anholt1-4/+2
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-20Replace filp in ioctl arguments with drm_file *file_priv.Eric Anholt1-4/+5
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-20Remove DRM_ERR OS macro.Eric Anholt1-2/+2
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-18Add dry-coded DRM drawable private information storage for FreeBSD.Eric Anholt1-2/+2
With this, all modules build again.
2005-08-05Rename the driver hooks in the DRM to something a little moreEric Anholt1-2/+2
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)
2005-04-26Convert BSD code to mostly use bus_dma, the dma abstraction for dealingEric Anholt1-4/+1
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
2005-04-16Use /*- to begin license blocks in BSD code to reduce diffs against FreeBSDEric Anholt1-1/+2
CVS.
2004-11-07Now that the memory debug code is gone, and all 3 BSDs have M_ZERO, stopEric Anholt1-25/+12
using drm_alloc/drm_free in the core and instead use plain malloc/free.
2004-11-06Get r128 basically working: Hook up the driver's dma ioctl, use the properEric Anholt1-0/+13
offset into the driver ioctl array, and don't make the ctx bitmap conditional.
2004-11-06Commit WIP of BSD conversion to core model. Compiles for r128, radeon, butEric Anholt1-53/+14
doesn't run yet. Moves the ioctl definitions for these two drivers back to the shared code -- they aren't OS-specific.
2004-01-06Fix some misuse of NULL where 0 is intended.Eric Anholt1-1/+1
Obtained from: FreeBSD CVS
2003-10-19- SMPng lock the DRM. This is only partial -- there are a few code pathsEric Anholt1-1/+5
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.
2003-10-19Clean up extra zeroing of dev->dma, and use calloc to take advantage ofEric Anholt1-8/+2
M_ZERO.
2003-10-17- Move IRQ functions from drm_dma.h to new drm_irq.h and disentangle themEric Anholt1-221/+6
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.
2003-10-03Stylistic preparation for SMPng locking work: DRM_LOCK/DRM_UNLOCK have sideEric Anholt1-9/+9
effects, so make them look like functions (add parenthesis).
2003-10-02Mostly whitespace cleanups and style(9) fixes focused on "if(" -> "if ("Eric Anholt1-4/+1
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.
2003-08-19- Remove $FreeBSD$ tags as they weren't too useful and merges are now beingEric Anholt1-1/+0
done through perforce. - Add copyright headers to drm_os_*bsd.h, still need to research the other copyright-less files better.
2003-07-29IRQ code cleanup suggested by Linus TorvaldsMichel Daenzer1-1/+1
i830 build fix
2003-07-25Compile fixes for recent 2.5/2.6 Linux kernels. I hope this doesn't breakMichel Daenzer1-1/+1
the i830 driver or the BSDs. :)
2003-04-26MFL: Don't install irq handler unless the driver has been initialized.Eric Anholt1-0/+3
2003-04-26Add PCI DMA memory functions and make addbufs_pci and associated code useEric Anholt1-19/+18
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.
2003-04-25Merge from FreeBSD-current.FreeBSD-20030424Eric Anholt1-1/+1
2003-04-24Remove more gamma DMA infrastructure. Most of this code was copied straightEric Anholt1-22/+0
from linux, so it could be added back if some driver needed it in the future.
2003-04-24Remove more gamma DMA code. This isn't all of it, but it's a major portion.Eric Anholt1-265/+0
2003-04-24Remove DRM_DMA_HISTOGRAM and associated code.Eric Anholt1-59/+0
2003-03-29Add DRMFILE definitions and supply filp for BSD in theEric Anholt1-3/+3
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.
2003-03-11Merge back from FreeBSD-current, adding FreeBSD ID tags to aid futureX_4_3_0-20020324-preimportEric Anholt1-0/+2
merging. Also includes an update to radeon PCI IDs.
2003-03-06Remove the vbl signal code because it's untested (and has lock issues onEric Anholt1-1/+10
-current).
2003-03-04DRM_FREE/2 patch from Philip BrownKeith Whitwell1-1/+1
2003-02-21Merge from bsd-4-0-0-branch.bsd-4-0-0-20030221-mergeEric Anholt1-1/+22
2003-02-02don't inflate relative vblank sequence numbers on repeated calls (e.g. whenMichel Daenzer1-0/+1
interrupted by a signal)
2002-12-06Add vblank signal code for BSD DRM. Untested so far, but working with aEric Anholt1-7/+58
4.2.0 userland at least.
2002-10-29Use bus_alloc_resource/bus_release_resource more properly: save the ridEric Anholt1-13/+15
returned by alloc.
2002-09-29Move os-dependent stuff out of radeon_irq.cKeith Whitwell1-1/+0
2002-09-29Fix up BSD irq handling.Eric Anholt1-20/+0
2002-09-26BSD vblank framework.Eric Anholt1-3/+56
2002-07-05merged bsd-3-0-0-branchbsd-3-0-0-20020705-mergeAlan Hourihane1-41/+36
2002-03-11fixups for *BSDtrunk-20020328Alan Hourihane1-5/+4
2002-03-06first pass at merging mesa 4.0 kernel drivers into new bsd-3-0-0 branch.Alan Hourihane1-0/+19
2002-01-27Initial revisionDavid Dawes1-0/+605