aboutsummaryrefslogtreecommitdiff
path: root/sys/arm/nvidia/drm2
Commit message (Collapse)AuthorAgeFilesLines
* sys: Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-232-2/+0
| | | | | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/ Similar commit in current: (cherry picked from commit 031beb4e239b)
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-237-14/+0
| | | | | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/ Similar commit in current: (cherry picked from commit 685dc743dc3b)
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-234-8/+0
| | | | | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/ Similar commit in current: (cherry picked from commit 95ee2897e98f)
* arm: fix a typo in nvidia/drm2/tegra_bo.cMateusz Guzik2021-11-091-1/+1
| | | | | | | | Unbreaks building TEGRA124 Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit e2493f4912cabd1d04be88fd17139a64bf2a2622)
* Convert consumers to vm_page_alloc_noobj_contig()Mark Johnston2021-11-031-8/+4
| | | | | | | | | Remove now-unneeded page zeroing. No functional change intended. Reviewed by: alc, hselasky, kib Sponsored by: The FreeBSD Foundation (cherry picked from commit 84c3922243a7b7fd510dcfb100aec59c878c57d0)
* arm: arm64: Directly use #include <dt-binding/...>Emmanuel Vadot2021-01-151-1/+1
| | | | | We have it in the includes path and this will help the transition to the new device-tree import in sys/contrib
* arm: clean up empty lines in .c and .h filesMateusz Guzik2020-09-018-26/+0
| | | | Notes: svn path=/head/; revision=365068
* remove extraneous double ;s in sys/Ed Maste2020-03-302-2/+2
| | | | Notes: svn path=/head/; revision=359441
* Fix a few places that free a page from an object without busy held. This isJeff Roberson2019-12-021-0/+1
| | | | | | | | | | | tightening constraints on busy as a precursor to lockless page lookup and should largely be a NOP for these cases. Reviewed by: alc, kib, markj Differential Revision: https://reviews.freebsd.org/D22611 Notes: svn path=/head/; revision=355314
* Change synchonization rules for vm_page reference counting.Mark Johnston2019-09-091-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several mechanisms by which a vm_page reference is held, preventing the page from being freed back to the page allocator. In particular, holding the page's object lock is sufficient to prevent the page from being freed; holding the busy lock or a wiring is sufficent as well. These references are protected by the page lock, which must therefore be acquired for many per-page operations. This results in false sharing since the page locks are external to the vm_page structures themselves and each lock protects multiple structures. Transition to using an atomically updated per-page reference counter. The object's reference is counted using a flag bit in the counter. A second flag bit is used to atomically block new references via pmap_extract_and_hold() while removing managed mappings of a page. Thus, the reference count of a page is guaranteed not to increase if the page is unbusied, unmapped, and the object's write lock is held. As a consequence of this, the page lock no longer protects a page's identity; operations which move pages between objects are now synchronized solely by the objects' locks. The vm_page_wire() and vm_page_unwire() KPIs are changed. The former requires that either the object lock or the busy lock is held. The latter no longer has a return value and may free the page if it releases the last reference to that page. vm_page_unwire_noq() behaves the same as before; the caller is responsible for checking its return value and freeing or enqueuing the page as appropriate. vm_page_wire_mapped() is introduced for use in pmap_extract_and_hold(). It fails if the page is concurrently being unmapped, typically triggering a fallback to the fault handler. vm_page_wire() no longer requires the page lock and vm_page_unwire() now internally acquires the page lock when releasing the last wiring of a page (since the page lock still protects a page's queue state). In particular, synchronization details are no longer leaked into the caller. The change excises the page lock from several frequently executed code paths. In particular, vm_object_terminate() no longer bounces between page locks as it releases an object's pages, and direct I/O and sendfile(SF_NOCACHE) completions no longer require the page lock. In these latter cases we now get linear scalability in the common scenario where different threads are operating on different files. __FreeBSD_version is bumped. The DRM ports have been updated to accomodate the KPI changes. Reviewed by: jeff (earlier version) Tested by: gallatin (earlier version), pho Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20486 Notes: svn path=/head/; revision=352110
* Replace uses of vm_page_unwire(m, PQ_NONE) with vm_page_unwire_noq(m).Mark Johnston2019-06-071-1/+1
| | | | | | | | | | | | | | | These calls are not the same in general: the former will dequeue the page if it is enqueued, while the latter will just leave it alone. But, all existing uses of the former apply to unmanaged pages, which are never enqueued in the first place. No functional change intended. Reviewed by: kib MFC after: 1 week Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20470 Notes: svn path=/head/; revision=348785
* Eliminate kmem_alloc_contig()'s unused arena parameter.Alan Cox2018-08-201-3/+3
| | | | | | | | | Reviewed by: hselasky, kib, markj Discussed with: jeff Differential Revision: https://reviews.freebsd.org/D16799 Notes: svn path=/head/; revision=338107
* Align OF_getencprop_alloc API with OF_getencprop and OF_getprop_allocOleksandr Tymoshenko2018-04-091-2/+2
| | | | | | | | | | | | | | | | | | | | | Change OF_getencprop_alloc semantics to be combination of malloc and OF_getencprop and return size of the property, not number of elements allocated. For the use cases where number of elements is preferred introduce OF_getencprop_alloc_multi helper function that copies semantics of OF_getencprop_alloc prior to this change. This is to make OF_getencprop_alloc and OF_getencprop_alloc_multi function signatures consistent with OF_getencprop_alloc and OF_getencprop_alloc_multi. Functionality-wise this patch is mostly rename of OF_getencprop_alloc to OF_getencprop_alloc_multi except two calls in ofw_bus_setup_iinfo where 1 was used as a block size. Notes: svn path=/head/; revision=332341
* vm_wait() rework.Konstantin Belousov2018-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Make vm_wait() take the vm_object argument which specifies the domain set to wait for the min condition pass. If there is no object associated with the wait, use curthread' policy domainset. The mechanics of the wait in vm_wait() and vm_wait_domain() is supplied by the new helper vm_wait_doms(), which directly takes the bitmask of the domains to wait for passing min condition. Eliminate pagedaemon_wait(). vm_domain_clear() handles the same operations. Eliminate VM_WAIT and VM_WAITPFAULT macros, the direct functions calls are enough. Eliminate several control state variables from vm_domain, unneeded after the vm_wait() conversion. Scetched and reviewed by: jeff Tested by: pho Sponsored by: The FreeBSD Foundation, Mellanox Technologies Differential revision: https://reviews.freebsd.org/D14384 Notes: svn path=/head/; revision=329636
* Implement drivers for NVIDIA tegra124 display controller, HDMI sourceMichal Meloun2016-12-2613-0/+6806
and host1x module. Unfortunately, tegra124 SoC doesn't have 2D acceleration engine and 3D requires not yet started nouveau driver. These drivers forms a first non-x86 DRM2 enabled graphic stack. Note, there are 2 outstanding issues: - The code uses gross hack in order to be comply with OBJT_MGTDEVICE pager. (See tegra_bo_init_pager() in tegra_bo.c) - Due to improper(probably) refcounting in drm_gem_mmap_single() (in drm_gem.c), the gem objects are never released. I hope that I will be able to address both issues in finite time, but I don't want to touch x86 world now. MFC after: 1 month Notes: svn path=/head/; revision=310600