aboutsummaryrefslogtreecommitdiff
path: root/shared-core/savage_bci.c
AgeCommit message (Collapse)Author
2007-11-22drm: major whitespace/coding style realignment with kernelDave Airlie
2007-11-05drm: remove lots of spurious whitespace.Dave Airlie
Kernel "cleanfile" script run.
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-16drm: remove drm_buf_tDave Airlie
2007-07-16drm: remove drmP.h internal typedefsDave Airlie
2007-07-16drm: detypedef drm.h and fixup all problemsDave Airlie
2007-04-28remove DRM_GETSAREA and replace with drm_getsarea functionDave Airlie
2006-12-19make a savage function static from kernelDave Airlie
2006-10-16dev->agp_buffer_map is not initialized for AGP DMA on savagesMichael Karcher
bug 8662
2006-04-09Revert a change that accidentally went in with whitespace changes fromEric Anholt
Linux, which broke on FreeBSD. DRM_COPY_*_IOCTL checks for the size parameter matching the ioctl's command size there, since the copin/out happened earlier.
2006-01-02whitespace cleanup/aligment with kernelDave Airlie
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-09-03convert ioctl flags to use flags instead of separate intsDave Airlie
2005-08-09Make sure savage has 3rd ioctl parameterJon Smirl
2005-08-07make some functions static in the savage drm driverDave Airlie
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-06-28- Remove drm_initmap and replace its usage with drm_addmap. This reducesEric Anholt
code duplication, and it also hands you the map pointer so you don't need to re-find it. - Remove the permanent maps flag. Instead, for register and framebuffer maps, we always check whether there's already a map of that type and offset around. Move the Radeon map initialization into presetup (first open) so it happens again after every takedown. - Remove the split cleanup of maps between driver takedown (last close) and cleanup (module unload). Instead, always tear down maps on takedown, and drivers can recreate them on first open. - Make MGA always use addmap, instead of allocating consistent memory in the PCI case and then faking up a map for it, which accomplished nearly the same thing, in a different order. Note that the maps are exposed to the user again: we may want to expose a flag to avoid this, but it's not a security concern, and saves us a lot of code. - Remove rmmaps in the MGA driver. Since the function is only called during takedown anyway, we can let them die a natural death. - Make removal of maps happen in one function, which is called by both drm_takedown and drm_rmmap_ioctl. Reviewed by: idr (previous revision) Tested on: mga (old/new/pci dma), radeon, savage
2005-06-21Change initialization of savage register access to _DRM_READ_ONLY. Flags ofJon Smirl
zero does not mean no privs, instead it grants write access _DRM_READ_ONLY only applies to non-root users. Problem is only in CVS, initmaps are not in the kernel yet.
2005-06-04Remove warnings about code mixed with declerations..Dave Airlie
2005-03-13Command DMA optimizations:Felix Kuehling
- don't waste DMA memory when small command buffers are flushed - minimized padding with noops - slightly simplified faked DMA flushing
2005-03-07Tracked down random lockups related to command DMA that occurred in Quake3Felix Kuehling
after ~5min: buffer aging was subtly broken. Part of this may have also affected vertex DMA buffer aging and client-side texture heap aging, though with less fatal consequences. Bumped minor version and driver date.
2005-03-06Added support for command DMA on Savage4-based hardware. UnfortunatelyFelix Kuehling
command and vertex DMA don't work at the same time. Command DMA performance is superior and works with all vertex formats. Bumped minor version and driver date.
2005-02-23Use wrap counter to extend 16-bit hardware event tags to 32-bit logicalFelix Kuehling
event counters in the SAVAGE_EVENT_EMIT/WAIT ioctls. This is needed for reliable client-side texture heap aging. Slightly simplified DMA buffer aging while at it. Bumped minor version and driver date.
2005-02-05- Implement drm_initmap, and extend it with the resource number to helpEric Anholt
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.
2005-01-15Setup MTRRs for frame buffer and aperture manually on Savage3D andFelix Kuehling
Savage4-based cards. Automatic setup in drm_initmap doesn't work due to the weird alignment and size of the aperture.
2005-01-10Only try to find the agp_buffer_map if dma_type is AGP. This is all that'sFelix Kuehling
needed on the DRM side to support PCI Savages. Bumped patch level and driver date.
2005-01-08Fixed off-by-one error in savage_bci_wait_fifo_shadow.Felix Kuehling
2005-01-053D scissor regs are now managed by the DRM to iterate over clip rectsFelix Kuehling
passed to the cmdbuf ioctl (try xeyes on top of glxgears ;-) Tightened the texture state check Bumped Savage DRM version to 2.1.0 so that DRI driver can (theoretically) depend on the DRM to manage the scissor registers
2005-01-01Completeley rewritten Savage DRM which can be considered secure (moduloFelix Kuehling
implementation errors). Direct hardware (MMIO, BCI) access is no longer needed in the Mesa driver. Bumped version to 2.0.0. Corresponding changes to the DDX and Mesa drivers are being committed.