summaryrefslogtreecommitdiff
path: root/bsd-core
AgeCommit message (Collapse)Author
2007-07-19Fix the getclient test (Need this feature for future tests).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.
2007-03-24Catch up to new interrupt API, and retire FreeBSD 4.x support here.Eric Anholt
2006-12-01Core build fix for BSD.Michel Dänzer
2006-12-01Unshare drm_drawable.c again for now.Michel Dänzer
The current version didn't build on BSD, where the new functionality isn't used yet anyway. Whoever changes that will hopefully be able to make the OSes share this file as well.
2006-10-31Fix bug #8839 - a commentAlan Hourihane
2006-09-28Add support for tracking drawable information to coreMichel Dänzer
Actually make the existing ioctls for adding and removing drawables do something useful, and add another ioctl for the X server to update drawable information. The only kind of drawable information tracked so far is cliprects.
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-07-19.cvsignore -> .gitignoreMichel Dänzer
Sort the merged file, remove the redundant explicit .ko lines and add some generated symlinks.
2006-05-17Set entry->virtual for sg maps, fixing ATI PCI/PCIE GART support.Eric Anholt
PR: kern/97056 Submitted by: Stanislav Sedov <ssedov@mbsd.msk.ru>
2006-05-17Add the bits for vblank support on FreeBSD, which most importantly avoidsEric Anholt
chasing a NULL pointer at the first 3d app invocation.
2006-05-17Add the workaround that's in the kernel to suppress GCC's warning aboutEric Anholt
refusal to inline functions that (in some cases, at least) aren't that large.
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-12-30Merge patch from jhb to catch up with FreeBSD-current vgapci master deviceEric Anholt
changes.
2005-12-05Remove driver.device_is_agp code duplicated in drm_device_find_capability,Eric Anholt
when it really wanted to live in drm_device_is_agp.
2005-12-02Finish the last bits necessary to get the i915 DRM port working on FreeBSDEric Anholt
Submitted by: Alexey Popov <llp@iteranet.com>
2005-12-02FreeBSD PR kern/85479: Restore the enabling of debugging by default by theEric Anholt
DRM_DEBUG kernel option. It remains controlled by hw.dri.*.debug no matter what.
2005-11-28Fix AGP support guessing: Implement the same bridge checking in the MGAEric Anholt
driver as Linux uses, and actually use the driver's device_is_agp if available (hopefully fixing i915).
2005-11-15Fix compiling and reenable build of i915 driver.Eric Anholt
2005-11-15Fix Savage DRI without ShadowStatus NO by allowing the shadow area to beEric Anholt
mapped.
2005-11-11Fix breakage from the move of driver ioctl externs to header files.Eric Anholt
2005-11-08Correct another LOR issue with resource allocation. This leaves theEric Anholt
drm_get_resource_* resource allocation a little racy, but they're getting called at either X Server startup or driver load, so it's serialized anyway.
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-08Correct a LOR related to the PCI resource allocations by simply moving theEric Anholt
uninit to unload time rather than lastclose.
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-11-08Correct a recursion on non-recursive mutex in drm_addmap from radeon'sEric Anholt
firstopen, by making drm_addmap require the drm device lock to be held. Also, make matching of kernel maps match linux by requiring shm matches to have the contains_lock flag set if the offset doesn't match.
2005-11-06Re-disable the via driver while it's broken on BSD.Eric Anholt
2005-09-30Add support to turn writeback off via radeon module optionDave Airlie
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-26- Don't try to allocate mappings of less than a PAGE_SIZE in MGA DMA code.Eric Anholt
- Comment out the "is this mapping/bufs in allocated AGP" bits in BSD because they break mga (which uses AGP allocation that doesn't track entries). It's not a security issue when we still have the related ioctls marked root-only. - Apply some power-of-two alignment restrictions to hopefully avoid some panicing in bad cases of drm_pci_alloc() on FreeBSD. - Add verbosity to some error handling that I found useful while debugging.
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-26Fix a lack of parenthesis in macro usage that showed up with INVARIANTSEric Anholt
turned on, i.e. in a kernel build.
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-15Port the VIA DRM to FreeBSD. Original patch by Jake, with some cleanup byEric Anholt
me to match other drivers and avoid ifdeffing. The linux via_drv.c will be moved from shared-core to linux-core soon by repocopy. Submitted by: Jake Burkholder <jake@FreeBSD.org> Tested by: unichrome
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-27Correct a couple of descriptions of files in comments (were justEric Anholt
copy'n'pasted). Submitted by: jkim
2005-07-27Link in the savage files from shared-core.Eric Anholt
Submitted by: jkim
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