summaryrefslogtreecommitdiffstats
path: root/sys/dev/drm/drm_drv.c
Commit message (Collapse)AuthorAgeFilesLines
* Add support for matching solely on vendor id.rnoland2009-03-171-2/+6
| | | | | | We will use this method with nouveau MFC after: 3 days
* Get rid of any remaining PZERO flags in mtx_sleep()rnoland2009-03-161-1/+1
| | | | | | Also, clean up some ifdef mess while I'm here. MFC after: 3 days
* Consistently use kdev for the kernel device.rnoland2009-03-091-18/+18
| | | | | Submitted by: vehemens <vehemens@verizon.net> MFC after: 3 days
* Initialize the vblank structures at load time. Previously we did thisrnoland2009-02-281-0/+2
| | | | | | | | | | | | 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
* Add a tuneable to allow disabling msi on drm at runtime.rnoland2009-02-271-1/+5
| | | | | | Suggested by: jhb@ MFC after: 2 weeks
* Fix up some ioctl permissions issues long overlooked.rnoland2009-02-271-4/+4
| | | | | Submitted by: jkim@ MFC after: 2 weeks
* Remove D_NEEDGIANT.rnoland2009-02-251-1/+1
| | | | MFC after: 2 weeks
* Turn on MSI if the card supports it. There is a blacklist for chipsrnoland2009-02-251-18/+71
| | | | | | which report that they are capable of MSI, but don't work correctly. MFC after: 2 weeks
* The i915 driver was the only consumer of locked task support.rnoland2009-02-251-4/+0
| | | | | | | Now that it doesn't use it anymore, get right of the taskqueue and locked task support. MFC after: 2 weeks
* There is no reason to hold the lock here.rnoland2009-02-251-2/+0
| | | | | | | When I was LOCK_PROFILING this was pretty high up and there is no reason for it. MFC after: 2 weeks
* We only want drm to ever attach to the primary pci device.rnoland2008-12-181-0/+4
| | | | | | | | | | Intel 855 chips present the same pci id for both heads. This prevents us from attaching to the dummy second head. All other chips that I am aware of either only present a single pci id, or different ids for each head so that we only match on the correct head. Approved by: kib@ MFC after: 2 weeks
* Replace calls to minor() with dev2unit(). Ed already fixed this once,rnoland2008-10-231-1/+1
| | | | | | | | but I inadvertently overwrote the change when I synced to git. Commit the fix in both places, so this doesn't happen again. Approved by: jhb (mentor) MFC after: 2 weeks
* Rework memory allocation to allocate memory with different type names. Thisrnoland2008-10-131-5/+5
| | | | | | | | | | | will ease the identification of memory leaks as the OS will be able to track allocations for us by malloc type. vmstat -m will show all of the allocations. Convert the calls to drm_alloc() and friends, which are used in shared code to static __inline__ while we are here. Approved by: jhb (mentor)
* resync to git masterrnoland2008-10-031-317/+86
| | | | | | | | | | | | | | | | | | | | | | 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
* Replace all calls to minor() with dev2unit().ed2008-09-271-1/+1
| | | | | | | | | | | | | | | After I removed all the unit2minor()/minor2unit() calls from the kernel yesterday, I realised calling minor() everywhere is quite confusing. Character devices now only have the ability to store a unit number, not a minor number. Remove the confusion by using dev2unit() everywhere. This commit could also be considered as a bug fix. A lot of drivers call minor(), while they should actually be calling dev2unit(). In -CURRENT this isn't a problem, but it turns out we never had any problem reports related to that issue in the past. I suspect not many people connect more than 256 pieces of the same hardware. Reviewed by: kib
* We need to lock around driver unload now.rnoland2008-08-301-1/+4
| | | | | | | The i915 driver installs it's register map at load time now. We can't remove the map during unload without holding the lock. Approved by: kib
* Free the device lock around the call to drm_drawable_free_all()rnoland2008-08-301-0/+2
| | | | | | This function manipulates a spin lock and we can't hold a mutex over it. Approved by: kib
* Update drm kernel drivers.rnoland2008-08-231-146/+193
| | | | | | | | | | 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
* Dont accidentally remove a filesocket which is still in use. This givesremko2008-01-161-6/+9
| | | | | | | | | | | | problems when the DRM driver is loaded and the AIXGL extension is loaded , the AIXGL driver requests a drm_close and this will cause the radeon driver to fail while starting X windows. PR: kern/114688 Submitted by: vehemens <vehemens at verizon dot net> Prodded by: Robert Noland Approved by: imp (mentor, a while ago already), anholt MFC After: 1 week
* Merge from DRM upstream:anholt2006-09-071-0/+3
| | | | | | | - 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).
* - Bump FreeBSD version for the hostb(4) and vgapci(4) drivers as well asjhb2005-12-201-1/+9
| | | | | | | | | the addition of pci_find_extcap(). - Change the drm drivers to attach to vgapci. This is #ifdef'd so the code can be shared across branches. - Use pci_find_extcap() to look for AGP and PCIE capabilities in drm. - GC all the drmsub stuff for i810/i830/i915. The agp and drm devices are now both children of vgapci.
* Merge DRM CVS as of 2005-12-02, adding i915 DRM support thanks to Alexey Popov,anholt2005-12-031-4/+9
| | | | and a new r300 PCI ID.
* Restore the enabling of debugging by default by the DRM_DEBUG kernel option.anholt2005-12-021-0/+4
| | | | | | | It remains controlled by hw.dri.*.debug no matter what. PR: kern/85479 Submitted by: Oliver Fromme <olli@secnetix.de>
* Update DRM to CVS snapshot as of 2005-11-28. Notable changes:anholt2005-11-281-183/+204
| | | | | | | | | | | | | - 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.
* Update to DRM CVS as of 2005-04-12, bringing many changes:anholt2005-04-161-0/+916
- 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
OpenPOWER on IntegriCloud