summaryrefslogtreecommitdiff
path: root/bsd-core/drmP.h
AgeCommit message (Collapse)Author
2008-09-07[FreeBSD] Implement drm_ioremap_wc() to set a range of mem to write-combiningRobert Noland
2008-09-06Pass lock data like linux and open.vehemens
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-08-29[FreeBSD] Use driver features macros and flagsvehemens
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-08-29[FreeBSD] Convert drm_driver to a pointer like linux.vehemens
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-08-29[FreeBSD] Replace typedefs on bsd.vehemens
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-08-24[FreeBSD] Add drm_drawable_free_all()Robert Noland
2008-08-24[FreeBSD] Move vblank bits into their own structure.vehemens
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-07-24[FreeBSD] Catch up to linux on vblank-reworkRobert Noland
2008-07-21[FreeBSD] Improve upper_32_bits define.Robert Noland
Thanks to airlied.
2008-07-17[FreeBSD] drm_irq.c updates for vblank fixes.Robert Noland
2008-07-16FreeBSD: Fix radeon buildRobert Noland
2008-07-16BSD: change drm_locked_task*() to use the same scheme as linux.Owain Gordon Ainsworth
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-06-08[FreeBSD] Incorporate vblank fixes for bsd.Robert Noland
2008-06-08[FreeBSD] Go back to using vbl_lock and move init/destroy to load/unload.Robert Noland
2008-06-01[FreeBSD] Get rid of vbl_lock and re-use irq_lock.Robert Noland
2008-05-27[FreeBSD] Add vblank-rework support and get drivers building.Robert Noland
The i915 driver now works again.
2008-05-27[FreeBSD] Convert from drm_device_t to struct drm_device for consistency.Eric Anholt
2007-12-02bsd: Replace other occurrences of msleep with mtx_sleepRobert Noland
2007-12-02bsd: Now make secondary vblank workRobert Noland
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-01bsd: Hook secondary vblank support.Robert Noland
2007-11-29Fix up drm_ati_pcigart_infoRobert C. Noland III
2007-11-18Bug #13233: Chase move of agp headers on FreeBSD.Robert Noland
2007-11-14Add new shared header file drm_internal.h.Kristian Høgsberg
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-08-13Bug #11951: Fix an errno sign inversion on pre-FreeBSD 5.vehemens
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 Anholt
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 Anholt
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 Anholt
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-19FreeBSD warnings cleanup.Eric Anholt
2007-07-18Add dry-coded DRM drawable private information storage for FreeBSD.Eric Anholt
With this, all modules build again.
2007-07-16Fix FreeBSD build.Eric Anholt
2007-07-11Made drm_sg_alloc accessible from inside the DRM - drm_sg_alloc_ioctl is the ↵Arthur Huillet
ioctl wrapper
2007-05-29Update a bunch of FreeBSD port code.Jung-uk Kim
Tested on r200/r300. i915 updates still remain to be done.
2006-09-06Use the DRM_INIT_WAITQUEUE argument (needed on Linux) to avoid a warning.Eric Anholt
2006-09-06Put the PCI device/vendor id in the drm_device_t.Eric Anholt
This helps us unbreak FreeBSD DRM from the 965 changes.
2006-09-06Add a typedef for u64.Eric Anholt
2006-04-18Reorder the DRM_*_AGP enum to match linux's numbers (oops). Fixes i915Eric Anholt
attachment. Make our mga_drv.c use them, while I'm here. Submitted by: Jonathan Fosburgh <jonathan@fosburgh.org>
2005-11-08Initial port of savage to FreeBSD for the AGP and !ShadowStatus case. AddsEric Anholt
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.
2005-11-08Fix FreeBSD DRM for latest MGA changes to agp support, which cleans thingsEric Anholt
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.
2005-11-08Catch FreeBSD up to the pcie gart changes. Required minor modification toEric Anholt
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.
2005-09-12Fix the spelling of DRM_AUTH so that the bsd core stuff builds again. NextEric Anholt
up is pcigart.
2005-09-03convert ioctl flags to use flags instead of separate intsDave Airlie
2005-08-26Previously, drm_get_resource_start() and drm_get_resource_len() wouldEric Anholt
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.
2005-08-26[1] Fix BSD DRM for the nonroot changes. [2] Don't attempt to acquire theEric Anholt
DMA lock in a non-DMA driver, as it will be uninitialized. Submitted by: [1] jkim (minor changes by me)
2005-08-17add agp buffer tokenDave Airlie
2005-08-12Fix build after linux-side checkin of master/root-only split. Still onlyEric Anholt
cares about root on the BSD side, but should be secure.
2005-08-05Rename the driver hooks in the DRM to something a little moreEric Anholt
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-08-04Fix the MGA driver on BSD by passing in the proper chipset flags to theEric Anholt
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.
2005-07-20Add latest r300 support from r300.sf.net CVS. Patch submitted by volodya,Eric Anholt
with BSD fix from jkim and the r300_reg.h license from Nicolai Haehnle. Big thanks to everyone involved!
2005-06-29Get the BSD DRM compiling again after MGA and mapping changes. Note thatEric Anholt
i915 has been disabled for the moment, rather than working around linux-specific code in the shared dir.
2005-06-14Adds support for PCI cards to MGA DRMIan Romanick
This patch adds serveral new ioctls and a new query to get_param query to support PCI MGA cards. Two ioctls were added to implement interrupt based waiting. With this change, the client-side driver no longer needs to map the primary DMA region or the MMIO region. Previously, end-of-frame waiting was done by busy waiting in the client-side driver until one of the MMIO registers (the current DMA pointer) matched a pointer to the end of primary DMA space. By using interrupts, the busy waiting and the extra mappings are removed. A third ioctl was added to bootstrap DMA. This ioctl, which is used by the X-server, moves a *LOT* of code from the X-server into the kernel. This allows the kernel to do whatever needs to be done to setup DMA buffers. The entire process and the locations of the buffers are hidden from user-mode. Additionally, a get_param query was added to differentiate between G4x0 cards and G550 cards. A gap was left in the numbering sequence so that, if needed, G450 cards could be distinguished from G400 cards. According to Ville Syrjälä, the G4x0 cards and the G550 cards handle anisotropic filtering differently. This seems the most compatible way to let the client-side driver know which card it's own. Doing this very small change now eliminates the need to bump the DRM minor version twice. http://marc.theaimsgroup.com/?l=dri-devel&m=106625815319773&w=2 A number of ioctl handlers in linux-core were also modified so that they could be called in-kernel. In these cases, the in-kernel callable version kept the existing name (e.g., drm_agp_acquire) and the ioctl handler added _ioctl to the name (e.g., drm_agp_acquire_ioctl). This patch also replaces the drm_agp_do_release function with drm_agp_release. drm_agp_release (drm_core_agp_release in the previous patch) is very similar to drm_agp_do_release, and I saw no reason to have both. This commit *breaks the build* on BSD. Eric said that he would make the required updates to the BSD side soon. Xorg bug: 3259 Reviewed by: Eric Anholt