Commit ce92e3c9 authored by Seung-Woo Kim's avatar Seung-Woo Kim Committed by Dave Airlie

drm/prime: reorder drm_prime_add_buf_handle and remove prototype

Signed-off-by: default avatarSeung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: default avatarYoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 7d8f06ac
...@@ -68,7 +68,20 @@ struct drm_prime_attachment { ...@@ -68,7 +68,20 @@ struct drm_prime_attachment {
enum dma_data_direction dir; enum dma_data_direction dir;
}; };
static int drm_prime_add_buf_handle(struct drm_prime_file_private *prime_fpriv, struct dma_buf *dma_buf, uint32_t handle); static int drm_prime_add_buf_handle(struct drm_prime_file_private *prime_fpriv, struct dma_buf *dma_buf, uint32_t handle)
{
struct drm_prime_member *member;
member = kmalloc(sizeof(*member), GFP_KERNEL);
if (!member)
return -ENOMEM;
get_dma_buf(dma_buf);
member->dma_buf = dma_buf;
member->handle = handle;
list_add(&member->entry, &prime_fpriv->head);
return 0;
}
static int drm_gem_map_attach(struct dma_buf *dma_buf, static int drm_gem_map_attach(struct dma_buf *dma_buf,
struct device *target_dev, struct device *target_dev,
...@@ -571,21 +584,6 @@ void drm_prime_destroy_file_private(struct drm_prime_file_private *prime_fpriv) ...@@ -571,21 +584,6 @@ void drm_prime_destroy_file_private(struct drm_prime_file_private *prime_fpriv)
} }
EXPORT_SYMBOL(drm_prime_destroy_file_private); EXPORT_SYMBOL(drm_prime_destroy_file_private);
static int drm_prime_add_buf_handle(struct drm_prime_file_private *prime_fpriv, struct dma_buf *dma_buf, uint32_t handle)
{
struct drm_prime_member *member;
member = kmalloc(sizeof(*member), GFP_KERNEL);
if (!member)
return -ENOMEM;
get_dma_buf(dma_buf);
member->dma_buf = dma_buf;
member->handle = handle;
list_add(&member->entry, &prime_fpriv->head);
return 0;
}
int drm_prime_lookup_buf_handle(struct drm_prime_file_private *prime_fpriv, struct dma_buf *dma_buf, uint32_t *handle) int drm_prime_lookup_buf_handle(struct drm_prime_file_private *prime_fpriv, struct dma_buf *dma_buf, uint32_t *handle)
{ {
struct drm_prime_member *member; struct drm_prime_member *member;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment