summaryrefslogtreecommitdiff
path: root/bsd-core/drm_context.c
AgeCommit message (Collapse)AuthorFilesLines
2009-11-17Drop shared-core, bsd-core, linux-core and scripts subdirsKristian Høgsberg1-320/+0
2008-10-10[FreeBSD] Rework all of the memory allocationsRobert Noland1-5/+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-06Style white space cleanup part 2.vehemens1-4/+4
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-09-05Style white space cleanup.vehemens1-35/+35
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-08-29[FreeBSD] Convert drm_driver to a pointer like linux.vehemens1-4/+4
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-08-29[FreeBSD] Replace typedefs on bsd.vehemens1-9/+9
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-15/+18
2007-08-15BSD: Replace brief description in each file's first line with doxygen later on.Eric Anholt1-3/+4
The brief descriptions usually had the wrong filename in them.
2007-07-20Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE.Eric Anholt1-74/+43
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-20Remove DRM_ERR OS macro.Eric Anholt1-6/+6
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.
2005-08-26[1] Fix BSD DRM for the nonroot changes. [2] Don't attempt to acquire theEric Anholt1-1/+4
DMA lock in a non-DMA driver, as it will be uninitialized. Submitted by: [1] jkim (minor changes by me)
2005-08-05Rename the driver hooks in the DRM to something a little moreEric Anholt1-4/+4
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-16Use /*- to begin license blocks in BSD code to reduce diffs against FreeBSDEric Anholt1-1/+2
CVS.
2005-02-05- Implement drm_initmap, and extend it with the resource number to helpEric Anholt1-3/+1
FreeBSD. Add drm_get_resource_{start|len} so linux-specific stuff doesn't need to be in shared code. - Fix mach64 build by using __DECONST to work around passing a const pointer to useracc, which is unfortunately not marked const. - Get rid of a lot of maplist code by not having dev->maplist be a pointer, and by sticking the link entries directly in drm_local_map_t rather than having a separate structure for the linked list. - Factor out map uninit and removal into its own routine, rather than duplicating in both drm_takedown() and drm_rmmap(). - Hook up more driver functions, and correct FreeBSD-specific bits of radeon_cp.c, making radeon work. - Baby steps towards using bus_space as we should.
2004-11-07Refine the locking of the DRM. Most significant is covering the driverEric Anholt1-5/+8
ioctls with dev_lock, which is a major step toward being able to remove Giant. Covers some new pieces (dev->unique*) in the core, and avoids one call down into system internals with the drm lock held, which is usually bad (FreeBSD LOR #23, #27).
2004-11-07Now that the memory debug code is gone, and all 3 BSDs have M_ZERO, stopEric Anholt1-13/+8
using drm_alloc/drm_free in the core and instead use plain malloc/free.
2004-11-06Commit WIP of BSD conversion to core model. Compiles for r128, radeon, butEric Anholt1-34/+30
doesn't run yet. Moves the ioctl definitions for these two drivers back to the shared code -- they aren't OS-specific.
2004-08-17Merged drmfntbl-0-0-1drmfntbl-0-0-1-20040817-mergeDave Airlie1-7/+5
2004-08-14Add a "dev" argument to DRIVER_CTX_[CD]TOR. This will be used in anEric Anholt1-2/+2
upcoming commit for the SiS driver.
2003-10-03Stylistic preparation for SMPng locking work: DRM_LOCK/DRM_UNLOCK have sideEric Anholt1-18/+18
effects, so make them look like functions (add parenthesis).
2003-10-02Mostly whitespace cleanups and style(9) fixes focused on "if(" -> "if ("Eric Anholt1-58/+54
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-29Port the SiS DRM to FreeBSD. This includes the ability for the DRM toEric Anholt1-0/+8
allocate framebuffer memory without sisfb, and a new ioctl to be used by the X Server which tells the DRM what region of framebuffer memory to allocate from. Also fixes a possibility to panic the kernel I believe. Tested on linux with sisfb and FreeBSD (without sisfb) with new DRI only.
2003-08-19- Remove $FreeBSD$ tags as they weren't too useful and merges are now beingEric Anholt1-1/+1
done through perforce. - Add copyright headers to drm_os_*bsd.h, still need to research the other copyright-less files better.
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-2/+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-345/+3
2003-04-24Remove a bunch of dead code and fix spelling of a couple of comments.Eric Anholt1-8/+0
2003-04-24Remove DRM_DMA_HISTOGRAM and associated code.Eric Anholt1-18/+0
2003-04-24Make DRM(read) and DRM(poll) stubs and remove DRM(write) andEric Anholt1-9/+0
DRM(write_string). This is the first part of removing much of the support code for gamma from the BSD DRM, since it appears that no new drivers are using it and nobody has ever shown interest in gamma on BSD.
2003-03-11Merge back from FreeBSD-current, adding FreeBSD ID tags to aid futureX_4_3_0-20020324-preimportEric Anholt1-0/+1
merging. Also includes an update to radeon PCI IDs.
2003-02-21Merge from bsd-4-0-0-branch.bsd-4-0-0-20030221-mergeEric Anholt1-16/+12
2002-07-05merged bsd-3-0-0-branchbsd-3-0-0-20020705-mergeAlan Hourihane1-96/+95
2002-01-27Initial revisionDavid Dawes1-0/+730