linux-stable/drivers/gpu/drm/tegra
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
..
dc.c drm/tegra: Changes for v4.9-rc1 2016-09-30 13:00:36 +10:00
dc.h drm/tegra: sor: Add HDMI support 2015-08-13 13:49:37 +02:00
dpaux.c drm/tegra: dpaux: Add pinctrl support 2016-06-30 22:13:14 +02:00
dpaux.h drm/tegra: dpaux: Configure pads as I2C by default 2015-08-13 13:47:47 +02:00
drm.c drm: Don't swallow error codes in drm_dev_alloc() 2016-09-22 04:03:48 -07:00
drm.h drm: tegra: Rely on the default ->best_encoder() behavior 2016-06-10 17:24:48 +02:00
dsi.c drm/tegra: dsi: Enhance runtime power management 2016-08-24 15:58:57 +02:00
dsi.h drm/tegra: dsi: Add Tegra210 support 2015-08-13 13:47:45 +02:00
fb.c drm/tegra: Delete an unnecessary check before the function call "vunmap" 2016-07-18 09:11:30 +02:00
gem.c drm/prime: Take a ref on the drm_dev when exporting a dma_buf 2016-10-05 15:30:32 +02:00
gem.h
gr2d.c
gr2d.h
gr3d.c
gr3d.h
hdmi.c drm/tegra: Changes for v4.8-rc1 2016-07-16 11:23:50 +10:00
hdmi.h drm/tegra: hdmi: Enable audio over HDMI 2016-07-04 11:34:31 +02:00
Kconfig drm/tegra: Remove local fbdev emulation Kconfig option 2015-11-24 11:41:50 +01:00
Makefile
mipi-phy.c
mipi-phy.h
output.c drm/tegra: Changes for v4.8-rc1 2016-07-16 11:23:50 +10:00
rgb.c drm: tegra: Rely on the default ->best_encoder() behavior 2016-06-10 17:24:48 +02:00
sor.c drm/tegra: Changes for v4.8-rc1 2016-07-16 11:23:50 +10:00
sor.h drm/tegra: sor: Do not support deep color modes 2016-07-04 11:33:21 +02:00