summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/drm/include/linux (follow)
Commit message (Collapse)AuthorAgeFilesLines
* correct drm work flush behaviourjsg2021-02-141-2/+3
| | | | | | | | | Don't set taskq to system_wq in INIT_WORK(). Test if taskq pointer is non-NULL before calling taskq_barrier() in flush functions. fixes a black screen on boot problem with 5.10.y drm using nano x1 bisected by jcs@ to 'drm/i915: Always flush the active worker before returning from the wait'
* revert drm vmalloc changesjsg2021-01-132-16/+38
| | | | | | | It is suspected they were to blame for a machine with inteldrm running X (xterms and chromium) running out of resources after a few days. ok kettenis@
* Bring the emulated Linux memory allocation interfaces more in line withkettenis2021-01-082-38/+16
| | | | | | | | | what Linux does. Let vmalloc() use km_alloc(9) instead of malloc(9) and let kvmalloc() only use malloc(9) for small (less than a page) allocations and atomic allocations. This should reduce the pressure on the "interrupt-safe" map. ok jsg@
* test against [VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS] in access_ok()jsg2020-12-201-3/+8
| | | | ok kettenis@
* remove unused include linux no longer hasjsg2020-12-141-0/+0
|
* remove unused (and wrong) disable_irq() and enable_irq() definesjsg2020-12-141-3/+0
|
* remove unused wait interfacesjsg2020-12-131-13/+1
|
* use jiffies var instead of ticks when checking for timeoutjsg2020-12-101-6/+7
|
* remove timespec_to_jiffies() which no longer exists in linuxjsg2020-12-101-12/+0
|
* remove unused (and wrong) page_address() macrojsg2020-12-071-1/+0
| | | | this is supposed to return a va for a page not pa
* change from bus_addr_t to paddr_t for phys_addr_t and resource_size_tjsg2020-12-071-2/+2
| | | | Types stay unsigned long; we don't do 64 bit paddr_t on any 32 bit arch.
* remove unused definitions which no longer exist in linuxjsg2020-11-174-8/+2
|
* remove setup_timer() interface linux removed in 2017jsg2020-11-171-2/+1
|
* fix time_after32() macrojsg2020-11-171-1/+1
|
* Bring IDR function prototypes in line with modern Linux and implementkettenis2020-11-141-13/+12
| | | | | | | IDA functions in terms of IDR. Fixes issues with running out of PASIDs in amdgpu(4). ok jsg@
* use RWLOCK_INITIALIZER() in DEFINE_MUTEX()jsg2020-11-121-1/+1
| | | | | | | | | | Gives rwlocks defined this way a non-NULL rwl_name. Move ttm_pool_shrink_scan() DEFINE_MUTEX use out of function scope to fix build with WITNESS after this change and expand macro to have a better name than "lock". Found by and ok semarie@
* use a single preinitialised mutex for atomic64 fallback pathjsg2020-11-091-14/+16
| | | | | | | | | | | Previously we would initialise a variable specific mutex in ATOMIC64_INIT() or atomic64_set() but the drm code in multiple places zeroes memory and later accesses it without calling these resulting in a mutex with IPL_NONE instead of IPL_HIGH. Fixes a 'locking against myself' panic reported by Anthony Richardby on macppc with PowerBook5,6 and RV350. ok kettenis@
* use 64 bit atomic builtins on i386 for atomic64jsg2020-11-091-2/+4
|
* change from rwlock(9) to mutex(9) for linux rwlocksjsg2020-11-072-8/+4
| | | | | | | | | Linux rwlocks are read/write spin locks which don't sleep. Fixes a panic claudio@ reported with a WITNESS kernel on inteldrm(4) 'panic: acquiring blockable sleep lock with spinlock or critical section held (rwlock) drmvma' Patch from kettenis@ with a small tweak from me. ok kettenis@
* move definitions which should be in rwsem.hjsg2020-11-063-6/+14
|
* We need more memory barriers on powerpc.kettenis2020-10-291-7/+13
| | | | ok tobhe@
* Improve I/O functions to match Linux:kettenis2020-10-261-9/+100
| | | | | | | | | | - Reverse byte order on big-endian architectures (except on sparc64) - Add memory barriers Note that sparc64 is special as we use a little-endian mapping for PCI bus space, so we shouldn't reverse the byte order there. ok jsg@
* remove unused alpha memory barrier definesjsg2020-10-261-5/+1
|
* use __membar() where possiblejsg2020-10-261-9/+9
|
* use lwsync and eieio for smp barriers on powerpcjsg2020-10-261-4/+11
| | | | ok kettenis@
* handle capable(CAP_SYS_NICE) for allowing high priority contextsjsg2020-10-211-3/+10
|
* use drm_mm from linux 5.7.yjsg2020-10-201-0/+2
| | | | | | | | | | | | | | | | | Without this boot time tests from setting amdgpu_testing = 1 fail. For example on Vega 56: drm: GART: 512M 0x0000000000000000 - 0x000000001FFFFFFF ... [drm] Tested GTT->VRAM and VRAM->GTT copy for GTT offset 0xa00000 [drm] Tested GTT->VRAM and VRAM->GTT copy for GTT offset 0xb00000 ... [drm] Tested GTT->VRAM and VRAM->GTT copy for GTT offset 0x1fe00000 [drm] Tested GTT->VRAM and VRAM->GTT copy for GTT offset 0x1ff00000 [drm] *ERROR* 0xffff80000135f858 bind failed Error while testing BO move ok kettenis@
* remove uneeded pool.h includejsg2020-10-161-1/+0
|
* implement linux interval tree functionsjsg2020-10-162-36/+19
| | | | | Adapt kettenis' amdgpu interval tree replacement functions for the interval_tree.h functions radeondrm uses on cayman, aruba and GCN.
* Align pool items on CACHELINESIZE when replacing linux kmem_cache withjsg2020-10-112-0/+6
| | | | | | SLAB_HWCACHE_ALIGN flag. tested by semarie@
* avoid uninitialised var use in drm_syncobj.cjsg2020-10-011-1/+3
| | | | | We don't walk the chain in dma_fence_chain_for_each() but can provide the first fence.
* enable more of the syncobj codejsg2020-08-251-0/+33
| | | | avoids unimplemented function warnings when running Mesa iris driver
* Our usleep_range(min, max) implementation today is only taking accountmglocker2020-08-181-1/+1
| | | | | | | | | | | | | | of the min value to delay. On the iMac11,2 this was too short, causing a timeout in the DP AUX transaction retry loop, leaving the eDP dark after the KMS initialization attempt. Affected code line for reference: sys/dev/pci/drm/drm_dp_helper.c:771, revision 1.11 Therefore we change the behavior of usleep_range(min, max) to delay the average value of min and max instead, which finally fixes the KMS initialization on the iMac11,2. Help and ok jsg@
* remove timeval conversion interfaces no longer in linuxjsg2020-08-031-6/+1
|
* change ktime to nanoseconds in drmjsg2020-07-292-52/+49
| | | | | | | | Change from using timevals for ktime to 64 bit count of nanoseconds to closer match linux. tweak from and ok cheloha@ ok kettenis@ on an earlier version
* use timeout_del_barrier(9) for del_timer_sync()jsg2020-07-201-2/+2
|
* drm: use hi-res time to implement ktime_get(), ktime_get_real()cheloha2020-07-072-4/+4
| | | | | | | | | | | | | | | | | | | | There seems to have been some confusion about the granularity of certain time interfaces in the Linux kernel when our DRM compatibility layer was written. To be clear: the Linux ktime_get() and ktime_get_real() interfaces are *high resolution* clocks. We should to implement them with high resolution interfaces from our own kernel. Thus, use microuptime(9) to implement ktime_get() and microtime(9) to implement ktime_get_real(). While here, ktime_get_raw_ns() should use ktime_get_raw(), not ktime_get(). Discussed with kettenis@ and jsg@. ok jsg@
* remove unused timespec interfaces no longer in linuxjsg2020-07-021-38/+1
|
* powerpc64 has ci_idepthjsg2020-07-021-1/+1
|
* use intr_barrier(9) for synchronize_irq() and synchronize_hardirq()jsg2020-07-021-2/+0
|
* use intr_restore() when restoring interruptsjsg2020-06-301-2/+2
| | | | ok kettenis@
* use time since epoch not time since boot for 'real' interfacesjsg2020-06-291-5/+11
|
* remove unused getrawmonotonic() and ktime_mono_to_real()jsg2020-06-291-2/+0
|
* remove unused interfaces which were removed from linuxjsg2020-06-292-12/+1
|
* use attributes for __maybe_unused and __always_inlinejsg2020-06-291-4/+4
|
* reduce disabled warnings with clangjsg2020-06-291-4/+0
|
* make fbops const to avoid warning about discarding constjsg2020-06-291-1/+1
| | | | | found the hard way by deraadt@ on sparc64 fix suggested by kettenis@
* call fb_set_par() function pointer in register_framebuffer() if setjsg2020-06-281-0/+8
| | | | ok stsp@ kettenis@
* add readx_poll_timeout() required for 5.7.6 drmjsg2020-06-261-0/+34
| | | | with help from cheloha@
* kernel: use gettime(9)/getuptime(9) in lieu of time_second(9)/time_uptime(9)cheloha2020-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | time_second(9) and time_uptime(9) are widely used in the kernel to quickly get the system UTC or system uptime as a time_t. However, time_t is 64-bit everywhere, so it is not generally safe to use them on 32-bit platforms: you have a split-read problem if your hardware cannot perform atomic 64-bit reads. This patch replaces time_second(9) with gettime(9), a safer successor interface, throughout the kernel. Similarly, time_uptime(9) is replaced with getuptime(9). There is a performance cost on 32-bit platforms in exchange for eliminating the split-read problem: instead of two register reads you now have a lockless read loop to pull the values from the timehands. This is really not *too* bad in the grand scheme of things, but compared to what we were doing before it is several times slower. There is no performance cost on 64-bit (__LP64__) platforms. With input from visa@, dlg@, and tedu@. Several bugs squashed by visa@. ok kettenis@