summaryrefslogtreecommitdiff
path: root/sys/dev/drm
Commit message (Collapse)AuthorAgeFilesLines
* MFC r205120,r205126Robert Noland2010-04-043-3/+15
| | | | | | | Add drm support for Intel Pineview chips. Notes: svn path=/stable/8/; revision=206166
* MFC r198694,r198697Robert Noland2009-12-131-45/+26
| | | | | | | | | | | | Some general cleanup of scatter/gather memory allocation - We don't need to check malloc return values with M_WAITOK - remove variables that we don't really need - cleanup the error paths by just calling drm_sg_cleanup() - fix drm_sg_cleanup() to be safe to call at any time Notes: svn path=/stable/8/; revision=200475
* MFC 198332Robert Noland2009-12-131-1/+2
| | | | | | | | | Check pointer for NULL before dereferencing it, not after. Originally committed by: brueffer Notes: svn path=/stable/8/; revision=200474
* MFC 198696Robert Noland2009-11-021-29/+39
| | | | | | | | | | | | Cleanup in r600_blit - Don't bother to assign vb until we know we have enough space - Add variables for sx2, sy2, dx2, dy2 so that these aren't calculated over and over, also reduce chance of errors. - Use switch to assign color/format Notes: svn path=/stable/8/; revision=198797
* MFC 198695Robert Noland2009-11-021-41/+4
| | | | | | | | | | A bit of cleanup work on radeon_freelist_get() * Fix the main loop to search all buffers before sleeping. * Remove dead code Notes: svn path=/stable/8/; revision=198795
* MFC 198692Robert Noland2009-11-021-17/+3
| | | | | | | Use system specified memory barriers rather than rolling our own. Notes: svn path=/stable/8/; revision=198794
* MFC 198691Robert Noland2009-11-021-3/+3
| | | | | | | Fix blitter support for RS880 chips Notes: svn path=/stable/8/; revision=198792
* MFC r197951Robert Noland2009-10-302-1/+4
| | | | | | | Add support for Intel G41 chipset Notes: svn path=/stable/8/; revision=198687
* MFC r196470-196471,197154-197155,197603-197606Robert Noland2009-10-309-23/+3170
| | | | | | | | | Sync radeon drm support This adds kernel support for r6/7xx 3D. Notes: svn path=/stable/8/; revision=198685
* MFC r196466Robert Noland2009-10-302-0/+5
| | | | | | | Add a read only sysctl tracking the hw.drm.msi tunable. Notes: svn path=/stable/8/; revision=198682
* MFC r196465Robert Noland2009-10-304-12/+8
| | | | | | | Clean up the handling of device minors Notes: svn path=/stable/8/; revision=198681
* MFC r196464Robert Noland2009-10-301-7/+15
| | | | | | | Clean up the locking in drm_alloc_resource() Notes: svn path=/stable/8/; revision=198679
* MFC 196403: Temporarily revert the new-bus locking for 8.0 release.John Baldwin2009-08-201-8/+0
| | | | | | | Approved by: re (kib) Notes: svn path=/stable/8/; revision=196405
* Merge r196142Robert Noland2009-08-123-5/+19
| | | | | | | | | Add support for radeon RS880 IGP chips to drm. Approved by: re (kib) Notes: svn path=/stable/8/; revision=196144
* Merge r196141Robert Noland2009-08-121-0/+5
| | | | | | | | | Add some additional radeon pci ids to drm. Approved by: re (kib) Notes: svn path=/stable/8/; revision=196143
* Make the newbus subsystem Giant free by adding the new newbus sxlock.Attilio Rao2009-08-021-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The newbus lock is responsible for protecting newbus internIal structures, device states and devclass flags. It is necessary to hold it when all such datas are accessed. For the other operations, softc locking should ensure enough protection to avoid races. Newbus lock is automatically held when virtual operations on the device and bus are invoked when loading the driver or when the suspend/resume take place. For other 'spourious' operations trying to access/modify the newbus topology, newbus lock needs to be automatically acquired and dropped. For the moment Giant is also acquired in some key point (modules subsystem) in order to avoid problems before the 8.0 release as module handlers could make assumptions about it. This Giant locking should go just after the release happens. Please keep in mind that the public interface can be expanded in order to provide more support, if there are really necessities at some point and also some bugs could arise as long as the patch needs a bit of further testing. Bump __FreeBSD_version in order to reflect the newbus lock introduction. Reviewed by: ed, hps, jhb, imp, mav, scottl No answer by: ariff, thompsa, yongari Tested by: pho, G. Trematerra <giovanni dot trematerra at gmail dot com>, Brandon Gooch <jamesbrandongooch at gmail dot com> Sponsored by: Yahoo! Incorporated Approved by: re (ksmith) Notes: svn path=/head/; revision=196037
* Add support for Radeon HD 4770 (RV740) chips.Robert Noland2009-07-093-1/+40
| | | | | | | | Approved by: re@ (kib) MFC after: 3 days Notes: svn path=/head/; revision=195501
* We shouldn't need to drop and reaquire the lock here.Robert Noland2009-06-251-7/+5
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=194996
* Some more cleanups for vblank code on Intel.Robert Noland2009-06-252-27/+18
| | | | | | | | | | | | The Intel 2d driver calls modeset before reinstalling the handler on a vt switch. This means that vblank status ends up getting cleared after it has been setup. Restore saved values for the pipestat registers rather than just wiping them out. MFC after: 3 days Notes: svn path=/head/; revision=194986
* Initialize max_vblank_count earlier.Robert Noland2009-06-252-8/+12
| | | | | | | | | Small cleanup of the error paths while I'm here. MFC after: 3 days Notes: svn path=/head/; revision=194969
* Keep track of the hardware counter more aggressively while interruptsRobert Noland2009-06-251-0/+4
| | | | | | | | | | are enabled. This should help to reduce cases where the hardware counter reference jumps by large amounts. MFC after: 3 days Notes: svn path=/head/; revision=194966
* Fix one use of atomic for refcount missed in last commit.Robert Noland2009-06-251-1/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=194965
* Additional vblank cleanups.Robert Noland2009-06-251-26/+29
| | | | | | | | | | | | Use the vbl_lock when maniputlating the refcount. Eventually I want to convert this to use our internal refcount code. Continue to use atomic ops for manipulating vblank count since we access it often just for reading. MFC after: 3 days Notes: svn path=/head/; revision=194963
* Ensure that we always hold the lock when calling vblank_disable_fn()Robert Noland2009-06-251-0/+5
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=194960
* Add some sysctl info so that we can see what is going on with vblanks.Robert Noland2009-06-231-0/+24
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=194759
* Only release irq resources if we were actually using them.Robert Noland2009-06-231-4/+7
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=194749
* Using signals for vblank events is prone to issues. There have neverRobert Noland2009-06-232-59/+1
| | | | | | | | | | been any consumers and likely will never be. Furthermore, we have never enabled the code for it, so just get rid of it. MFC after: 3 days Notes: svn path=/head/; revision=194748
* Given that vblanks generally occur 60 times a second, waiting 3 secondsRobert Noland2009-06-231-1/+1
| | | | | | | | | seems rather excessive. MFC after: 3 days Notes: svn path=/head/; revision=194746
* vblank[crtc].last represents the hardware counter while request.sequenceRobert Noland2009-06-231-1/+0
| | | | | | | | | represents the software counter. Don't currupt things here. MFC after: 3 days Notes: svn path=/head/; revision=194745
* Hold the lock while we save/restore register for suspend/resume.Robert Noland2009-06-231-0/+6
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=194741
* The G45 docs indicate that all G4X chips use the new framecount register.Robert Noland2009-06-203-7/+8
| | | | | | | | | | | | Intel agrees with my reading of the docs, make it so for all G4X chips. The new register also has a 32 bit width as opposed to 24 bits. Fix things up so that the counters roll over properly. MFC after: 3 days Notes: svn path=/head/; revision=194540
* realloc() behaves identically to malloc when passed a NULL object pointerRobert Noland2009-06-201-25/+14
| | | | | | | | | | If an error does occur we would have left max_context with an incorrect value. MFC after: 3 days Notes: svn path=/head/; revision=194539
* Don't panic if drm_rmmap is called with a NULL map pointer.Robert Noland2009-06-201-0/+3
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=194537
* Don't try to setup interrupts for drivers that don't support them.Robert Noland2009-04-191-18/+21
| | | | | | | | | | | This causes sis and probably a couple of other driver to panic and fail. Tested by: cpghost <cpghost@cordula.ws> PR: 133554 MFC after: 3 days Notes: svn path=/head/; revision=191274
* check offsets for R300_ZB_ZPASS_ADDRRobert Noland2009-04-071-2/+5
| | | | | | | | Submitted by: Maciej Cencora <m.cencora@gmail.com> MFC after: 3 days Notes: svn path=/head/; revision=190833
* Add regs required for occlusion queries supportRobert Noland2009-04-074-2/+11
| | | | | | | | Submitted by: Maciej Cencora <m.cencora@gmail.com> MFC after: 3 days Notes: svn path=/head/; revision=190831
* Add support for RV790 (HD 4890) asicsRobert Noland2009-04-031-0/+2
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=190675
* A little more cleanup from AMD, if we don't have the right microcodeRobert Noland2009-04-032-38/+37
| | | | | | | | | there is no reason to mess with the chip. MFC after: 3 days Notes: svn path=/head/; revision=190674
* Simplify the radeon microcode loading.Robert Noland2009-03-312-212/+131
| | | | | | | | Submitted by: Christoph Mallon MFC after: 3 days Notes: svn path=/head/; revision=190595
* We don't know what these pages are going to be used for, they should beRobert Noland2009-03-301-1/+1
| | | | | | | | | un-cached. This got lost somewhere with all the bus_dma fixups. MFC after: 3 days Notes: svn path=/head/; revision=190565
* Load the right microcode for RS780.Robert Noland2009-03-301-4/+4
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=190563
* Fix up waiting on vblank again... This reverts a last minute change thatRobert Noland2009-03-261-5/+8
| | | | | | | | | I made on the last patch, it seems to upset suspend/resume and shutdown. MFC after: 3 days Notes: svn path=/head/; revision=190433
* Rework the management of vblank interrupts a bit.Robert Noland2009-03-251-22/+31
| | | | | | | | | | | | | | | | | | When a vt switch occurs the irq handler is uninstalled. Interrupts and the state tracking of what was enabled/disabled wasn't working properly. This should resolve the reports of "slow windows" after a vt switch, among other things. The radeon 2d driver seems to work a bit more correctly than the Intel driver. With the Intel driver, vblank interrupts will be enabled at system startup and will only be disabled after an additional modeset (vt switch, dpms, randr event). With this patch, I am able to run glxgears synced to vblank and vt switch while it is running without ill effects. MFC after: 3 days Notes: svn path=/head/; revision=190401
* Intel handled the management of the breadcrumb counter inconsistently.Robert Noland2009-03-252-11/+12
| | | | | | | | | Make sure that we always handle it the same way. MFC after: 3 days Notes: svn path=/head/; revision=190400
* The GART allocations are a propery of the gart, not of scatter-gatherRobert Noland2009-03-253-10/+9
| | | | | | | | | memory. Track them in the appropriate structure. MFC after: 3 days Notes: svn path=/head/; revision=190399
* Fix up the flags to bus_dmamem again. The man page incorrectly showedRobert Noland2009-03-222-10/+9
| | | | | | | | | | the BUS_DMA_NOCACHE flags as being a valid flag for load instead of alloc. Discussed with: kib MFC after: 3 days Notes: svn path=/head/; revision=190282
* vm_offset_t is unsigned, so compare of >= 0 is not needed.Robert Noland2009-03-201-1/+1
| | | | | | | | | | Found with: Coverity Prevent(tm) CID: 2259 MFC after: 3 days Notes: svn path=/head/; revision=190170
* Remove the DRM_ERROR to fix build. It didn't make any sense anyway.Robert Noland2009-03-201-2/+0
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=190166
* Fix what appears to be a typo, and restore the registers correctly.Robert Noland2009-03-201-1/+1
| | | | | | | | Found with: Coverity Prevent(tm) CID: 2454 Notes: svn path=/head/; revision=190164
* Don't deref dev->dev_private before checking that it exists.Robert Noland2009-03-201-2/+1
| | | | | | | | | | Found with: Coverity Prevent(tm) CID: 2940 MFC after: 3 days Notes: svn path=/head/; revision=190163