|
@@ -127,27 +127,6 @@ static void exynos_gem_unmap_dma_buf(struct dma_buf_attachment *attach,
|
|
|
/* Nothing to do. */
|
|
|
}
|
|
|
|
|
|
-static void exynos_dmabuf_release(struct dma_buf *dmabuf)
|
|
|
-{
|
|
|
- struct exynos_drm_gem_obj *exynos_gem_obj = dmabuf->priv;
|
|
|
-
|
|
|
- /*
|
|
|
- * exynos_dmabuf_release() call means that file object's
|
|
|
- * f_count is 0 and it calls drm_gem_object_handle_unreference()
|
|
|
- * to drop the references that these values had been increased
|
|
|
- * at drm_prime_handle_to_fd()
|
|
|
- */
|
|
|
- if (exynos_gem_obj->base.export_dma_buf == dmabuf) {
|
|
|
- exynos_gem_obj->base.export_dma_buf = NULL;
|
|
|
-
|
|
|
- /*
|
|
|
- * drop this gem object refcount to release allocated buffer
|
|
|
- * and resources.
|
|
|
- */
|
|
|
- drm_gem_object_unreference_unlocked(&exynos_gem_obj->base);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
static void *exynos_gem_dmabuf_kmap_atomic(struct dma_buf *dma_buf,
|
|
|
unsigned long page_num)
|
|
|
{
|
|
@@ -193,7 +172,7 @@ static struct dma_buf_ops exynos_dmabuf_ops = {
|
|
|
.kunmap = exynos_gem_dmabuf_kunmap,
|
|
|
.kunmap_atomic = exynos_gem_dmabuf_kunmap_atomic,
|
|
|
.mmap = exynos_gem_dmabuf_mmap,
|
|
|
- .release = exynos_dmabuf_release,
|
|
|
+ .release = drm_gem_dmabuf_release,
|
|
|
};
|
|
|
|
|
|
struct dma_buf *exynos_dmabuf_prime_export(struct drm_device *drm_dev,
|