summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/drm/include (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@
* drm/i915: Remove dubious Valleyview PCI IDsjsg2020-12-201-3/+1
| | | | | From Alexei Podtelezhnikov f2bde2546b81b64fb58aa04888fdd82a090b3908 in mainline linux
* 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-073-11/+7
| | | | | | | | | 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
|
* change drm_vma function arguments to take struct drm_file *jsg2020-10-211-5/+5
| | | | | reduces the diff to linux 5.7.y ok kettenis@
* use drm_mm from linux 5.7.yjsg2020-10-203-134/+60
| | | | | | | | | | | | | | | | | 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.
* remove unused locally added drm_driver struct membersjsg2020-10-141-2/+0
|
* Align pool items on CACHELINESIZE when replacing linux kmem_cache withjsg2020-10-112-0/+6
| | | | | | SLAB_HWCACHE_ALIGN flag. tested by semarie@
* drm/i915/tgl: Add new PCI IDs to TGLjsg2020-10-051-2/+6
| | | | | From Swathi Dhanavanthri 3882581753d1cca0d32b5a8ad81791b79fb35d67 in mainline linux
* 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.
* use drm_cache.c from linux 5.7.yjsg2020-09-131-0/+9
| | | | ok kettenis@
* add an ipi for wbinvd and a linux style wbinvd_on_all_cpus() functionjsg2020-09-131-11/+1
| | | | ok kettenis@ deraadt@
* Include <sys/systm.h> directly instead of relying on hidden UVM includes.mpi2020-09-111-1/+2
| | | | The header is being pulled via db_machdep.h -> uvm_extern.h -> uvm_map.h
* 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@
* drm/drm_fb_helper: fix fbdev with sparc64jsg2020-08-121-0/+12
| | | | | | From Sam Ravnborg cea0a7943a30a6d0320c8558a844dd27e8f0aa8b in linux 5.7.y/5.7.15 2a1658bf922ffd9b7907e270a7d9cdc9643fc45d in mainline linux
* 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
|