summaryrefslogtreecommitdiff
path: root/shared-core/radeon_drv.h
AgeCommit message (Collapse)Author
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-04Mark some radeon init variables deprecated. These used to be passed in butJon Smirl
the driver already knew their correct value. For example the physical address of the framebuffer and registers.
2005-07-27fix driver date and drm minor version for r300 supportRoland Scheidegger
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-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-28add compat code from Paul MackerrasDave Airlie
2005-06-19Remove I2C support from radeon driver. Same support is available fromJon Smirl
radeonfb.
2005-05-27add radeon registers from VHA code these are the "unknown" registersDave Airlie
2005-03-15add R200_EMIT_PP_TRI_PERF_CNTL packet to support brilinear filtering onRoland Scheidegger
r200
2005-03-04add some idct type 3 packets for referenceDave Airlie
2005-02-10add support for texture micro tiling on radeon/r200. Add support for r100Roland Scheidegger
cube maps (since it also requires a version bump) at the same time.
2005-02-08Close a race which could allow for privilege escalation by users with DRIEric Anholt
privileges on Radeon hardware. Essentially, a malicious program could submit a packet containing an offset (possibly in main memory) to be rendered from/to, while a separate thread switched that offset in userspace rapidly between a valid value and an invalid one. radeon_check_and_fixup_offset() would pull the offset in from user space, check it, and spit it back out to user space to be copied in later by the emit code. It would sometimes catch the bad value, but sometimes the malicious program could modify it after the check and get an invalid offset rendered from/to. Fix this by allocating a temporary buffer and copying the data in at once. While here, make the cliprects stuff not do the VERIFYAREA_READ and COPY_FROM_USER_UNCHECKED gymnastics, avoiding a lock order reversal on FreeBSD. Performance impact is negligible -- no difference on r200 to ~1% improvement on rv200 in quake3 tests (P4 1Ghz, demofour at 1024x768, n=4 or 5).
2005-02-01cleanup patch from Adrian Bunk <bunk@stusta.de>Dave Airlie
2005-01-27fix incorrect PCI id for ATI radeonDave Airlie
2005-01-26(Stephane Marchesin,me) Add radeon framebuffer tiling support to radeonRoland Scheidegger
drm. Add new ioctls to manage surfaces which cover the tiled areas
2005-01-26replace magic number with macro constant RADEON_ZBLOCK16Roland Scheidegger
2004-12-08(Stephane Marchesin, me) add hyperz support to radeon drm. Only fast zRoland Scheidegger
clear and z buffer compression are working correctly, hierarchical-z is not.
2004-11-06Move radeon i2c include to top of fileJon Smirl
2004-11-06Commit WIP of BSD conversion to core model. Compiles for r128, radeon, butEric Anholt
doesn't run yet. Moves the ioctl definitions for these two drivers back to the shared code -- they aren't OS-specific.
2004-10-10Vladimir requested support so we can at least load r300 microcode forDave Airlie
helping 2D operations. Ups radeon to version 1.12.0, Vladimir, you might want to add any extra pciids... Approved-by: Dave Airlie <airlied@linux.ie>
2004-09-30Lindent of core build. Drivers checked for no binary diffs. A few filesJon Smirl
weren't Lindent's because their comments didn't convert very well. A bunch of other minor clean up with no code implact included.
2004-09-27First check in for DRM that splits core from personality modulesJon Smirl
2004-09-24Create new linux-2.6 build. Move all gpl files into the 2.6 build. If youJon Smirl
edit files for 2.6 be sure and break the link to the 2.4 directory and copy the cvs history.
2004-09-17Add linux sysfs i2c support to radeon driver. This patch adds GPL licensedJon Smirl
files to the linux build but not to the BSD directories.
2004-09-14Add chip family names to the radeon driverJon Smirl
2004-08-24Merged drmfntbl-0-0-2Dave Airlie
2004-08-17Merged drmfntbl-0-0-1Dave Airlie
2004-08-17preparation patch for radeon permanent mapping registers/framebuffer makesDave Airlie
dev_priv live always, and add AGP detection in kernel patch: radeon-pre-2.patch From: Jon Smirl
2004-08-10Patch from Jon Smirl to add attribute field to the pciids, and use this forDave Airlie
certain radeon combinations - intel drivers can probably use this for dual head capable devices etc..
2004-07-25sync up with current 2.6 kernel bk tree - mostly __user annotationsDave Airlie
2004-05-18add R200_EMIT_RB3D_BLENDCOLOR state packet to support GL_EXT_blend_color,Roland Scheidegger
GL_EXT_blend_func_separate and GL_EXT_blend_equation_separate on r200
2003-12-16Don't ioremap the framebuffer area. The ioremapped area wasn't used byEric Anholt
anything, and took up valuable KVA. While I'm in the area, clean up BSD MTRR stuff some more. Suggested by: jonsmirl
2003-11-04Memory layout transition:Michel Daenzer
the 2D driver initializes MC_FB_LOCATION and related registers sanely the DRM deduces the layout from these registers clients use the new SETPARAM ioctl to tell the DRM where they think the framebuffer is located in the card's address space the DRM uses all this information to check client state and fix it up if necessary This is a prerequisite for things like direct rendering with IGP chips and video capturing.
2003-08-26Remove artificial PCI GART limitations, rename AGP to GART whereMichel Daenzer
appropriate
2003-06-10Texture rectangle support for r100Keith Whitwell
2003-05-20DRM part of Radeon DRI suspend/resume support (Charl Botha).David Dawes
2003-04-30Merged texmem-0-0-1Ian Romanick
2003-04-26Remove the map argument from DRM_*MEMORYBARRIER. Not all of the uses ofEric Anholt
DRM_*MEMORYBARRIER we had were related to an MMIO space. This means arch-specific code on the BSDs, unfortunately. Also add DRM_MEMORYBARRIER() and change the DRM_READMEMORYBARRIER()s that used to be read/write barriers to it.
2003-04-22get rid of superfluous fields in struct drm_radeon_ring_bufferMichel Daenzer
use correct address for ring read pointer writeback (yes, we seem to have been running with bogus values for the ring read pointer, which 'worked' because the return value of radeon_wait_ring() is never checked and the ring usually never fills up)
2003-04-22add more get_param queries for embedded projectKeith Whitwell
2003-03-28merged drm-filp-0-1-branchKeith Whitwell
2003-03-25XFree86 4.3.0 mergeAlan Hourihane
2003-02-21Merge from bsd-4-0-0-branch.Eric Anholt
2003-02-04fix PCI and AGP posting problems (based on testing by Chris Ison andMichel Daenzer
suggestions by Benjamin Herrenschmidt and Arjan van de Ven) remove radeon_flush_write_combine() which has been unused for a while
2003-01-02Make the radeon drm module better at cleaning up after itself if all theKeith Whitwell
clients (particularly the X server) exit without doing so for it.
2002-10-29preserve CRTC{,2}_OFFSET_CNTL in 2D driver to avoid bad effects whenMichel Daenzer
pageflipping after a mode switch take current page into account in AdjustFrame(); writing the CRTC offset via the CP was probably a bad idea as this can happen asynchronously, reverted take frame offset into account when flipping pages handle CRTC2 as well for pageflipping (untested) preserve GEN_INT_CNTL on mode switches to prevent interrupts from getting disabled
2002-10-28merge from mesa-4-1-branch to get cube-map registers. bumped version to 1.7Brian Paul
2002-09-27make SW interrupts more robust: write sequence number to scratch register,Michel Daenzer
acknowledge any lost interrupts before waiting
2002-09-26BSD vblank framework.Eric Anholt
2002-09-25common ioctl to wait for vertical blank IRQsMichel Daenzer