alistair23-linux/drivers/gpu/drm/armada
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
..
armada_510.c drm/armada: update Armada 510 (Dove) to use "ext_ref_clk1" as the clock 2014-07-11 15:40:14 +01:00
armada_crtc.c drm/armada: use drm_crtc_handle_vblank() 2016-07-12 15:41:14 +02:00
armada_crtc.h drm/armada: convert overlay plane vbl worker to a armada plane worker 2015-10-01 14:33:28 +01:00
armada_debugfs.c drm/armada: use a private mutex to protect priv->linear 2015-12-05 21:44:07 +00:00
armada_drm.h drm/armada: use a private mutex to protect priv->linear 2015-12-05 21:44:07 +00:00
armada_drv.c drm: drop DRIVER_HAVE_IRQ flag for some drivers 2016-08-16 14:07:43 +02:00
armada_fb.c drm: Remove unused drm_device from drm_gem_object_lookup() 2016-05-17 08:47:30 +02:00
armada_fb.h drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
armada_fbdev.c drm: Remove superflous linux/fb.h includes 2016-08-12 10:41:39 +02:00
armada_gem.c drm/prime: Take a ref on the drm_dev when exporting a dma_buf 2016-10-05 15:30:32 +02:00
armada_gem.h drm: Remove unused drm_device from drm_gem_object_lookup() 2016-05-17 08:47:30 +02:00
armada_hw.h DRM: Armada: Add support for ARGB 32x64 or 64x32 hardware cursors 2013-10-18 15:53:30 +01:00
armada_ioctlP.h
armada_overlay.c drm: BIT(DRM_ROTATE_?) -> DRM_ROTATE_? 2016-08-08 14:17:56 -04:00
Kconfig drm/armada: make fbdev support really optional 2016-07-18 09:11:33 +02:00
Makefile drm/armada: remove non-component support 2015-09-15 16:26:49 +01:00