linux-stable/include/drm
Chris Wilson a4fce9cb78 drm/prime: Take a ref on the drm_dev when exporting a dma_buf
dma_buf may live a long time, longer than the last direct user of the
driver. We already hold a reference to the owner module (that prevents
the object code from disappearing), but there is no reference to the
drm_dev - so the pointers to the driver backend themselves may vanish.

v2: Resist temptation to fix the bug in armada_gem.c not setting the
correct flags on the exported dma-buf (it should pass the flags through
and not be arbitrarily setting O_RDWR).

Use a common wrapper for exporting the dmabuf and acquiring the
reference to the drm_device.

Testcase: igt/vgem_basic/unload
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: stable@vger.kernel.org
Tested-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161005122145.1507-2-chris@chris-wilson.co.uk
2016-10-05 15:30:32 +02:00
..
bridge drm/bridge: analogix_dp: Add analogix_dp_psr_supported 2016-10-04 08:23:16 +02:00
i2c drm/i2c: tda998x: Register ASoC hdmi-codec and add audio DT binding 2016-09-07 13:10:10 +01:00
ttm drm/ttm: remove cpu_address member from ttm_tt 2016-09-16 15:53:05 -04:00
ati_pcigart.h
drm_agpsupport.h
drm_atomic.h drm: Extract drm_plane.[hc] 2016-09-22 00:01:56 -07:00
drm_atomic_helper.h drm/fence: allow fence waiting to be interrupted by userspace 2016-09-12 16:59:15 -04:00
drm_auth.h
drm_blend.h drm: Fix plane type uabi breakage 2016-09-22 23:52:12 -07:00
drm_bridge.h drm: Extract drm_bridge.h 2016-09-19 15:04:15 +02:00
drm_cache.h
drm_color_mgmt.h drm/doc: Document color space handling 2016-09-22 00:04:03 -07:00
drm_connector.h drm/edid: Move dvi_dual/max_tmds_clock to drm_display_info 2016-10-04 08:23:10 +02:00
drm_crtc.h drm: Document caveats around atomic event handling 2016-10-04 08:23:15 +02:00
drm_crtc_helper.h
drm_displayid.h
drm_dp_dual_mode_helper.h
drm_dp_helper.h drm: Add DP branch device info on debugfs 2016-09-15 14:51:07 +03:00
drm_dp_mst_helper.h
drm_edid.h drm: Move all decl for drm_edid.c to drm_edid.h 2016-09-19 15:04:32 +02:00
drm_encoder.h drm: Move a few macros away from drm_crtc.h 2016-09-19 15:03:46 +02:00
drm_encoder_slave.h
drm_fb_cma_helper.h
drm_fb_helper.h drm/fb-helper: add DRM_FB_HELPER_DEFAULT_OPS for fb_ops 2016-10-04 08:23:16 +02:00
drm_fixed.h
drm_flip_work.h
drm_fourcc.h drm: move drm_mode_legacy_fb_format to drm_fourcc.c 2016-08-29 15:37:28 +02:00
drm_framebuffer.h drm: Move a few macros away from drm_crtc.h 2016-09-19 15:03:46 +02:00
drm_gem.h
drm_gem_cma_helper.h
drm_global.h
drm_hashtab.h
drm_irq.h
drm_legacy.h
drm_mem_util.h
drm_mipi_dsi.h
drm_mm.h
drm_mode_object.h drm: Extract drm_bridge.h 2016-09-19 15:04:15 +02:00
drm_modes.h drm: Extract drm_bridge.h 2016-09-19 15:04:15 +02:00
drm_modeset_helper.h
drm_modeset_helper_vtables.h
drm_modeset_lock.h
drm_of.h
drm_os_linux.h
drm_panel.h
drm_pciids.h
drm_plane.h drm: Fix plane type uabi breakage 2016-09-22 23:52:12 -07:00
drm_plane_helper.h
drm_property.h drm: Move a few macros away from drm_crtc.h 2016-09-19 15:03:46 +02:00
drm_rect.h
drm_simple_kms_helper.h drm: simple_kms_helper: Add prepare_fb and cleanup_fb hooks 2016-10-05 15:18:02 +02:00
drm_sysfs.h
drm_vma_manager.h drm: use drm_file to tag vm-bos 2016-09-19 11:22:08 +02:00
drmP.h drm/prime: Take a ref on the drm_dev when exporting a dma_buf 2016-10-05 15:30:32 +02:00
gma_drm.h
i915_component.h
i915_drm.h
i915_pciids.h drm/i915: Remove .is_mobile field from platform struct 2016-09-07 16:07:07 -07:00
intel-gtt.h