summaryrefslogtreecommitdiffstats
path: root/sys/dev/drm
Commit message (Collapse)AuthorAgeFilesLines
* Adjust printf format specifiers for dev_t and ino_t in kernel.gleb2014-12-171-2/+3
| | | | | | ino_t and dev_t are about to become uint64_t. Reviewed by: kib, mckusick
* Remove always false comparison.glebius2014-09-031-1/+1
| | | | Sponsored by: Nginx, Inc.
* Remove ia64.marcel2014-07-072-3/+1
| | | | | | | | | | | | | | | | | This includes: o All directories named *ia64* o All files named *ia64* o All ia64-specific code guarded by __ia64__ o All ia64-specific makefile logic o Mention of ia64 in comments and documentation This excludes: o Everything under contrib/ o Everything under crypto/ o sys/xen/interface o sys/sys/elf_common.h Discussed at: BSDcan
* Pull in r267961 and r267973 again. Fix for issues reported will follow.hselasky2014-06-282-2/+1
|
* Revert r267961, r267973:gjb2014-06-272-1/+2
| | | | | | | | | | These changes prevent sysctl(8) from returning proper output, such as: 1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1) truss: can not get etype: Cannot allocate memory
* Extend the meaning of the CTLFLAG_TUN flag to automatically check ifhselasky2014-06-272-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there is an environment variable which shall initialize the SYSCTL during early boot. This works for all SYSCTL types both statically and dynamically created ones, except for the SYSCTL NODE type and SYSCTLs which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to be used in the case a tunable sysctl has a custom initialisation function allowing the sysctl to still be marked as a tunable. The kernel SYSCTL API is mostly the same, with a few exceptions for some special operations like iterating childrens of a static/extern SYSCTL node. This operation should probably be made into a factored out common macro, hence some device drivers use this. The reason for changing the SYSCTL API was the need for a SYSCTL parent OID pointer and not only the SYSCTL parent OID list pointer in order to quickly generate the sysctl path. The motivation behind this patch is to avoid parameter loading cludges inside the OFED driver subsystem. Instead of adding special code to the OFED driver subsystem to post-load tunables into dynamically created sysctls, we generalize this in the kernel. Other changes: - Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask" to "hw.pcic.intr_mask". - Removed redundant TUNABLE statements throughout the kernel. - Some minor code rewrites in connection to removing not needed TUNABLE statements. - Added a missing SYSCTL_DECL(). - Wrapped two very long lines. - Avoid malloc()/free() inside sysctl string handling, in case it is called to initialize a sysctl from a tunable, hence malloc()/free() is not ready when sysctls from the sysctl dataset are registered. - Bumped FreeBSD version to indicate SYSCTL API change. MFC after: 2 weeks Sponsored by: Mellanox Technologies
* - Modify vm_page_unwire() and vm_page_enqueue() to directly acceptattilio2014-06-161-1/+1
| | | | | | | | | | | | | | | | | | the queue where to enqueue pages that are going to be unwired. - Add stronger checks to the enqueue/dequeue for the pagequeues when adding and removing pages to them. Of course, for unmanaged pages the queue parameter of vm_page_unwire() will be ignored, just as the active parameter today. This makes adding new pagequeues quicker. This change effectively modifies the KPI. __FreeBSD_version will be, however, bumped just when the full cache of free pages will be evicted. Sponsored by: EMC / Isilon storage division Reviewed by: alc Tested by: pho
* Add missing calls to bus_dmamap_unload() when freeing static DMAjhb2014-06-132-0/+2
| | | | | | allocations. Reviewed by: scottl
* Back out r261266 pending security buy-in.jamie2014-01-311-3/+1
| | | | | | | | r261266: Add a jail parameter, allow.kmem, which lets jailed processes access /dev/kmem and related devices (i.e. grants PRIV_IO and PRIV_KMEM_WRITE). This in conjunction with changing the drm driver's permission check from PRIV_DRIVER to PRIV_KMEM_WRITE will allow a jailed Xorg server.
* Add a jail parameter, allow.kmem, which lets jailed processes accessjamie2014-01-291-1/+3
| | | | | | | | | /dev/kmem and related devices (i.e. grants PRIV_IO and PRIV_KMEM_WRITE). This in conjunction with changing the drm driver's permission check from PRIV_DRIVER to PRIV_KMEM_WRITE will allow a jailed Xorg server. Submitted by: netchild MFC after: 1 week
* In sys/dev/drm/mach64_dma.c, remove static function mach64_set_dma_eol(),dim2013-12-261-48/+0
| | | | | | | which has never been used, even by upstream, since its initial upstream commit (see http://cgit.freedesktop.org/mesa/drm/commit/?id=873e1c4d ) MFC after: 3 days
* Fix undefined behavior: (1 << 31) is not defined as 1 is an int and thiseadler2013-11-309-47/+47
| | | | | | | | | | | | | shifts into the sign bit. Instead use (1U << 31) which gets the expected result. This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases. A similar change was made in OpenBSD. Discussed with: -arch, rdivacky Reviewed by: cperciva
* Similar to the (1 << 31) case it is not defined to do (2 << 30).eadler2013-11-301-2/+2
|
* Replace kernel virtual address space allocation with vmem. This providesjeff2013-08-071-2/+2
| | | | | | | | | | | | | transparent layering and better fragmentation. - Normalize functions that allocate memory to use kmem_* - Those that allocate address space are named kva_* - Those that operate on maps are named kmap_* - Implement recursive allocation handling for kmem_arena in vmem. Reviewed by: alc Tested by: pho Sponsored by: EMC / Isilon Storage Division
* Fix white spaces.jkim2013-04-231-2/+2
|
* Remove always-true conditions from if statement.eadler2013-04-231-2/+2
| | | | | | PR: kern/176712 Submitted by: Hiren Panchasara <hiren.panchasara@gmail.com> Approved by: cperciva (mentor)
* Switch vm_object lock to be a rwlock.attilio2013-02-201-0/+1
| | | | | | | | * VM_OBJECT_LOCK and VM_OBJECT_UNLOCK are mapped to write operations * VM_OBJECT_SLEEP() is introduced as a general purpose primitve to get a sleep operation using a VM_OBJECT_LOCK() as protection * The approach must bear with vm_pager.h namespace pollution so many files require including directly rwlock.h
* Cast VIA_READ to (void) where the result is unused.rdivacky2012-11-092-3/+3
|
* Make sure to define __BIG_ENDIAN and __LITTLE_ENDIAN with the appropriatenwhitehorn2012-10-261-0/+5
| | | | | | | number of underscores for Linux compatibility in drm(4). Submitted by: sendtomatt at gmail dot com MFC after: 2 weeks
* Streamline use of cdevpriv and correct some corner cases.hselasky2012-08-151-8/+6
| | | | | | | | | | | | | | | | | | | | 1) It is not useful to call "devfs_clear_cdevpriv()" from "d_close" callbacks, hence for example read, write, ioctl and so on might be sleeping at the time of "d_close" being called and then then freed private data can still be accessed. Examples: dtrace, linux_compat, ksyms (all fixed by this patch) 2) In sys/dev/drm* there are some cases in which memory will be freed twice, if open fails, first by code in the open routine, secondly by the cdevpriv destructor. Move registration of the cdevpriv to the end of the drm open routines. 3) devfs_clear_cdevpriv() is not called if the "d_open" callback registered cdevpriv data and the "d_open" callback function returned an error. Fix this. Discussed with: phk MFC after: 2 weeks
* In sys/dev/drm/radeon_state.c, use the correct printf length modifiersdim2011-12-301-1/+1
| | | | | | for ints. MFC after: 1 week
* Fix format string Z --> z, since the former is a deprecated and (in FreeBSD)se2011-12-161-2/+2
| | | | | | | | unsupported form of the latter. This change has been reviewed and accepted in the -hackers list. Submitted by: Alexander Best Reviewed by: David Schulz
* Do not define bool/true/false if the symbols already exist.mdf2011-12-121-1/+1
| | | | | MFC after: 2 weeks Sponsored by: Isilon Systems, LLC
* Fix display of the drm sysctls.kib2011-04-231-1/+1
| | | | | Sponsored by: The FreeBSD Foundation MFC after: 3 days
* Do a sweep of the tree replacing calls to pci_find_extcap() with calls tojhb2011-03-231-1/+1
| | | | pci_find_cap() instead.
* - Remove no longer in usemiwi2011-02-222-87/+0
| | | | | | | PR: kern/152354 Submitted by: vehemens <vehemens@verizon.net> Discussion with:kib Approved by: rwatson (mentor)
* Fix typos - remove duplicate "the".brucec2011-02-212-2/+2
| | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days
* Introduce and use a new VM interface for temporarily pinning pages. Thisalc2010-12-251-25/+14
| | | | | | | new interface replaces the combined use of vm_fault_quick() and pmap_extract_and_hold() throughout the kernel. In collaboration with: kib@
* fix atomic_set_xxx misuse in drmavg2010-12-111-1/+1
| | | | | | | It seems that atomic_set_xxx and atomic_store_xxx were confused. Reviewed by: jhb MFC after: 3 weeks
* Make drm(4) build, if not work reliably, on PowerPC.nwhitehorn2010-11-166-11/+13
|
* Fix typos.brucec2010-11-091-6/+6
| | | | | PR: bin/148894 Submitted by: olgeni
* Add support for ATI Radeon HD 4250.olli2010-08-031-0/+1
| | | | | | | | PR: kern/149041 Submitted by: olli Reviewed by: rnoland Approved by: des (mentor) MFC after: 1 week
* Push down the acquisition of the page queues lock into vm_page_unwire().alc2010-05-051-2/+0
|
* Add page locking to the vm_page_cow* functions.alc2010-05-041-2/+0
| | | | | | | Push down the acquisition and release of the page queues lock into vm_page_wire(). Reviewed by: kib
* Acquire the page lock around vm_page_unwire(). For consistency, extend thealc2010-05-031-0/+2
| | | | | | | | scope of the object lock in agp_i810.c. (In this specific case, the scope of the object lock shouldn't matter, but I don't want to create a bad example that might be copied to a case where it did matter.) Reviewed by: kib
* On Alan's advice, rather than do a wholesale conversion on a singlekmacy2010-04-301-0/+2
| | | | | | | | | | | | architecture from page queue lock to a hashed array of page locks (based on a patch by Jeff Roberson), I've implemented page lock support in the MI code and have only moved vm_page's hold_count out from under page queue mutex to page lock. This changes pmap_extract_and_hold on all pmaps. Supported by: Bitgravity Inc. Discussed with: alc, jeffr, and kib
* fx->lock is used as an index, correct test case.rnoland2010-04-281-1/+1
| | | | MFC after: 1 week
* remove vm obect tracker that slipped in from prior work.rnoland2010-04-241-1/+0
| | | | MFC after: 2 weeks
* Address some WITNESS panics that occur when using the via driver.rnoland2010-04-234-8/+10
| | | | | | | | Some of these cases should be safe in a non-atomic fashion, however since all of the driver ioctls are locked, a lot of work is required to fix it correctly. Just don't sleep now. MFC after: 2 weeks
* Now that we properly set write-combining on the pages that back the GART,rnoland2010-04-222-5/+8
| | | | | | disable snooping on radeons. MFC after: 2 weeks
* re-write scatter gather memory allocation yet again...rnoland2010-04-226-113/+62
| | | | | | | | | | 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-2223-168/+201
| | | | | | | | | | | | * 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.
* Fix build after typo.rnoland2010-03-131-1/+1
| | | | | Reported by: Sergey V. Dyatko <sergey.dyatko@gmail.com> MFC after: 3 days
* Add support for Intel Pineview chips, aka IGDrnoland2010-03-133-3/+15
| | | | | | | | Slightly modified version of the submitted patch. PR: 143427 Submitted by: Mamoru Sumida <msumida@mvc.biglobe.ne.jp> MFC after: 3 days
* Welcome drm support for VIA unichrome chips.rnoland2010-01-3114-0/+5908
| | | | MFC after: 2 weeks
* Import simple drm memory manager.rnoland2010-01-3111-5/+1296
| | | | | | | This is required for the VIA driver and at least some parts are needed for GEM. MFC after: 2 weeks
* Update d_mmap() to accept vm_ooffset_t and vm_memattr_t.rnoland2009-12-291-2/+2
| | | | | | | | | | | | | This replaces d_mmap() with the d_mmap2() implementation and also changes the type of offset to vm_ooffset_t. Purge d_mmap2(). All driver modules will need to be rebuilt since D_VERSION is also bumped. Reviewed by: jhb@ MFC after: Not in this lifetime...
* Fix botched git -> svn merge.rnoland2009-10-301-1/+1
| | | | MFC after: 2 weeks
* Cleanup in r600_blitrnoland2009-10-301-29/+39
| | | | | | | | | - 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 MFC after: 3 days
* 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
OpenPOWER on IntegriCloud