summaryrefslogtreecommitdiffstats
path: root/sys/dev/drm/radeon_cp.c
Commit message (Collapse)AuthorAgeFilesLines
* re-write scatter gather memory allocation yet again...rnoland2010-04-221-9/+6
| | | | | | | | | | This time, abandon the use of busdma and start interacting with the VM system directly. Make use of the new kmem_alloc_attr() which allows us to easily allocate non-contiguous pages to back the GART table. This should help a lot when starting or restarting X after the system has been running for a while and memory has become fragmented. MFC after: 2 weeks
* Rework how drm maps are handled.rnoland2010-04-221-18/+18
| | | | | | | | | | | | * On 32 bit platforms we steal the upper 4 bits of the map handle to store a unique map id. * On 64 bit platforms we steal the upper 24 bits. Resolves issues where the offsets that are handed to mmap may overlap the VRAM on some cards. Tested on: radeon, intel, mga, and via. This will break nouveau. I will spin new patches shortly.
* A bit of cleanup work on radeon_freelist_get()rnoland2009-10-301-41/+4
| | | | | | | * Fix the main loop to search all buffers before sleeping. * Remove dead code MFC after: 3 days
* Add GET_PARAM support for Z pipes.rnoland2009-08-231-0/+9
| | | | | | This is needed for occulsion queries on rv530 chips. MFC after: 2 weeks
* Add kernel support for Radeon R6/7xx 3D.rnoland2009-08-231-2/+6
| | | | | | | You will still need Mesa from git and possibly an updated DDX driver, but this is working fairly well now. MFC after: 2 weeks
* Initialize max_vblank_count earlier.rnoland2009-06-251-6/+12
| | | | | | Small cleanup of the error paths while I'm here. MFC after: 3 days
* Add regs required for occlusion queries supportrnoland2009-04-071-1/+1
| | | | | Submitted by: Maciej Cencora <m.cencora@gmail.com> MFC after: 3 days
* A little more cleanup from AMD, if we don't have the right microcodernoland2009-04-031-3/+4
| | | | | | there is no reason to mess with the chip. MFC after: 3 days
* Simplify the radeon microcode loading.rnoland2009-03-311-69/+51
| | | | | Submitted by: Christoph Mallon MFC after: 3 days
* Get rid of any remaining PZERO flags in mtx_sleep()rnoland2009-03-161-12/+0
| | | | | | Also, clean up some ifdef mess while I'm here. MFC after: 3 days
* Call the right function for the right chipset.rnoland2009-03-091-1/+1
| | | | MFC after: 10 days
* Import support for ATI Radeon R600 and R700 series chips.rnoland2009-03-071-134/+513
| | | | | | | | | | | | | | Tested on an HD3850 (RV670) on loan from Warren Block. Currently, you need one of the following for this to be useful: x11-drivers/xf86-video-radeonhd-devel (not tested) xf86-video-ati from git (EXA works, xv is too fast) xf86-video-radeonhd from git (EXA works, xv works) There is no 3d support available from dri just yet. MFC after: 2 weeks
* Initialize the vblank structures at load time. Previously we did thisrnoland2009-02-281-0/+6
| | | | | | | | | | | | at irq install/uninstall time, but when we vt switch, we uninstall the irq handler. When the irq handler is reinstalled, the modeset ioctl happens first. The modeset ioctl is supposed to tell us that we can disable vblank interrupts if there are no active consumers. This will fail after a vt switch until another modeset ioctl is called via dpms or xrandr. Leading to cases where either interrupts are on and can't be disabled, or worse, no interrupts at all. MFC after: 2 weeks
* Fix error in busmaster enable logicrnoland2008-10-271-2/+4
| | | | | | | | rs400/rs480 should clear the RADEON_BUS_MASTER_DIS bit. This should get the rs485 IGP chips going again. Approved by: jhb (mentor) Obtained from: drm git master
* Fix some fallout from the busmaster disable cleanuprnoland2008-10-271-5/+4
| | | | | | | rs400 is just like rs480 Approved by: jhb (mentor) Obtained from: drm git
* Several of the newer radeon cards have moved around the registers for enablingrnoland2008-10-131-2/+14
| | | | | | | | busmastering support. This also adds register definitions for MSI support, which we will be using shortly. Approved by: jhb (mentor) Obtained from: drm git master
* Add support for Radeon rs740 (HD 2100)rnoland2008-10-131-8/+16
| | | | | Approved by: jhb (mentor) Obtained from: drm git master
* resync to git masterrnoland2008-10-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | This reverts a private patch which is causing issues with many Intel chipsets. I will review that patch and see what we need to do to fix it up later, but for the time being, we will just get these chips working again. This update contains a lot of code cleanup and is post gem merge (no, we don't have gem support). It should prove much easier to read the code now. A lot of thanks goes to vehemens for that work. I have adapted the code to use cdevpriv for tracking per open file data. That alleviates the old ugly hack that we used to try and accomplish the task and helped to clean up the open / close behavior a good bit. This also replaces the hack that was put in place a year or so ago to prevent radeons from locking up with AIGLX enabled. I have had a couple of radeon testers report that it still works as expected, though I no longer have radeon hardware to test with myself. Other various fixes from the linux crew and Intel, many of which are muddled in with the gem merge. Approved by: jhb (mentor) Obtained from: mesa/drm git master MFC after: 2 weeks
* Update drm kernel drivers.rnoland2008-08-231-980/+494
| | | | | | | | | | This is a sync to mesa/drm pre-gem, with a few fixes on top of that. It also contains one local patch supplied by kib@ that I can't apply to git.master shared code. Approved by: flz Obtained from: mesa/drm git.master MFC after: 2 weeks
* Merge from DRM upstream:anholt2006-09-071-10/+23
| | | | | | | - Add support for Intel 965 Express chipsets. - Add support for R200 vertex programs, along with minor bugfixes. - Add support for vblank synchronization to pipe B of Intel hardware (laptop screens).
* Update to DRM CVS as of 2006-04-09. The most notable new feature is the updatedanholt2006-04-091-96/+180
| | | | | | | Radeon memmap code, which with a new DDX driver and DRI drivers should fix long-term stability issues with Radeons. Also adds support for r200's ATI_fragment_shader, r300 texrect support and texture caching fixes, i915 vblank support and bugfixes, and new PCI IDs.
* Update DRM to CVS snapshot as of 2005-11-28. Notable changes:anholt2005-11-281-62/+97
| | | | | | | | | | | | | - S3 Savage driver ported. - Added support for ATI_fragment_shader registers for r200. - Improved r300 support, needed for latest r300 DRI driver. - (possibly) r300 PCIE support, needs X.Org server from CVS. - Added support for PCI Matrox cards. - Software fallbacks fixed for Rage 128, which used to render badly or hang. - Some issues reported by WITNESS are fixed. - i915 module Makefile added, as the driver may now be working, but is untested. - Added scripts for copying and preprocessing DRM CVS for inclusion in the kernel. Thanks to Daniel Stone for getting me started on that.
* Add the latest r300 code from r300.sf.net. This is based on the patch suppliedanholt2005-07-201-2/+44
| | | | | | by Vladimir Dergachev for inclusion in DRM CVS, with minor modifications for FreeBSD CVS and the appropriate license from Nicolai Haehnle on r300_reg.h. Fixes hangs when using r300.sf.net userland, tested on a Radeon 9600 on amd64.
* Disable the drm_initmap calls in radeon_cp.c, due to them resulting in improperanholt2005-06-281-0/+6
| | | | | | | | | | handling of pci resources, and mapping framebuffer leading to panics on X startup. The proper solution involves use of bus_alloc_resource without RF_ACTIVE, but this code is being rewritten in DRM CVS currently, and disabling for now doesn't remove any features, so take the easy route. PR: kern/80718 Approved by: re (scottl)
* Mark the permanent map for radeon registers read-only. Failure to set this flaganholt2005-06-241-1/+2
| | | | | | | | | allowed writing to the registers by any user that can open the DRI device, and therefore ability to initiate DMA. This came in with the merge from DRI CVS on 2005-04-15. Approved by: re (scottl) Obtained from: DRM CVS
* Update to DRM CVS as of 2005-04-12, bringing many changes:anholt2005-04-161-961/+1292
| | | | | | | | | | | | | | | | | | | | - Split core DRM routines back into their own module, rather than using the nasty templated system like before. - Development-class R300 support in radeon driver (requires userland pieces, of course). - Mach64 driver (haven't tested in a while -- my mach64s no longer fit in the testbox). Covers Rage Pros, Rage Mobility P/M, Rage XL, and some others. - i915 driver files, which just need to get drm_drv.c fixed to allow attachment to the drmsub device. Covers i830 through i915 integrated graphics. - savage driver files, which should require minimal changes to work. Covers the Savage3D, Savage IX/MX, Savage 4, ProSavage. - Support for color and texture tiling and HyperZ features of Radeon. Thanks to: scottl (much p4 handholding) Jung-uk Kim (helpful prodding) PR: [1] kern/76879, [2] kern/72548 Submitted by: [1] Alex, lesha at intercaf dot ru [2] Shaun Jurrens, shaun at shamz dot net
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-2/+2
|
* Merge from DRI CVS. No longer maps the framebuffer into KVA on radeon, r128,anholt2004-01-061-7/+0
| | | | and mga. MTRR code cleanups. Includes new Radeon and Rage 128 PCI IDs.
* Update from DRI CVS. Includes locking fixes (including PR 59202), changes foranholt2003-11-121-10/+21
| | | | | | Radeon IGP support (still lacking PCI IDs), and DRM interface 1.2 updates which include finally tying the DRM instances to specific devices rather than relying on the X Server.
* Update to latest from DRI CVS. Primary new feature is mostly-complete smpnganholt2003-10-241-1/+1
| | | | | | | | locking, and the apparently unnecessary locking for -stable has been removed. This may fix issues with missed interrupts since April, which manifested themselves as slowdowns or hangs in radeon, in particular. Many cleanups also took place. In the shared code, there are improvements to r128 driver stability.
* Merge from DRI CVS. Includes newly ported SiS 300/305/540/630/730 driver andanholt2003-09-091-34/+31
| | | | | | updates to allow system memory to be used for textures on PCI Radeons. Sponsored by: LinuxFund
* Update DRM from DRI CVS as of today. Notable changes include Radeonanholt2003-08-191-42/+111
| | | | | suspend/resume support and Rage 128 pageflipping support (both of which require XFree86 from CVS), along with miscellaneous cleanups.
* Update the DRM to the latest from DRI CVS. Includes some bugfixes and removalanholt2003-04-251-43/+37
| | | | | | of the infrastructure for the gamma driver which was removed a while back. The DRM_LINUX option is removed because the handler is now provided by the linux compat code itself.
* Update the DRM to latest from DRI CVS. This is approximately the versionanholt2003-03-091-302/+537
| | | | | | | included in XFree86 4.3, but includes some fixes. Notable changes include Radeon 8500-9100 support, PCI Radeon/Rage 128 support, transform & lighting support for Radeons, and vblank syncing support for r128, radeon, and mga. The gamma driver was removed due to lack of any users.
* Warnings cleanup for gcc3. Also __FUNCTION__ -> __func__anholt2002-05-311-20/+20
| | | | Approved by: des
* More diff reduction: Shuffle around some header code as was done inanholt2002-04-291-10/+1
| | | | | | | drmcommand-0-0-1-branch of DRI CVS, more return code cleanup, and remove some gratuitous ifdefs. Approved by: des
* Diff reduction to my experimental code: clean up return code handling.anholt2002-04-291-28/+28
| | | | Approved by: des
* Add the code for the DRM, based on the code from the drm-kmod port.anholt2002-04-271-0/+1458
This is not hooked up yet, that will come later. Approved by: des
OpenPOWER on IntegriCloud