Implement kmap/kmap_atomic, kunmap/kunmap_atomic functions of dma_buf_ops. Signed-off-by: Cooper Yuan <cooperyuan@xxxxxxxxx> --- drivers/gpu/drm/exynos/exynos_drm_dmabuf.c | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c index 913a23e..805b344 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c @@ -138,30 +138,35 @@ static void exynos_dmabuf_release(struct dma_buf *dmabuf) static void *exynos_gem_dmabuf_kmap_atomic(struct dma_buf *dma_buf, unsigned long page_num) { - /* TODO */ + struct exynos_drm_gem_obj *exynos_gem_obj = dma_buf->priv; + struct exynos_drm_gem_buf *buf = exynos_gem_obj->buffer; - return NULL; + return kmap_atomic(buf->pages[page_num]); } static void exynos_gem_dmabuf_kunmap_atomic(struct dma_buf *dma_buf, unsigned long page_num, void *addr) { - /* TODO */ + kunmap_atomic(addr); } static void *exynos_gem_dmabuf_kmap(struct dma_buf *dma_buf, unsigned long page_num) { - /* TODO */ + struct exynos_drm_gem_obj *exynos_gem_obj = dma_buf->priv; + struct exynos_drm_gem_buf *buf = exynos_gem_obj->buffer; - return NULL; + return kmap(buf->pages[page_num]); } static void exynos_gem_dmabuf_kunmap(struct dma_buf *dma_buf, unsigned long page_num, void *addr) { - /* TODO */ + struct exynos_drm_gem_obj *exynos_gem_obj = dma_buf->priv; + struct exynos_drm_gem_buf *buf = exynos_gem_obj->buffer; + + kunmap(buf->pages[page_num]); } static int exynos_gem_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *vma) -- 1.7.0.4 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel