Hi all, First few patches are resends (reviews, pretty please), but most of this is all new. After all this all the legacy code is guarded by DRIVER_* feature tests, and struct_mutex is never even acquired for modern drivers (except nouveau, because). And there's just 2 things left where struct_mutex actually matters for modern drivers: - master locking. I've handled the low-hanging fruit, the leftover paths touch the dreaded legacy-horros hw.lock. No idea how to get rid of that, but master_list and master status probably need to grow a separate lock. - 4 drivers who use struct_mutex as their BKL: i915, omapdrm, msm & udl. Most of those will require serious amounts of work to fix, but for new drivers I'm postive we don't have to deal with struct_mutex ever again: Either pick ttm (if you're ok with midlayers), or implement the locking scheme from etnaviv (which is just plain gem with ww mutexes and fences). 23 drivers (most of those kms-only, using cma for gem) are now entirely struct_mutex free! Reviews, acks and comments highly welcome. Cheers, Daniel Benjamin Gaignard (1): drm: sti: remove useless call to dev->struct_mutex Daniel Vetter (34): drm: Give drm_agp_clear drm_legacy_ prefix drm: Put legacy lastclose work into drm_legacy_dev_reinit drm: Move drm_getmap into drm_bufs.c and give it a legacy prefix drm: Forbid legacy MAP functions for DRIVER_MODESET drm: Push struct_mutex into ->master_destroy drm: Hide master MAP cleanup in drm_bufs.c drm: Make drm_vm_open/close_locked private to drm_vm.c drm: Protect dev->filelist with its own mutex drm/gem: support BO freeing without dev->struct_mutex drm/amdgpu: Use lockless gem BO free callback drm/armada: Use lockless gem BO free callback drm/ast: Use lockless gem BO free callback drm/atmel: Use lockless gem BO free callback drm/bochs: Use lockless gem BO free callback drm/cirrus: Use lockless gem BO free callback drm/etnaviv: Use lockless gem BO free callback drm/exynos: Use lockless gem BO free callback drm/fls-dcu: Use lockless gem BO free callback drm/imx: Use lockless gem BO free callback drm/mga200g: Use lockless gem BO free callback drm/nouveau: Use lockless gem BO free callback drm/qxl: Use lockless gem BO free callback drm/radeon: Use lockless gem BO free callback drm/rcar-du: Use lockless gem BO free callback drm/rockchip: Use lockless gem BO free callback drm/shmob: Use lockless gem BO free callback drm/tegra: Use lockless gem BO free callback drm/tilcdc: Use lockless gem BO free callback drm/vc4: Use drm_gem_object_unreference_unlocked drm/vc4: Use lockless gem BO free callback drm/vgem: Use lockless gem BO free callback drm/virtio: Use lockless gem BO free callback drm/virtio: Use lockless gem BO free callback drm/rockchip: Use cma gem vm ops drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 10 +-- drivers/gpu/drm/armada/armada_drv.c | 2 +- drivers/gpu/drm/ast/ast_drv.c | 2 +- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 2 +- drivers/gpu/drm/bochs/bochs_drv.c | 2 +- drivers/gpu/drm/cirrus/cirrus_drv.c | 2 +- drivers/gpu/drm/drm_agpsupport.c | 4 +- drivers/gpu/drm/drm_bufs.c | 92 ++++++++++++++++++++++++++-- drivers/gpu/drm/drm_drv.c | 11 +--- drivers/gpu/drm/drm_fops.c | 51 ++++++++------- drivers/gpu/drm/drm_gem.c | 64 +++++++++++++++---- drivers/gpu/drm/drm_info.c | 4 +- drivers/gpu/drm/drm_internal.h | 4 +- drivers/gpu/drm/drm_ioctl.c | 54 +--------------- drivers/gpu/drm/drm_legacy.h | 2 + drivers/gpu/drm/drm_pci.c | 2 +- drivers/gpu/drm/drm_vm.c | 16 ++--- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_drv.c | 2 +- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 2 +- drivers/gpu/drm/i915/i915_debugfs.c | 12 +++- drivers/gpu/drm/imx/imx-drm-core.c | 2 +- drivers/gpu/drm/mgag200/mgag200_drv.c | 2 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +- drivers/gpu/drm/qxl/qxl_drv.c | 2 +- drivers/gpu/drm/radeon/radeon_drv.c | 2 +- drivers/gpu/drm/rcar-du/rcar_du_drv.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 9 +-- drivers/gpu/drm/shmobile/shmob_drm_drv.c | 2 +- drivers/gpu/drm/sti/sti_cursor.c | 7 --- drivers/gpu/drm/sti/sti_drv.c | 8 +-- drivers/gpu/drm/sti/sti_dvo.c | 7 --- drivers/gpu/drm/sti/sti_gdp.c | 14 ----- drivers/gpu/drm/sti/sti_hda.c | 7 --- drivers/gpu/drm/sti/sti_hdmi.c | 7 --- drivers/gpu/drm/sti/sti_hqvdp.c | 7 --- drivers/gpu/drm/sti/sti_mixer.c | 7 --- drivers/gpu/drm/sti/sti_tvout.c | 7 --- drivers/gpu/drm/sti/sti_vid.c | 7 --- drivers/gpu/drm/tegra/drm.c | 2 +- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 +- drivers/gpu/drm/vc4/vc4_drv.c | 2 +- drivers/gpu/drm/vc4/vc4_gem.c | 11 +--- drivers/gpu/drm/vgem/vgem_drv.c | 2 +- drivers/gpu/drm/virtio/virtgpu_drv.c | 2 +- include/drm/drmP.h | 13 +++- include/drm/drm_agpsupport.h | 4 +- include/drm/drm_gem.h | 45 +------------- include/drm/drm_legacy.h | 4 +- 50 files changed, 241 insertions(+), 291 deletions(-) -- 2.8.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx