alistair23-linux/drivers/gpu/drm/udl
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
..
Kconfig drm/udl: make fbdev support really optional 2016-07-18 09:11:40 +02:00
Makefile drm/udl: add support to export a handle to a FD on UDL. 2014-11-20 11:41:37 +10:00
udl_connector.c drm/kms: Nuke dirty_info property 2016-08-16 16:30:50 +02:00
udl_dmabuf.c drm/prime: Take a ref on the drm_dev when exporting a dma_buf 2016-10-05 15:30:32 +02:00
udl_drv.c drm: Don't swallow error codes in drm_dev_alloc() 2016-09-22 04:03:48 -07:00
udl_drv.h drm/udl: implement usb_driver suspend/resume. 2016-09-06 13:56:42 -04:00
udl_encoder.c drm/udl: removed optional dummy encoder mode_fixup function. 2016-02-16 15:30:12 +01:00
udl_fb.c drm: Protect fb_defio in drivers with CONFIG_KMS_FBDEV_EMULATION 2016-08-12 10:42:00 +02:00
udl_gem.c drm: Remove unused drm_device from drm_gem_object_lookup() 2016-05-17 08:47:30 +02:00
udl_main.c drm/udl: Ensure channel is selected before using the device. 2016-08-23 09:29:59 +02:00
udl_modeset.c drm/udl: implement usb_driver suspend/resume. 2016-09-06 13:56:42 -04:00
udl_transfer.c drm/udl: optimize udl_compress_hline16 (v2) 2015-01-31 10:08:47 +10:00