summaryrefslogtreecommitdiff
path: root/shared-core/radeon_cp.c
AgeCommit message (Collapse)Author
2007-11-05drm: remove lots of spurious whitespace.Dave Airlie
Kernel "cleanfile" script run.
2007-11-03radeon: set the address to access the aperture on the CPU side correctlyDave Airlie
This code relied on the CPU and GPU address for the aperture being the same, On some r5xx hardware I was playing with I noticed that this isn't always true. I wonder if this will fix some of those r4xx DRI issues we've seen in the past.
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-06-08r300: Added the CP maximum fetch size and ring rptr update variables.Oliver McFadden
2007-06-03radeon: add support for vblank on crtc2Dave Airlie
This add support for CRTC2 vblank on radeon similiar to the i915 support
2007-05-26whitespace fixups from kernelDave Airlie
2007-04-28remove DRM_GETSAREA and replace with drm_getsarea functionDave Airlie
2007-04-09rs480: Renamed some unknown registers. See dri-devel list.Oliver McFadden
2007-04-09radeon: add support for reverse engineered xpress200mDave Airlie
The IGPGART setup code was traced using mmio-trace on fglrx by myself and Phillip Ezolt <phillipezolt@gmail.com> on dri-devel. This code doesn't let the 3D driver work properly as the card has no vertex shader support. Thanks to Matthew Garrett + Ubuntu for providing me some hardware to do this work on.
2007-03-04radeon: make PCI GART aperture size variable, but making table size variableDave Airlie
This is precursor to getting a TTM backend for this stuff, and also allows the PCI table to be allocated at fb 0
2007-03-04ati: make pcigart code able to handle variable size PCI GART apertureDave Airlie
This code doesn't enable a variable aperture it just modifies the codebase to allow me fix it up later
2007-01-11radeon: Fix u32 overflows when determining AGP base address in card space.Michel Dänzer
The overflows could lead to the AGP aperture overlapping the framebuffer area in the card's address space when the latter is located at the very end of the 32 bit address space, which would result in a freeze on X server startup, probably because the card read commands from the framebuffer instead of from AGP. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=392915 .
2006-09-12drm: use radeon specific names for radeon flagsDave Airlie
2006-07-26Revert "Make sure busmastering gets disabled on module unload."Michel Dänzer
This reverts af7b89d7246efbed7d05c38fcaa6a13c4b89db90 commit. It causes an oops on X server shutdown here, and for the reporter of bug #7629 as well.
2006-07-26Bug #7629: Fix for CHIP_IS_AGP getting 'restored' with non-AGP cardsMichel Dänzer
Commit 2a47f6bfecea5dabcbf79d5e1aaf271f50070b89 caused the CHIP_IS_AGP flag to get 'restored' with PCI(e) cards. I can't think of a way to fix this without introducing a (otherwise redundant) CHIP_IS_PCI flag.
2006-07-19Make sure busmastering gets disabled on module unload.Adam Jackson
2006-07-19Use RADEON_RB3D_DSTCACHE_CTLSTAT instead of RADEON_RB2D_DSTCACHE_CTLSTAT.Michel Dänzer
The latter seems to be a read-only mirror of the former.
2006-07-19Make sure CHIP_IS_AGP flag is set when not overriding to PCI mode.Michel Dänzer
This allows using AGP after overriding to PCI mode in a previous session without reloading the DRM.
2006-07-19When writeback isn't used, actually disable it in the hardware.Michel Dänzer
Not doing this might waste bus bandwidth or even cause memory corruption or system crashes on systems that check bus transfers. No such incident has been reported though.
2006-05-18add consts to radeon microcode.Dave Airlie
From: tilman
2006-03-25radeon fix up the PCI ids for new memory map like the kernel one.. notDave Airlie
perfect but should be very safe... align some other kernel bits i810 align with kernel
2006-02-25Add all radeon pci ids known by ddx, but only r350/rv350 and below (newRoland Scheidegger
chips may be problematic). Leave the existing entries for new chips in though. Remove ids not known by ddx (secondary ids, non-existant,...). Correct some entries (name/family). Make the radeon family enum look more alike the ddx/dri versions. See #5413
2006-02-18add benh's memory management patchDave Airlie
2006-02-18major realigment of DRM CVS with kernel code, makes integration much easierDave Airlie
2005-12-28step back one reported bugs against that patchDave Airlie
2005-12-16fix radeon memory mapping from Ben HerrenschmidtDave Airlie
2005-11-28Assert an MIT copyright on sis_drm.h, since one was lacking and I createdEric Anholt
that particular file. Its contents have changed a good bit since the original sis code, and the original sis code didn't care much about attribution since it routinely disclaims Precision Insight/VA Linux from responsibility. Also, adjust formatting around license headers (have a comment open immediately before the "Copyright" line, not as a runon of any previous comments) for automatic processing into FreeBSD, where /*- is used to signal the beginning of license headers for automatic compilation of license lists.
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-30Add support to turn writeback off via radeon module optionDave Airlie
2005-09-30fix pci overriding from userspaceDave Airlie
2005-09-25hopefully fix server recycling on PCIEDave Airlie
2005-09-12make PCI Express work on 64-bit machines, thanks to Alex Deucher (agd5f)Dave Airlie
2005-09-11Add GART in FB support for ati pcigart, and PCIE support for r300Dave Airlie
2005-08-16add Egberts 32/64 bit patch (its in kernel already...)Dave 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-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-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-20Change initialization of radeon 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-19Remove I2C support from radeon driver. Same support is available fromJon Smirl
radeonfb.
2005-04-26Use msleep instead of tsleep to drop the DRM device lock and avoid aEric Anholt
sleep-with- mutex held. This probably ought to be an os-independent sleep function ala DRM_USLEEP.
2005-02-07fix agp detection on linuxDave Airlie
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-02-01cleanup patch from Adrian Bunk <bunk@stusta.de>Dave 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