2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-29 07:34:06 +08:00
linux-next/drivers/gpu/drm
Daniel Vetter 2225cfe46b drm/gem: Use kref_get_unless_zero for the weak mmap references
Compared to wrapping the final kref_put with dev->struct_mutex this
allows us to only acquire the offset manager look both in the final
cleanup and in the lookup. Which has the upside that no locks leak out
of the core abstractions. But it means that we need to hold a
temporary reference to the object while checking mmap constraints, to
make sure the object doesn't disappear. Extended the critical region
would have worked too, but would result in more leaky locking.

Also, this is the final bit which required dev->struct_mutex in gem
core, now modern drivers can be completely struct_mutex free!

This needs a new drm_vma_offset_exact_lookup_locked and makes both
drm_vma_offset_exact_lookup and drm_vma_offset_lookup unused.

v2: Don't leak object references in failure paths (David).

v3: Add a comment from Chris explaining how the ordering works, with
the slight adjustment that I dropped any mention of struct_mutex since
with this patch it's now immaterial ot core gem.

Cc: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://mid.gmane.org/1444901623-18918-1-git-send-email-daniel.vetter@ffwll.ch
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-10-19 11:00:44 +02:00
..
amd drm/<drivers>: Drop DRM_UNLOCKED from modeset drivers 2015-10-16 15:50:54 +02:00
armada drm/<drivers>: Drop DRM_UNLOCKED from modeset drivers 2015-10-16 15:50:54 +02:00
ast drm/ast: Don't grab dev->struct_mutex for in mmap offset ioctl 2015-08-10 13:36:55 +02:00
atmel-hlcdc drm: Stop using drm_vblank_count() as the hw frame counter 2015-10-07 16:13:52 +02:00
bochs drm/bochs: Don't grab dev->struct_mutex for in mmap offset ioctl 2015-08-10 13:37:04 +02:00
bridge Merge branch 'drm-dwhdmi-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into drm-next 2015-08-27 13:01:57 +10:00
cirrus drm/cirrus: Don't grab dev->struct_mutex for in mmap offset ioctl 2015-08-10 13:37:27 +02:00
exynos drm/<drivers>: Drop DRM_UNLOCKED from modeset drivers 2015-10-16 15:50:54 +02:00
fsl-dcu drm: Stop using drm_vblank_count() as the hw frame counter 2015-10-07 16:13:52 +02:00
gma500 drm/irq: Use unsigned int pipe in public API 2015-10-06 12:57:47 +02:00
i2c Linux 4.3-rc2 2015-09-24 17:18:41 +02:00
i810
i915 drm/<drivers>: Drop DRM_UNLOCKED from modeset drivers 2015-10-16 15:50:54 +02:00
imx drm: Stop using drm_vblank_count() as the hw frame counter 2015-10-07 16:13:52 +02:00
mga drm/irq: Use unsigned int pipe in public API 2015-10-06 12:57:47 +02:00
mgag200 drm/mgag200: Fix driver_load error handling 2015-09-24 08:10:44 +10:00
msm drm/gem: Drop struct_mutex requirement from drm_gem_mmap_obj 2015-10-16 15:51:00 +02:00
nouveau drm/<drivers>: Drop DRM_UNLOCKED from modeset drivers 2015-10-16 15:50:54 +02:00
omapdrm drm/gem: Drop struct_mutex requirement from drm_gem_mmap_obj 2015-10-16 15:51:00 +02:00
panel drm/panel: Add support for LG LG4573 480x800 4.3" panel 2015-08-14 21:35:35 +02:00
qxl drm/<drivers>: Drop DRM_UNLOCKED from modeset drivers 2015-10-16 15:50:54 +02:00
r128 drm/irq: Use unsigned int pipe in public API 2015-10-06 12:57:47 +02:00
radeon drm/<drivers>: Drop DRM_UNLOCKED from modeset drivers 2015-10-16 15:50:54 +02:00
rcar-du drm: Stop using drm_vblank_count() as the hw frame counter 2015-10-07 16:13:52 +02:00
rockchip drm/gem: Drop struct_mutex requirement from drm_gem_mmap_obj 2015-10-16 15:51:00 +02:00
savage
shmobile drm: Stop using drm_vblank_count() as the hw frame counter 2015-10-07 16:13:52 +02:00
sis
sti drm: Stop using drm_vblank_count() as the hw frame counter 2015-10-07 16:13:52 +02:00
tdfx
tegra drm/<drivers>: Drop DRM_UNLOCKED from modeset drivers 2015-10-16 15:50:54 +02:00
tilcdc drm: Stop using drm_vblank_count() as the hw frame counter 2015-10-07 16:13:52 +02:00
ttm drm/ttm: Fix memory space allocation v2 2015-09-15 00:57:01 -07:00
udl drm/udl: Use new drm_fb_helper functions 2015-08-06 14:13:00 +02:00
vgem drm/vgem: Drop vgem_drm_gem_mmap 2015-10-19 11:00:44 +02:00
via drm/irq: Use unsigned int pipe in public API 2015-10-06 12:57:47 +02:00
virtio drm/virtio: Use new drm_fb_helper functions 2015-08-06 14:13:07 +02:00
vmwgfx drm/<drivers>: Drop DRM_UNLOCKED from modeset drivers 2015-10-16 15:50:54 +02:00
ati_pcigart.c
drm_agpsupport.c drm: Remove __OS_HAS_AGP 2015-09-30 10:44:48 +02:00
drm_atomic_helper.c Linux 4.3-rc2 2015-09-24 17:18:41 +02:00
drm_atomic.c drm: drm_atomic_crtc_get_property should be static 2015-09-24 20:14:26 +02:00
drm_auth.c
drm_bridge.c
drm_bufs.c drm: Remove __OS_HAS_AGP 2015-09-30 10:44:48 +02:00
drm_cache.c
drm_context.c drm: Convert drm_legacy_ctxbitmap_init to void return type 2015-07-02 17:00:48 +02:00
drm_crtc_helper.c drm: Make the connector dpms callback return a value, v2. 2015-07-27 16:23:28 +02:00
drm_crtc_internal.h
drm_crtc.c drm: Fix return value of drm_framebuffer_init() 2015-10-19 11:00:44 +02:00
drm_debugfs.c
drm_dma.c
drm_dp_helper.c Linux 4.3-rc2 2015-09-24 17:18:41 +02:00
drm_dp_mst_topology.c Linux 4.2-rc8 2015-08-24 16:36:42 +10:00
drm_drv.c drm: misc cleanup 2015-10-16 15:50:57 +02:00
drm_edid_load.c drm: Constify generic_edid_names[] 2015-09-08 13:45:52 +02:00
drm_edid.c drm: Make drm_av_sync_delay() 'mode' argument const 2015-09-09 14:53:54 +02:00
drm_encoder_slave.c
drm_fb_cma_helper.c drm/fb_cma_helper: Use new drm_fb_helper functions 2015-08-06 14:13:00 +02:00
drm_fb_helper.c drm/fbdev: Update legacy plane->fb refcounting for atomic restore 2015-09-24 20:14:20 +02:00
drm_flip_work.c
drm_fops.c
drm_gem_cma_helper.c drm/gem: Drop struct_mutex requirement from drm_gem_mmap_obj 2015-10-16 15:51:00 +02:00
drm_gem.c drm/gem: Use kref_get_unless_zero for the weak mmap references 2015-10-19 11:00:44 +02:00
drm_global.c
drm_hashtab.c
drm_info.c
drm_internal.h drm: move drm_class into drm_sysfs.c 2015-09-09 15:05:17 +02:00
drm_ioc32.c drm: Remove __OS_HAS_AGP 2015-09-30 10:44:48 +02:00
drm_ioctl.c drm: Enforce unlocked ioctl operation for kms driver ioctls 2015-10-16 15:50:54 +02:00
drm_irq.c drm: Add DRM_DEBUG_VBL() 2015-10-16 15:50:55 +02:00
drm_legacy.h drm: Convert drm_legacy_ctxbitmap_init to void return type 2015-07-02 17:00:48 +02:00
drm_lock.c drm: Reject DRI1 hw lock ioctl functions for kms drivers 2015-07-02 17:00:48 +02:00
drm_memory.c drm: Remove __OS_HAS_AGP 2015-09-30 10:44:48 +02:00
drm_mipi_dsi.c
drm_mm.c drm/mm: Do DRM_MM_CREATE_TOP adj_start calculation after color_adjust 2015-09-08 13:45:47 +02:00
drm_modes.c
drm_modeset_lock.c drm/atomic: Make sure lock is held in trylock contexts. 2015-09-08 13:45:53 +02:00
drm_of.c drm: Add modeset object iterators 2015-07-22 16:25:45 +02:00
drm_panel.c
drm_pci.c drm/doc: Update docs about device instance setup 2015-09-30 10:06:06 +02:00
drm_plane_helper.c drm/atomic: Make prepare_fb/cleanup_fb only take state, v3. 2015-09-08 13:45:54 +02:00
drm_platform.c drm/doc: Update docs about device instance setup 2015-09-30 10:06:06 +02:00
drm_prime.c
drm_probe_helper.c drm/probe-helper: Grab mode_config.mutex in poll_init/enable 2015-07-22 16:25:45 +02:00
drm_rect.c drm: Use DRM_ROTATE_MASK and DRM_REFLECT_MASK 2015-10-05 15:32:51 +02:00
drm_scatter.c
drm_sysfs.c drm: move drm_class into drm_sysfs.c 2015-09-09 15:05:17 +02:00
drm_trace_points.c
drm_trace.h
drm_vm.c drm: Remove __OS_HAS_AGP 2015-09-30 10:44:48 +02:00
drm_vma_manager.c drm/gem: Use kref_get_unless_zero for the weak mmap references 2015-10-19 11:00:44 +02:00
Kconfig Merge branch 'drm-next-fsl-dcu' of https://github.com/Jianwei-Wang/linux-drm-fsl-dcu into drm-next 2015-08-20 14:11:17 +10:00
Makefile drm: Hack around CONFIG_AGP=m build failures 2015-10-01 08:44:24 +02:00