Seung-Woo Kim be8a42ae60 drm/prime: drop reference on imported dma-buf come from gem
Increasing ref counts of both dma-buf and gem for imported dma-buf come from gem
makes memory leak. release function of dma-buf cannot be called because f_count
of dma-buf increased by importing gem and gem ref count cannot be decrease
because of exported dma-buf.

So I add dma_buf_put() for imported gem come from its own gem into each drivers
having prime_import and prime_export capabilities. With this, only gem ref
count is increased if importing gem exported from gem of same driver.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Kyungmin.park <kyungmin.park@samsung.com>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Rob Clark <rob.clark@linaro.org>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-01-08 14:41:53 +10:00
..
2012-12-11 14:08:47 -08:00
2012-12-11 14:08:47 -08:00
2012-10-01 13:23:01 -07:00
2012-11-21 15:05:02 -08:00
2012-10-22 15:42:38 -07:00
2012-11-21 15:05:01 -08:00
2012-10-01 12:26:52 -07:00
2012-11-21 15:05:12 -08:00
2012-09-16 17:17:25 -07:00
2012-12-11 14:08:47 -08:00
2012-12-11 14:08:47 -08:00