opnsense-src/sys/dev/drm2
Warner Losh 1c7d15b030 Make device_busy/unbusy work w/o Giant held
The vast majority of the busy/unbusy users in the tree don't acquire
Giant before calling device_busy/unbusy. However, if multiple threads
are opening a file, say, that causes the device to busy/unbusy, then we
can race to the root marking things busy. Move to using a reference
count to keep track of how many times a device_t has been made busy. Use
that count to make the same decisions that we'd make with the old device
state.

Note: gpiopps.c uses D_TRACKCLOSE. Others do as well. However, there's a
known race with closes that will be corrected for all the drivers that
do this in a future commit.

Sponsored by:		Netflix
Reviewed by:		hselasky, jhb
Differential Revision:	https://reviews.freebsd.org/D26284
2021-11-30 15:18:01 -07:00
..
ttm Convert consumers to vm_page_alloc_noobj_contig() 2021-10-19 21:22:56 -04:00
drm.h Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_agpsupport.c Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_atomic.h Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_auth.c Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_buffer.c Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_buffer.h Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_bufs.c Don't permit DRM buffer mappings to be upgraded to executable. 2020-10-06 18:13:15 +00:00
drm_context.c Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_core.h Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_crtc.c Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_crtc.h Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_crtc_helper.c Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_crtc_helper.h Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_dma.c Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_dp_helper.c Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_dp_helper.h Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_dp_iic_helper.c Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_drv.c Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_edid.c Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_edid.h Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_edid_modes.h Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_fb_helper.c Add KERNEL_PANICKED macro for use in place of direct panicstr tests 2020-01-12 06:07:54 +00:00
drm_fb_helper.h Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_fixed.h Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_fops.c Make device_busy/unbusy work w/o Giant held 2021-11-30 15:18:01 -07:00
drm_fourcc.h Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_gem.c Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
drm_gem_names.c Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
drm_gem_names.h Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
drm_global.c Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_global.h Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_hashtab.c Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_hashtab.h Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_ioc32.c Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_ioctl.c Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_irq.c Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_linux_list.h Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_linux_list_sort.c Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
drm_lock.c Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_mem_util.h Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_memory.c Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_mm.c Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_mm.h Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_mode.h Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_modes.c Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_os_freebsd.c drm2: Fix build after r365264 2020-09-03 05:25:39 +00:00
drm_os_freebsd.h drm2: Further improve deprecation message 2020-09-02 18:04:49 +00:00
drm_pci.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (5 of many) 2020-02-16 17:11:54 +00:00
drm_pciids.h Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_platform.c Fix some common typos in source code comments 2021-08-14 08:55:58 +02:00
drm_sarea.h Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_scatter.c Eliminate the arena parameter to kmem_free(). Implicitly this corrects an 2018-08-25 19:38:08 +00:00
drm_stub.c Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drm_sysctl.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (5 of many) 2020-02-16 17:11:54 +00:00
drm_vm.c Revert drm2 removal. 2018-08-24 00:02:00 +00:00
drmP.h Avoid relying on header pollution from sys/refcount.h. 2019-07-29 20:26:01 +00:00